not exactly..you are missing a very important step
Panel replacement=new RightPanel("panel");
panel.replaceWith(replacement);
panel=replacement; <== very important or the second time this is
called it will fail
-igor
On Fri, Nov 11, 2011 at 12:42 PM, <[email protected]> wrote:
> So if you are doing Panel panel = new LeftPanel("panel");
> add(panel);
>
> Then to replace it you can do
> panel.replaceWith(new RightPanel("panel");
>
> If u want to replace through an ajav request make sure you do
> target.add(panel);
> ------Original Message------
> From: pen
> To: [email protected]
> ReplyTo: [email protected]
> Subject: replacing parent panel how to
> Sent: Nov 11, 2011 1:15 PM
>
> Hi All,
>
> I have two panels left and right panels. I have two Ajax links on the left
> panel, page1 and page2. clicking on either of them i can replace the right
> panels.
> But now I have some link on the right panel, I need to replace the whole
> right panel itself, without changing the rest of the page.
> I tried lot of things but didn't work. Any help would be greatly
> appreciated.
>
> `Pen
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/replacing-parent-panel-how-to-tp4032603p4032603.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]