You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by lucast <lu...@hotmail.com> on 2015/06/02 17:52:00 UTC

Panels not refreshing when calling AjaxRequestTarget.add(), only in production mode

Dear Forum,
On a form which is inside a modal window, I have an ajax checkbox where if I
tick the box, I display a number of panels and if the checkbox is not
ticked, I hide said panels.

The functionality works well on development mode and does not work at all on
deployment mode.

I call 
FormComponentPanel.setVisible( True/False ); and then,

AjaxRequestTarget.add( FormComponentPanel );

Has anyone experienced anything similar where ajax works on development mode
but not on deployment mode?


Thanks in advance,
Lucas


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panels-not-refreshing-when-calling-AjaxRequestTarget-add-only-in-production-mode-tp4671035.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: Panels not refreshing when calling AjaxRequestTarget.add(), only in production mode

Posted by Martin Grigorov <mg...@apache.org>.
Usually you should use a <div>.
If you know that this component cannot have children with block HTML
elements then you can use <span> too.
Read about block vs inline HTML elements in the web.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jun 3, 2015 at 3:55 PM, lucast <lu...@hotmail.com> wrote:

> Hi Martin,
> Thank you for your reply.
>
> Yes, you're absolutely right.
>
> I use: *<wicket:container wicket:id="emptyPanel" />* and it is pretty much
> how I add panels in the HTML code.
>
> What should I use instead, div, span, anything else?
>
> Thank you very much for pointing this out. I have been racking my brain for
> almost 5 days in total!!!
>
> Kind regards,
> Lucas
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Panels-not-refreshing-when-calling-AjaxRequestTarget-add-only-in-production-mode-tp4671035p4671044.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: Panels not refreshing when calling AjaxRequestTarget.add(), only in production mode

Posted by lucast <lu...@hotmail.com>.
Hi Martin,
Thank you for your reply.

Yes, you're absolutely right. 

I use: *<wicket:container wicket:id="emptyPanel" />* and it is pretty much
how I add panels in the HTML code.

What should I use instead, div, span, anything else?

Thank you very much for pointing this out. I have been racking my brain for
almost 5 days in total!!!

Kind regards,
Lucas

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panels-not-refreshing-when-calling-AjaxRequestTarget-add-only-in-production-mode-tp4671035p4671044.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: Panels not refreshing when calling AjaxRequestTarget.add(), only in production mode

Posted by Martin Grigorov <mg...@apache.org>.
My guess is that you use <wicket:container wicket:id=""> for something that
you update with Ajax.
You should see WARNs in the logs about it even in DEV mode.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jun 3, 2015 at 3:40 PM, lucast <lu...@hotmail.com> wrote:

> Hi Sven,
> Thank you for your reply.
>
> Yes, I call formComponentPanel#setOutputMarkupPlaceholderTag(true) on all
> elements involved with the AjaxRequestTarget.
>
> I'm still trying to get to the bottom of this.
>
> What I am baffled about is why it doesn't work on production mode when it
> works without any problems in development mode.
>
> when on production mode, on firebug, I get the following error:
>
> *Wicket.Ajax: Wicket.Ajax.Call.processComponent: Component with id [[id29]]
> was not found while trying to perform markup update. Make sure you called
> component.setOutputMarkupId(true) on the component whose markup you are
> trying to update.*
>
> I have called setOutputMarkupPlaceholderTag(true) on the panel I am adding
> to AjaxRequestTarget.
>
> So the question is, has anyone experienced that a panel is refreshed when
> running a wicket app in development mode, and that the panel is not
> refreshed when running a wicket app in production mode?
>
> Thanks, once more,
> Lucas
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Panels-not-refreshing-when-calling-AjaxRequestTarget-add-only-in-production-mode-tp4671035p4671041.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: Panels not refreshing when calling AjaxRequestTarget.add(), only in production mode

Posted by lucast <lu...@hotmail.com>.
Hi Sven,
Thank you for your reply.

Yes, I call formComponentPanel#setOutputMarkupPlaceholderTag(true) on all
elements involved with the AjaxRequestTarget.

I'm still trying to get to the bottom of this.

What I am baffled about is why it doesn't work on production mode when it
works without any problems in development mode.

when on production mode, on firebug, I get the following error:

*Wicket.Ajax: Wicket.Ajax.Call.processComponent: Component with id [[id29]]
was not found while trying to perform markup update. Make sure you called
component.setOutputMarkupId(true) on the component whose markup you are
trying to update.*

I have called setOutputMarkupPlaceholderTag(true) on the panel I am adding
to AjaxRequestTarget.

So the question is, has anyone experienced that a panel is refreshed when
running a wicket app in development mode, and that the panel is not
refreshed when running a wicket app in production mode?

Thanks, once more,
Lucas

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panels-not-refreshing-when-calling-AjaxRequestTarget-add-only-in-production-mode-tp4671035p4671041.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: Panels not refreshing when calling AjaxRequestTarget.add(), only in production mode

Posted by Sven Meier <sv...@meiers.net>.
Do you call formComponentPanel#setOutputMarkupPlaceholderTag(true)?

Sven


On 02.06.2015 17:52, lucast wrote:
> Dear Forum,
> On a form which is inside a modal window, I have an ajax checkbox where if I
> tick the box, I display a number of panels and if the checkbox is not
> ticked, I hide said panels.
>
> The functionality works well on development mode and does not work at all on
> deployment mode.
>
> I call
> FormComponentPanel.setVisible( True/False ); and then,
>
> AjaxRequestTarget.add( FormComponentPanel );
>
> Has anyone experienced anything similar where ajax works on development mode
> but not on deployment mode?
>
>
> Thanks in advance,
> Lucas
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Panels-not-refreshing-when-calling-AjaxRequestTarget-add-only-in-production-mode-tp4671035.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