My use case can best be described as making wicket-phonebook work
within a single tab of a tabbed panel using AjaxLink for create, edit,
and delete.
Thus, I have a page that contains a TabbedPanel.
One tab of TabbedPanel contains ContactListPanel.
ContactListPanel contains createContact link and a DataTable
DataTable contains rows of data with editContact and deleteContact links.
Clicking on one of those links should replace ContactListPanel with
ContactEditPanel or ContactDeletePanel. I want the edit and delete
functions to still be within the tabbed interface, not on separate
pages.
I think this is close, but am not sure what is wrong:
private void addCreateLink() {
add(new AjaxLink("createLink") {
@Override
public void onClick(AjaxRequestTarget target) {
Panel panel = new ContactEditPanel("panel",
new Model(new Contact()));
panel.setOutputMarkupId(true);
getParent().replaceWith(panel);
target.addComponent(panel);
}
});
}
What is the proper way to replace the containing panel from a control
within that panel? I found similar questions posted on this list, but
I haven't got any of those solutions to work for me.
Thanks,
Tauren
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]