Hi,
I try to apply css style on several div but wicket changes their id
attributes defined in the html file.
I have 3 custom panels that contain a DataView and I want to refresh
them with ajax, so I make a call to setOutputMarkupId() method. This
call changes the id defined in html file.
I add an AttributeModifier to force the use of the defined id, that
works but now ajax refresh don't work.
What I'm doing wrong?
code:
dashboard.html:
...
<body>
<wicket:extend>
<div wicket:id="projects-panel" id="projects-panel" />
<div wicket:id="agents-panel" id="agents-panel" />
<div wicket:id="builds-panel" id="builds-panel" />
</wicket:extend>
</body>
---------------------------
viewPanel.html:
<wicket:panel>
<wicket:child />
<span wicket:id="navigator" class="navigator">[agents
navigator]</span>
</wicket:panel>
----------------------------
ViewPanel.java:
public class ViewPanel extends Panel {
private static final long serialVersionUID = 1L;
public ViewPanel(String id, DataView dataView, int
itemsPerPage) {
super(id);
setOutputMarkupId(true);
add(dataView);
dataView.setItemsPerPage(itemsPerPage);
add(new AttributeModifier("id", true, new Model(id)));
add(new FancyPagingNavigator("navigator", dataView));
}
}
-------------------------
Dashboard.java:
public class Dashboard extends WebPage {
public Dashboard() {
...
add(new ProjectsPanel("projects-panel", projects, 5));
add(new AgentsPanel("agents-panel", scheduler, 5));
add(new QueuePanel("builds-panel", scheduler, 5));
}
}
Mathieu
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user