i do not think this is the irght way to go. the nesting is:

<wicket:panel>
       <wicket:enclosure child="productsListView">
                   <wicket:message key="name"/></th></tr>

so clearly the key is owned by the panel. these are the rules for
wicket:message. keep in mind the tag is a convinience and so we try to
keep it as simple as possible. you can always add a label that uses
whatever you want as the localizer.

-igor

On Sun, Dec 14, 2008 at 9:23 PM, Ned Collyer <[email protected]> wrote:
>
> 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]
>
>

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

Reply via email to