这里
userPageFindUserModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback()
{
public void onClose(AjaxRequestTarget target)
{
System.out.println("ssaIDLISTCON");
userInformation = new WebMarkupContainer("userAttributeTable");
userInformation.setOutputMarkupId(true);
addUserInformation("test", "Massey", "J", "1234512", "Enabled");
target.add(userInformation);
}
});
当我关闭我的模态窗口时,我想更新调用页面的内容......但它不起作用。
当我刷新页面然后它可以工作,但是ajax不允许我访问当前页面组件..这如何与模态窗口一起工作?模态窗口的目标是什么?或者为父页面实例?
有什么想法吗?谢谢!
答案 0 :(得分:0)
为什么要在不将其添加到组件树的情况下创建新的WebMarkupContainer?
您的网页可能已经有一个'userInformation'(您已经在其上调用了#setOutputMarkupId(true)):
public void onClose(AjaxRequestTarget target)
{
System.out.println("ssaIDLISTCON");
// userInformation = new WebMarkupContainer("userAttributeTable");
// userInformation.setOutputMarkupId(true);
addUserInformation("test", "Massey", "J", "1234512", "Enabled");
target.add(userInformation);
}