Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Thijs
Revisiting this. I'm still having some troubles with this. Say I have: Label a; add(a = Label(...) { onConfigure(){setVisible(*false due to some condition*)}}); a.setOutputMarkupId(true); add(new AjaxLink(..){ onClick(AjaxRequestTarget t){t.add(a);} }; In this case the debug window will

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Martin Grigorov
Hi, On Wed, Oct 17, 2012 at 9:27 AM, Thijs vonk.th...@gmail.com wrote: Revisiting this. I'm still having some troubles with this. Say I have: Label a; add(a = Label(...) { onConfigure(){setVisible(*false due to some condition*)}}); a.setOutputMarkupId(true); add(new AjaxLink(..){

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Thijs
On 17-10-2012 9:40, Martin Grigorov wrote: Hi, On Wed, Oct 17, 2012 at 9:27 AM, Thijs vonk.th...@gmail.com wrote: Revisiting this. I'm still having some troubles with this. Say I have: Label a; add(a = Label(...) { onConfigure(){setVisible(*false due to some condition*)}});

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Bas Gooren
Thijs, We've been working with wicket for a number of years now, and yes, we have two rules (that feel very natural after those years...): - Do I need to replace this component over AJAX: call setOutputMarkupId(true) - Idem, but can the component itself be hidden (usually quite visible as

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Martin Grigorov
On Wed, Oct 17, 2012 at 9:52 AM, Thijs vonk.th...@gmail.com wrote: On 17-10-2012 9:40, Martin Grigorov wrote: Hi, On Wed, Oct 17, 2012 at 9:27 AM, Thijs vonk.th...@gmail.com wrote: Revisiting this. I'm still having some troubles with this. Say I have: Label a; add(a = Label(...) {

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Thijs
Thanks Bas and Martin, I'll have to update company rules then ;-) Thijs On 17-10-2012 9:56, Bas Gooren wrote: Thijs, We've been working with wicket for a number of years now, and yes, we have two rules (that feel very natural after those years...): - Do I need to replace this component

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Bas Gooren
And to add to this: make sure you call setOutputMarkupPlaceholderTag(true) before you render the (possibly invisible) component for the first time. Suppose your component is hidden (setVisible(false)) on the first render. If you now call setOutputMarkupPlaceholderTag(true) in the ajax request

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Thijs
Yes I know. This is something we just silently ignored over the last years, as it was not affecting any functionality. But now with the red flashing debug window it's getting annoying. (So some good has come from that ) And we were wondering if what we did was actually wrong ;) Thijs On

Re: Add an invisible component to an AjaxRequestTarget target

2012-10-17 Thread Martin Grigorov
On Wed, Oct 17, 2012 at 10:11 AM, Thijs vonk.th...@gmail.com wrote: Yes I know. This is something we just silently ignored over the last years, as it was not affecting any functionality. But now with the red flashing debug window it's getting annoying. (So some good has come from that ) And

Add an invisible component to an AjaxRequestTarget target

2012-09-06 Thread Thijs Vonk
Hi, We have partial page updates all over a page. So panels and components all over the place that need Ajax updates. We're using an Interface on those components and with an IVisitor we traverse the component tree and add every component to the target that has this interface. But during

Re: Add an invisible component to an AjaxRequestTarget target

2012-09-06 Thread Igor Vaynberg
isVisibleInHierarchy() will make sure all parents are visible as well -igor On Thu, Sep 6, 2012 at 1:27 PM, Thijs Vonk vonk.th...@gmail.com wrote: Hi, We have partial page updates all over a page. So panels and components all over the place that need Ajax updates. We're using an Interface

Re: Add an invisible component to an AjaxRequestTarget target

2012-09-06 Thread Thijs Vonk
OK thnx will give it a try On 6/9/12 22:39, Igor Vaynberg wrote: isVisibleInHierarchy() will make sure all parents are visible as well -igor On Thu, Sep 6, 2012 at 1:27 PM, Thijs Vonk vonk.th...@gmail.com wrote: Hi, We have partial page updates all over a page. So panels and components all