Hello again!
I can't set 'id' attribute to the <tr> tag:
WicketMessage: Expected close tag for <tr id="rowId1" onmouseout="changeLC(this.id,0);"
class="itemsTableTr" wicket:id="idTr" onmouseover="changeLC(this.id,1);">
JAVA:
add(new ListView("listview", usersNavList) {
@Override
protected void populateItem(ListItem item) {
final NavItem navItem = (NavItem) item.getModelObject();
item.add(new WebComponent("idTr"){
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("id", "rowId"+navItem.getId());
}
});
...
HTML:
<wicket:container wicket:id="listview">
<tr wicket:id="idTr" id="row4" class="itemsTableTr"
onmouseover="changeLC(this.id,1);"
onmouseout="changeLC(this.id,0);">
<td class="itemsTableTdSystem"><input type="checkbox"
class="tableCheckbox"></input></td>
<td wicket:id="id" class="itemsTableTd">Item 32 id</td>
<td class="itemsTableTd"><a wicket:id="name" href="#"> Item 32
caption</a></td>
<td wicket:id="order" class="itemsTableTd">Item 32
status</td>
</tr>
<tr>
<td class="rowLine" />
<td class="rowLine" />
<td class="rowLine" />
<td class="rowLine" />
</tr>
</wicket:container>
I've tried WebComponent to reference the <tr> tag in my sample - it
doesn't work, also I tried WebMarkupContainer - but fails too with this
error:
WicketMessage: Unable to find component with id 'id' in [MarkupContainer
[Component id = idTr]]. This means that you declared wicket:id=id in your
markup, but that you either did not add the component to your page at all, or
that the hierarchy does not match.
JAVA diff:
- item.add(new WebComponent("idTr"){
+ item.add(new WebMarkupContainer("idTr"){
Thanks in advance.
--
Khlystov Alexandr
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org