2010-03-11 277 views
0

在Wicket Panel中,我實現了一個名爲showAttentiePopup(AjaxRequestTarget)的方法,它顯示了一個ModalWindow彈出窗口。這種方法工作正常,當我從同一個面板調用它。但是,當我嘗試調用從它與下面的錯誤崩潰另一個小組的方法:Wicket:在打開ModalWindow時彈出(彈出)

java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = createAttentie]] 
at org.apache.wicket.Component.getPage(Component.java:1665) 
at org.apache.wicket.RequestCycle.urlFor(RequestCycle.java:851) 
at org.apache.wicket.Component.urlFor(Component.java:3170) 
at org.apache.wicket.behavior.AbstractAjaxBehavior.getCallbackUrl(AbstractAjaxBehavior.java:123) 
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.getCallbackScript(AbstractDefaultAjaxBehavior.java:116) 
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.getCallbackScript(AbstractDefaultAjaxBehavior.java:104) 
at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$CloseButtonBehavior.getCallbackScript(ModalWindow.java:876) 
at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.getWindowOpenJavascript(ModalWindow.java:1005) 
at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.show(ModalWindow.java:286) 
at nl.topicuszorg.fks.web.client.dossier.overzichten.documenten.AttentieOverzichtPanel.showAttentiePopup(AttentieOverzichtPanel.java:171) 
at nl.topicuszorg.fks.web.client.dossier.overzichten.documenten.EditFileDocumentPanel$2.onSubmit(EditFileDocumentPanel.java:195) 
at org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:94) 
at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:128) 
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:163) 
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:297) 

有人的想法問題可能是什麼?

的方法showAttentiePopup:

public void showAttentiePopup(AjaxRequestTarget target) { 
     Component content = new EditAttentiePanel(createAttentie.getContentId(), new Attentie(), EditFunctie.AANMAKEN) { 

       /** */ 
       private static final long serialVersionUID = 1L; 

       @Override 
       protected void annuleren(AjaxRequestTarget target) { 

         FKSModalWindow.closeCurrentWindow(target); 
       } 

       @Override 
       protected void opslaan(AjaxRequestTarget target, Attentie attentie) { 
         //Inhoud even weggelaten 
       } 

     }; 

     createAttentie.setOutputMarkupId(true); 
     createAttentie.setInitialWidth(900); 
     createAttentie.setInitialHeight(450); 
     createAttentie.setTitle("Nieuwe Attentie Aanmaken"); 
     createAttentie.setContent(content); 
     createAttentie.show(target);  
    } 

問候, 裏克

回答

0

你的堆棧跟蹤指示ModalWindow createAttentie是不是在你的代碼試圖渲染它的時候頁面的一部分。

跟蹤您的頁面構建邏輯和組件結構,並確保所有內容都正確連接在一起。