The problem you're facing is clear - and you're right - wicket:enclosure
won't work for you.  Unfortunately, that closed-tag code for the placeholder
is hard-coded in Component.

Hmmm....  Could you instead have a wrapping component inside of your TR and
use that for the visibility swap?  That's the only thing I can think of at
this point.  Or don't use TR - use div's, etc, which may only work depending
on what you're trying to do, and not for grid-style display.

Sorry I couldn't be more help here.

On Mon, Jan 26, 2009 at 7:08 AM, the_adam <[email protected]>wrote:

>
>
> Thies Edeling-2 wrote:
> >
> > That's exactly what wicket:enclosure does; otherwise you'd have to wrap
> > the
> > row in a WebMarkupContainer to keep a reference in the DOM.
> >
>
> I know the benefits of wicket:enclosure. What I need, however is a
> placeholder, which is what wicket:enclosure doesn't provide (instead it
> removes it's entire body along with self when the specified child is not
> visible). This makes it impossible to show a component after the page has
> been rendered without it. The whole problem is even explicily stated on the
> page that Pills linked to:
>
> "Note: Changing the visibility of a child component in Ajax callback method
> will not affect the entire enclosure but just the child component itself.
> This is because only the child component is added
> to the AjaxRequestTarget." - though as far as I know even this is
> misleading
> since you can't show even a child of something that is not visible.
>
> Feel free to prove me wrong on this, but to shut down the subject of
> wicket:enclosure regarding my case, I am rendering more than one row using
> a
> repeater (repeater's body is the tr) and I want to be able to AJAXly switch
> the visibility of some of those on and off. This excludes wicket:enclosure
> from possible solutions.
>
> If the problem I'm facing isn't clearing enough let me know, I will try to
> rephrase.
> --
> View this message in context:
> http://www.nabble.com/Wicket-placeholder-for-%3Ctr%3E-component-causing-invalid-markup-tp21663544p21665137.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


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

Reply via email to