You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ivoneta <ie...@gmail.com> on 2010/05/24 17:33:31 UTC

AjaxRequestTarget + add component

Hi.

I have two panels inside a webPage.
In the first Panel I have a form with a ajax button. When I submitted de
form the two panels should be replace and target.
 
In the code I replace the firstPanel, them I add to te target this: 
target.addComponent(panel);
I do the same for the second panel.
So, I have two "target.addComponent(panel)"; , and I get an error (Null
pointer exception).

I wonder if it's not possible have two  "target.addComponent(panel)" in the
same place?




-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-add-component-tp2228735p2228735.html
Sent from the Wicket - User 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: AjaxRequestTarget + add component

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Mon, May 24, 2010 at 10:33 AM, Ivoneta <ie...@gmail.com> wrote:

>
> Hi.
>
> I have two panels inside a webPage.
> In the first Panel I have a form with a ajax button. When I submitted de
> form the two panels should be replace and target.
>
> In the code I replace the firstPanel, them I add to te target this:
> target.addComponent(panel);
> I do the same for the second panel.
> So, I have two "target.addComponent(panel)"; , and I get an error (Null
> pointer exception).
>
> I wonder if it's not possible have two  "target.addComponent(panel)" in the
> same place?
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-add-component-tp2228735p2228735.html
> Sent from the Wicket - User 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
>
>
Please post the NPE stack trace, as well as what version of Wicket you are
using.  It would be good to post the code from your ajax button, too.

-- 
Jeremy Thomerson
http://www.wickettraining.com