Hi,
I am still stack on this problem. It seems that page refresh does not help.
I try to add javascript command window.refresh and window.reload but this does
not wokr too.
Only thing that helps is new call of this page constructor. (I add some
refrsh link, that generates the new page)
This seems that I have bad written page constructor. That on the refresh the
model is not updated.
Here are some snippets of y code:
public class Page extends MainTemplate // maintemplate is some base page that
gives common look
{
// Inject spring bean for group management
@SpringBean(name="baseGroupManager")
private DtabaseManager databaseManager;
public Page() {
// Create navigation border
// this creates something like navomatic example on wicket
NavigationTable navigationBorder = new
NavigationTable("navigationBorder");
// Add items to page body
// model is created by calling function that receive some data from
database
navigationBorder.add(new MyList("myList",
databaseManager.loadAndGetGroups()));
/
// Add navigation border
add(navigationBorder);
// Add Add modal window
final ModalWindow addWindow;
navigationBorder.add(addWindow = new ModalWindow("addWindow"));
addWindow.setContent(new
GroupManagementAddPanel(addWindow.getContentId(), addWindow));
addWindow.setTitle("Add Group.");
addWindow.setCookieName("addWindow");
addWindow.setCloseButtonCallback(new ModalWindow.CloseButtonCallback()
{
@Override
public boolean onCloseButtonClicked(AjaxRequestTarget target)
{
return true;
}
});
addWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback()
{
@Override
public void onClose(AjaxRequestTarget target)
{
getPage().modelChanged();
setResponsePage(target.getPage());
setRedirect(true);
}
});
navigationBorder.add(new AjaxLink("add")
{
@Override
public void onClick(AjaxRequestTarget target)
{
addWindow.show(target);
}
});
}
}
Please do anybody see something wrong. Let me know. I do not know why the
model
navigationBorder.add(new MyList("myList",
databaseManager.loadAndGetGroups()));
is not reloaded. The constructor of MyList class just call super(id, list);
Thanks for your advice
Milan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]