Hi, I have a problem constructing ListMultipleChoice objects inside the loop. I had written the code as: List groupModelsDrop = new ArrayList(); propertyLoop2 = new Loop("properties2", propertyList2.size()) {
@Override protected void populateItem(final LoopItem propertyItem) { final Property property2 = propertyList2.get(propertyItem.getIteration()); propertyItem.add(new Label("propertyName2", property2.getName())); final List itemList2 = new ArrayList(property2.getItems()); IModel<Collection<Item>> allItemsModel = new PropertyModel<Collection<Item>>( new Model(), groupModelsDrop.get(propertyItem.getIteration()) ); final ListMultipleChoice itemSelect = new ListMultipleChoice( "itemList", allItemsModel, itemList2, new IChoiceRenderer() { @Override public String getIdValue(Item item, int index) { return String.valueOf(item.getId()); } @Override public String getDisplayValue(Item item) { return item.getName(); } }); propertyItem.add(itemSelect); }; }; but the problem is; when i submit the form it gives an error "WicketMessage: Attempted to set property value on a null object. Property expression: groupModelsDrop.get(propertyItem.getIteration()) " like that. Where is my fault? I need your suggestions. With my best regards. ----- Wicket-Java -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListMultipleChoice-Binding-List-Problem-tp3396083p3396083.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