KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ofbiz > webapp > taglib > IterateNextTEI


1 /*
2  * $Id: IterateNextTEI.java 5462 2005-08-05 18:35:48Z jonesde $
3  *
4  * <p><b>Title:</b> IterateNextTEI.java
5  * <p><b>Description:</b> Extra-Info class for the IterateNextTag.
6  * <p>Copyright (c) 2002-2003 The Open For Business Project and repected authors.
7  * <p>Permission is hereby granted, free of charge, to any person obtaining a
8  * copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation
10  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11  * and/or sell copies of the Software, and to permit persons to whom the
12  * Software is furnished to do so, subject to the following conditions:
13  *
14  * <p>The above copyright notice and this permission notice shall be included
15  * in all copies or substantial portions of the Software.
16  *
17  * <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
22  * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
23  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  */

25 package org.ofbiz.webapp.taglib;
26
27 import javax.servlet.jsp.tagext.TagData JavaDoc;
28 import javax.servlet.jsp.tagext.TagExtraInfo JavaDoc;
29 import javax.servlet.jsp.tagext.VariableInfo JavaDoc;
30
31 /**
32  * @author <a HREF="mailto:jaz@ofbiz.org">Andy Zeneski</a>
33  * @version 1.0
34  * @created August 4, 2001
35  */

36
37 public class IterateNextTEI extends TagExtraInfo JavaDoc {
38
39     public IterateNextTEI() {
40         super();
41     }
42
43     public VariableInfo JavaDoc[] getVariableInfo(TagData JavaDoc data) {
44         String JavaDoc name = null;
45         String JavaDoc className = null;
46
47         name = data.getAttributeString("name");
48         if (name == null)
49             name = "next";
50
51         className = data.getAttributeString("type");
52         if (className == null)
53             className = "org.ofbiz.entity.GenericValue";
54
55         VariableInfo JavaDoc info =
56             new VariableInfo JavaDoc(name, className, true, VariableInfo.NESTED);
57         VariableInfo JavaDoc[] result = {info};
58
59         return result;
60     }
61
62     public boolean isValid(TagData JavaDoc data) {
63         return true;
64     }
65 }
66
67
Popular Tags