KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > taglibs > standard > tag > rt > core > ForTokensTag


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.taglibs.standard.tag.rt.core;
18
19 import javax.servlet.jsp.JspTagException JavaDoc;
20 import javax.servlet.jsp.jstl.core.LoopTag;
21 import javax.servlet.jsp.tagext.IterationTag JavaDoc;
22
23 import org.apache.taglibs.standard.tag.common.core.ForTokensSupport;
24
25 /**
26  * <p>A handler for &lt;forTokens&gt; that supports rtexprvalue-based
27  * attributes.</p>
28  *
29  * @author Shawn Bayern
30  */

31
32 public class ForTokensTag
33     extends ForTokensSupport
34     implements LoopTag, IterationTag JavaDoc
35 {
36
37     //*********************************************************************
38
// Accessor methods
39

40     // for tag attribute
41
public void setBegin(int begin) throws JspTagException JavaDoc {
42         this.beginSpecified = true;
43         this.begin = begin;
44         validateBegin();
45     }
46
47     // for tag attribute
48
public void setEnd(int end) throws JspTagException JavaDoc {
49         this.endSpecified = true;
50         this.end = end;
51         validateEnd();
52     }
53
54     // for tag attribute
55
public void setStep(int step) throws JspTagException JavaDoc {
56         this.stepSpecified = true;
57         this.step = step;
58         validateStep();
59     }
60
61     // stores the 'items' String we're passed
62
public void setItems(String JavaDoc s) throws JspTagException JavaDoc {
63         items = s;
64     // use the empty string to indicate "no iteration"
65
if (s == null)
66         items = "";
67     }
68
69     // stores the 'delims' String we're passed
70
public void setDelims(String JavaDoc s) throws JspTagException JavaDoc {
71         delims = s;
72     // use the empty string to cause monolithic tokenization
73
if (s == null)
74         delims = "";
75     }
76
77 }
78
Popular Tags