Title: Re: [Wicket-user] ListView: Rendering table row id attribute
Hi Karl,I thought it will be much easier if I use row (or may be I 'm wrong) instead of retrieving 'tr' element. In real situation I 'm going to use it against a nested table and use _javascript_ to toggle (hi
Title: Re: [Wicket-user] ListView: Rendering table row id attribute
Why do you need to set an id for each row? Instead you can set an id for the table element and call:
var myRow = document.getElementById( “tableId” ).getElementsByTagName( “tr” )[indexOfRowYouWant];
Karl-Erik
On 13-03-06
Well,
actually it is
protected void populateItem(final ListItem listItem) {listItem.add(new AttributeModifier("id", .., new Model("row" + listItem.getIndex()
));
}
Dirk
2006/3/13, Dirk Markert <[EMAIL PROTECTED]>:
Hi Michael,
you need an AttributeModifier. Something like
protected v
Hi Michael,
you need an AttributeModifier. Something like
protected void populateItem(final ListItem listItem) { add(new Label("name","Scooby").new AttributeModifier("id", ..,
new Model("row" + listItem.getIndex()));
}
Dirk
2006/3/13, Michael K <[EMAIL PROTECTED]>:
Hi,I want to be
Hi,I want to be able to render id="row" attribute when using ListView. I need it to code _javascript_ using getElementById(). Please find the examples below:Html code:--- name name nameJava code:---add(new ListView("rowToRender",someArrayList){ protected void popu