On 10/28/07, Brill Pappin <[EMAIL PROTECTED]> wrote:
> I'm porting an app written in Ruby on Rails as a spike on how Wicket works.
> I've run into an issue I'm not sure how to handle.
>
> I have the case of a message box near the top of the screen that's in a
> conditional block... here is the ruby code to demonstrate:
> <% if @flash[:notice] %>
>         <div id="flash_notice_wrapper"><%= @flash[:notice] %></div>
> <% end %>
>
> (fyi, flash in this context is not Flash, but a "flash message")
>
> I get the part of wicket were I can attach a component to the div element,
> but what I really want is the div to not be there if it's not needed.
> Is there any way to actually remove the div if I don't need it in the
> content?
> Is there a "non-html" wicket tag I haven't found yet for adding a
> placeholder instead of the div?

You attach that component to the div element and you do
setVisible(false) or override isVisible to let it return false when
you don't want to the div. Additionally, if you have markup around a
component you like to hide with the component, you can use
<wicket:enclosure>

Eelco

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

Reply via email to