The logic thing would be to add the class to the div:
<div wicket:id="menu" class="menuBar"></div>

However i can see your point of adding it to <wicket:panel> if you
want to enforce it on all menu's. Sure would be nice if wicket could
automatically transfer anything extra it finds there to the actual
element, but then what would be the behavior if setRenderbodyOnly was
used, they would effectively bypass your enforced css style.
So imo using a div in <wicket:panel> to do this, optionally in
combination with setRenderbodyOnly to get rid of the empty <div
wicket:id="menu"> is the best way to go if you want to force this kind
of stuff.

Maurice

On Thu, Mar 6, 2008 at 9:28 AM, Erik van Oosten <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I recently tried the following in a panel's markup:
>
>     <div wicket:id="menu"></div>
>
>     add(new MenuPanel("menu"));
>
>  and in MenuPanel.html:
>
>     <wicket:panel class="menuBar">  ...   </wicket:panel>
>
>  Unfortunately the "class" attribute was not put in the result. It was
>  even silently ignored!
>
>  WDYT, is this desired behavior?
>
>
>  FYI, this is my workaround:
>
>     <wicket:container wicket:id="menu"></wicket:container>
>
>     add(new MenuPanel("menu"));
>
>  and in MenuPanel.html:
>
>     <wicket:panel>
>        <div class="menuBar">  ...  </div>
>     </wicket:panel>
>
>
>
>
>  Regards,
>     Erik.
>
>
>  --
>  Erik van Oosten
>  http://day-to-day-stuff.blogspot.com/
>
>  ---------------------------------------------------------------------
>  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