Hi,

on click of link try to replace your code with this one:

WebMarkupContainer tmp = new ModifyAATemplate("modifyAATemplatePanel", aat);
modifyPanel.replaceWith(tmp);
modifyPanel = tmp;
tmp.setOutputMarkupId(true);

target.addComponent(modifyDialog);
modifyDialog.open(target);




Hi,

im trying to replace panels inside a dialog box, but it wroks only first
time.
i have a page which contains a dialog box, when i initially create the page
i put a blank panel inside the dialog box, the page also has one link on
click of which i want to replace the panel inside the dialog box.
1st time it works but when i again click on the link it shows the blank
panel inside the dislog box.

pls let me know wat im doing wrong, here's the code snippet:

Dialog modifyDialog = new Dialog("modifyDialogPanel");
modifyDialog.setCssClass("noTitleDialog");
                modifyDialog.setModal(true).setWidth(850).setHeight(475)
                                .setOutputMarkupId(true).setMarkupId("modify");
                modifyDialog.setAutoOpen(false);
                modifyPanel = new BlankAdminPanel("modifyAATemplatePanel");
                modifyDialog.add(modifyPanel);

on click of link i do:

WebMarkupContainer tmp = new ModifyAATemplate("modifyAATemplatePanel", aat);
                                        modifyPanel.replaceWith(tmp);
                                        modifyPanel = tmp;
                                        tmp.setOutputMarkupId(true);
                                        target.addComponent(tmp);

                                        modifyDialog.remove(modifyPanel);
                                        modifyDialog.add(tmp);
                                        
target.addComponent(modifyDialog.setOutputMarkupId(true));
                                        
                                        modifyDialog.open(target);


thanks in advance

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/replace-panel-in-dialog-box-tp3640377p3640377.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to