2013-08-22 89 views
0

这里表不更新模态窗口关闭

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

你关闭使用窗口“userPageFindUserModal.close(目标)”或使用关闭按钮在角落?如果您正在使用.close(),则此功能可能无法执行。 –

+0

是的,即时通讯使用.close。 system.out显示,所以它正在执行测试功能 – eaglei22

回答

0

为什么要创建新的WebMarkupContainer而不将其添加到组件树?

你的页面可能已经有一个“userInformation”(您已经调用#setOutputMarkupId(真)):

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); 
} 
+0

。 – eaglei22