You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ruchi <ru...@gmail.com> on 2011/07/02 13:07:19 UTC
replace panel in dialog box
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: replace panel in dialog box
Posted by "pragya.rawal" <pr...@gmail.com>.
Hi,
Any further thoughts on this issue ?
Thanks
-----
Pragya
http://pragyarawal.co.cc
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/replace-panel-in-dialog-box-tp3640377p3843188.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: replace panel in dialog box
Posted by ruchi <ru...@gmail.com>.
thanks i tried it but it still works only 1st time.
i debugged it and im able to see that the blank panel is replaced by the
correct panel but still when it displays the dialog box it shows the
blankPanel.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/replace-panel-in-dialog-box-tp3640377p3641617.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: replace panel in dialog box
Posted by Andrea Del Bene <an...@libero.it>.
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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org