Hello,

I want to add menus (as in a menu bar with drop-down menus) on my pages.
In order to achieve that, I must use a nested RepeatingView (see further
down for the explanation). What I need (and don't know how to do) is to be
able to have markup like this:

        <ul class="web-menu">
                <li wicket:id="menuBarChoices">
                        <ul>
                                <li wicket:id="menuBarChoiceItems"></li>
                        </ul>
                </li>
        </ul>

In my code, I would use RepeatingView to generate a number of list-items (menuBarChoices) which would be rendered as a menu bar. In addition I would need to create a NESTED RepeatingView per each of the "menuBarChoices", to generate a number of list-items (menuBarChoiceItems). These would be rendered as a drop-down menu when the user hovers over the respective menu bar choice.

I tried to do that, but Wicket catches my attempt to nest the RepeatingView components and politely explains that the "outer" component "discard" its content, therefore the nested "embedded" component can no longer be used for dynamic content. The message is as follows:

"Last cause: Expected close tag for '<li wicket:id="menuBarChoices">' Possible attempt to embed component(s) '<li wicket:id="menuBarChoiceItems">' in the body of this component which discards its body."

Ultimately, I need Wicket to produce something like this:

<ul class="web-menu">
        <li>
                Menu1
                <ul>
                        <li>Menu Subitem 1</li>
                        <li>Menu Subitem 2</li>
                </ul>

        </li>
        <li>
                Menu2
                <ul>
                        <li>Menu Subitem 1</li>
                        <li>Menu Subitem 2</li>
                </ul>
        </li>
</ul>

How do I go about doing that?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to