in your case:
propertyLoop1.get(someIterationAsString).get("groyp").getModelObject()

but better pass a List to the itemsGroup which is reachable without using
the tree as above
e.g.

List<List> groupModels = ...;

and then:
 final CheckGroup itemsGroup = new CheckGroup("group",
groupModels.get(propertyItem.getIteration()));

On Sun, Mar 20, 2011 at 10:10 PM, tech7 <techlove...@gmail.com> wrote:

> My code is like that:
>
> propertyLoop1 = new Loop("properties1", propertyList1.size()) {
>
>                        @Override
>                        protected void populateItem(final LoopItem
> propertyItem) {
>                                final Property property1 =
> propertyList1.get(propertyItem.getIteration());
>                                propertyItem.add(new Label("propertyName1",
> property1.getName()));
>
>                                final List itemList1 = new
> ArrayList(property1.getItems());
>
>                                final CheckGroup itemsGroup = new
> CheckGroup("group", new ArrayList());
>
>                                ListView items = new ListView("items",
> itemList1) {
>
>                                        protected void populateItem(ListItem
> itemItem) {
>                                                Check check = new
> Check("itemCheck", itemItem.getModel());
>                                                Label label = new
> Label("itemName", new
> PropertyModel(itemItem.getModel(), "name"));
>                                                itemItem.add(check);
>                                                itemItem.add(label);
>                                        };
>
>                                };
>                                items.setReuseItems(true);
>                                itemsGroup.add(items);
>                                propertyItem.add(itemsGroup);
>                        };
>                };
>
> I am really stuck on this.
>
> -----
> Developer
> Wicket
> Java
> JSP
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Getting-data-from-dynamically-constructed-elements-tp3391580p3391999.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to