Dear Bernd, Gerolf, Nino,

Thanks a lot for your replies: in two minutes I learnt a lot!

For my particular needs, wicket:enclosure is not the perfect solution:
I have several children,

  <wicket:enclosure child='child1'>
    <div wicket:id="child1"></div>
    <div wicket:id="child2"></div>
  </wicket:enclosure>

but using the child='...' syntax, the visibility is coupled to a specific
child while I need child1.visible OR child2.visible OR ... .

So I'll go with Nino's setVisible(false) approach.

Thanks a lot for the feedback! Much appreciated. - Kaspar

On 26.02.2008, at 11:06, Nino Saturnino Martinez Vazquez Wael wrote:

hmm why do it complicated, just create a panel, and if your rules decide it then call setvisible(false)... then no markup will be visible from that component...

Kaspar Fischer wrote:
I have just started looking at Wicket and have a basic question.

My page displays an article with meta-data from the database. I display the meta-data in a box (a <div>...</div>). If no meta-information is present, I don't want the box (the <div>) to appear at all. Is there a generic,
Wicket-style way for achieving this?

I struggle with two things here:

* How to do the conditional markup? (For instance, if the article has no author meta-information, I don't want to show "Authors: " in the box.) * How to avoid empty boxes? (The box component would have to buffer its markup and check, in the end, whether it is nothing but whitespace.)

Thanks for any pointers.
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
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]

Reply via email to