| java.lang.Object com.opensymphony.webwork.components.Component com.opensymphony.webwork.components.AppendIterator
AppendIterator | public class AppendIterator extends Component implements UnnamedParametric(Code) | |
Component for AppendIteratorTag, which jobs is to append iterators to form an
appended iterator whereby entries goes from one iterator to another after each
respective iterator is exhausted of entries.
For example, if there are 3 iterator appended (each iterator has 3 entries),
the following will be how the appended iterator entries will be arranged:
- First Entry of the First Iterator
- Second Entry of the First Iterator
- Third Entry of the First Iterator
- First Entry of the Second Iterator
- Second Entry of the Second Iterator
- Third Entry of the Second Iterator
- First Entry of the Third Iterator
- Second Entry of the Third Iterator
- Third Entry of the Third ITerator
- id (String) - the id of which if supplied will have the resultant
appended iterator stored under in the stack's context
public class AppendIteratorTagAction extends ActionSupport {
private List myList1;
private List myList2;
private List myList3;
public String execute() throws Exception {
myList1 = new ArrayList();
myList1.add("1");
myList1.add("2");
myList1.add("3");
myList2 = new ArrayList();
myList2.add("a");
myList2.add("b");
myList2.add("c");
myList3 = new ArrayList();
myList3.add("A");
myList3.add("B");
myList3.add("C");
return "done";
}
public List getMyList1() { return myList1; }
public List getMyList2() { return myList2; }
public List getMyList3() { return myList3; }
}
<ww:append id="myAppendIterator">
<ww:param value="%{myList1}" />
<ww:param value="%{myList2}" />
<ww:param value="%{myList3}" />
</ww:append>
<ww:iterator value="%{#myAppendIterator}">
<ww:property />
</ww:iterator>
author: tm_jee ( tm_jee (at) yahoo.co.uk ) version: $Date: 2006-03-18 17:28:55 +0100 (Sat, 18 Mar 2006) $ $Id: AppendIterator.java 2468 2006-03-18 16:28:55Z rgielen $ See Also: com.opensymphony.webwork.util.AppendIteratorFilter See Also: com.opensymphony.webwork.views.jsp.iterator.AppendIteratorTag |
setId | public void setId(String id)(Code) | | the id of which if supplied will have the resultant appended iterator stored under in the stack's context
|
Methods inherited from com.opensymphony.webwork.components.Component | public void addAllParameters(Map params)(Code)(Java Doc) public void addParameter(String key, Object value)(Code)(Java Doc) public boolean altSyntax()(Code)(Java Doc) public void copyParams(Map params)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean escapeXml)(Code)(Java Doc) protected String determineNamespace(String namespace, OgnlValueStack stack, HttpServletRequest req)(Code)(Java Doc) public boolean end(Writer writer, String body)(Code)(Java Doc) protected boolean end(Writer writer, String body, boolean popComponentStack)(Code)(Java Doc) protected WebWorkException fieldError(String field, String errorMsg, Exception e)(Code)(Java Doc) protected Component findAncestor(Class clazz)(Code)(Java Doc) protected String findString(String expr)(Code)(Java Doc) protected String findString(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr)(Code)(Java Doc) protected Object findValue(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr, Class toType)(Code)(Java Doc) public Stack getComponentStack()(Code)(Java Doc) public String getId()(Code)(Java Doc) public Map getParameters()(Code)(Java Doc) public OgnlValueStack getStack()(Code)(Java Doc) protected void popComponentStack()(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public boolean start(Writer writer)(Code)(Java Doc) protected String toString(Throwable t)(Code)(Java Doc) public boolean usesBody()(Code)(Java Doc)
|
|
|