01: /*
02: * Created on Apr 19, 2004
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.xdev.base.xssl.collection;
08:
09: import java.util.HashMap;
10:
11: import org.xdev.base.xssl.XSSLAction;
12:
13: /**
14: * @author AYegorov
15: *
16: * To change the template for this generated type comment go to
17: * Window>Preferences>Java>Code Generation>Code and Comments
18: */
19: public class CollectionAdder extends XSSLCollectionIterator {
20:
21: /**
22: * @param id
23: */
24: public CollectionAdder(String id) {
25: super (id);
26: // XXX Auto-generated constructor stub
27: }
28:
29: /**
30: * @param id
31: * @param properties
32: */
33: public CollectionAdder(String id, HashMap properties) {
34: super (id, properties);
35: // XXX Auto-generated constructor stub
36: }
37:
38: /* (non-Javadoc)
39: * @see org.xdev.base.xssl.collection.XSSLCollectionIterator#processCollectionItem(org.xdev.base.xssl.XSSLAction, java.lang.Object)
40: */
41: protected Object processCollectionItem(XSSLAction item, Object next)
42: throws Exception {
43:
44: item = (XSSLAction) item.newInstance(this .getRoot(), this
45: .getParentComponent());
46:
47: if (item.execute(this ) && this .getBooleanProperty("add")) {
48: this.getParentComponent().addElement(item);
49: }
50:
51: return item;
52: }
53:
54: }
|