Sure!
public class ShowCircularPage extends BasePage {
private Page backPage;
public ShowCircularPage(Page backPage, long circularId) {
this.backPage = backPage;
DetachableCircularModel model = new
DetachableCircularModel(circularId, getCircularDao());
this.setModel(model);
CircularPanel panel = new CircularPanel("circularPanel", model);
add(panel);
add(new DistributionlistPanel("distributionlistPanel", model));
add(new Link("backLink") {
public void onClick() {
setResponsePage(ShowCircularPage.this.backPage);
}
});
}
}
And the panel I use:
public class CircularPanel extends Panel {
public CircularPanel(String componentId, final IModel circularModel) {
super(componentId, circularModel);
add(new Label("name", new
PropertyModel(circularModel.getObject(this), "name")));
add(new Label("createdBy", new
PropertyModel(circularModel.getObject(this), "createdBy")));
add(new Label("plannedDate", new
PropertyModel(circularModel.getObject(this), "plannedDate")));
Form form = new Form("editForm");
form.add((new Button("editButton") {
protected void onSubmit() {
final long circularId = ((Circular)
circularModel.getObject(this)).getId();
setResponsePage(new EditCircularPage(getPage(), circularId));
}
}));
add(form);
}
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user