I forgot to post Wicket version 1.4.18

On 11/14/2011 02:07 PM, Jered Myers wrote:
The HTML markup is always <span wicket:id="headerLabel"></span>, so I think the answer is no. I end up with a markup id like "headerLabel8f".

On 11/14/2011 12:54 PM, Sven Meier wrote:
Do you have markup ids pre-defined in your html markup?

Sven

On 11/14/2011 09:39 PM, Jered Myers wrote:
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());
 }
}



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


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


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

Reply via email to