I am getting components with duplicate markup ids in my label components. What can cause this to happen?

I am letting Wicket set the markup ids. Only one user is setup in a manner that creates the problem, so in general there is not a duplication problem. As I understand it the markup id number is coming from the Session's nextSequenceValue method, so I don't see how it could be duplicated. The components are getting built by multiple instances of the same class and added into the same array. Here is an example reduced down to the basic parts:

Several classes build the MyDisplayRow objects and add them to the same ArrayList...
for (DataRow data : myData)
{
  MyDisplayRow row = new MyDisplayRow();
  row.setLabelComponent(new Label("headerLabel", data.getTextColumnData());
  getMyRowArrayList().add(row);
}

...
ListView<MyDispayRow> repeater = new ListView<MyDisplayRow>("repeater", myRowArrrayListModel)
{
 protected void populateItem(ListItem<MyDisplayRow> item)
 {
    // Here is where I see the duplicate markup ids
    log.debug(item.getModelObject().getLabelComponent().getMarkupId());
    item.add(item.getModelObject().getLabelComponent());
 }
}

--
Jered Myers


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to