I think it would be useful if the message resolution inside a
wicket:enclosure used the "child" (or implicit child) as the component that
is sent thru the localiser.

This is the scenario

OverviewPanel extends Panel

<wicket:panel>
        <wicket:enclosure child="productsListView">
            <table class="searchResults">
                <thead>
                    <tr><th><wicket:message key="name"/></th></tr>
                </thead>
                <tbody>
                    <tr wicket:id="productsListView">
                        <td> # <wicket:container
wicket:id="name">[name]</wicket:container> </td>
                    </tr>
                </tbody>
            </table>
        </wicket:enclosure>
        <wicket:enclosure child="customersListView">
            <table class="searchResults">
                <thead>
                    <tr>
                        <th><wicket:message key="name"/></th>
                    </tr>
                </thead>
                <tbody>
                    <tr wicket:id="customersListView">
                        <td> # <wicket:container
wicket:id="name">[name]</wicket:container> </td>
                    </tr>
                </tbody>
            </table>
        </wicket:enclosure>
</wicket:panel>

ProductsListView.properties
  name=Product

CustomersListView.properties
  name=Customers

I think what's happening at the moment is the OverviewPanel instance is
passed through to the localiser, and as such, its trying to resolve the
wicket:message tag "name" against the OverviewPanel.

If the child element of the enclosure was sent to the localiser, then it
would make the above example work  (This is a  sensible usecase IMO).

Any missing resources would then try to be resolved against the parent - aka
OverviewPanel.

Any thoughts around this?
-- 
View this message in context: 
http://www.nabble.com/Question-re-wicket%3Aenclosure-tag-and-resource-resolution-with-wicket%3Amessage-tags-tp21008465p21008465.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to