<div wicket:id="text"></div>

String text;
if () {
text = ...
} else text = ...

add(new Label("text", text))

if you need different hierarchies (i.e. not just one Label), then use
Panels or Fragments instead

francisco


On Tue, Mar 17, 2009 at 11:21 AM, Ista Pouss <[email protected]> wrote:
> Hi,
>
> What is the best technique to do some "if" "else" and so on with wicket ?
>
> I need a html with something like that (stupid and naïve approch) :
>
> <wicket:if (something = toto)>
>  <div> do this thing</div>
> <wicket:else if (something = foo)>
>  <p><a href="error.html">It's not good</a></p>
> <wicket:else if (something = other)>
>  <div>render other</div>
>
> How to do that with wicket ?
>
> Thanks.
>
> ---------------------------------------------------------------------
> 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