Oh, now I think I got your point... I don't know how wicket treats markup
internally, I could expect some markup substitution on the "attribute
wicket:message='summary:myResource' " by "summary='This table....'"

In fact, I have tried using another tag, without any child Wicket Component

<input type="text" wicket:message="title:myresource"></input>

And Wicket is treating it correctly...

<input type="text" wicket:message="Test Title"></input>

Thanks,
Xavier


2010/4/28 Igor Vaynberg <igor.vaynb...@gmail.com>

> i meant where do you expect the localized message to be rendered into?
> if wicket:message is attached to the table tag?
>
> -igor
>
> On Wed, Apr 28, 2010 at 9:52 AM, Xavier López <xavil...@gmail.com> wrote:
> > Hi, I'd expect it to lie in the ContainerComponent's folder, assuming
> > ContainerComponent is the the Page or Panel associated with that
> markup...
> > In other words, getString("myresource") from that component would find
> it.
> >
> > Does this have something to do with that error ?
> >
> > Thanks,
> > Xavier
> >
> > 2010/4/28 Igor Vaynberg <igor.vaynb...@gmail.com>
> >
> >> when you have markup like:
> >>
> >> <table wicket:message="summary:myresource">
> >> > <tr><td><span wicket:id="myComponent"></span></td></tr>
> >> > </table>
> >>
> >> where do you expect your localized message to go?
> >>
> >> -igor
> >>
> >> On Wed, Apr 28, 2010 at 2:51 AM, Xavier López <xavil...@gmail.com>
> wrote:
> >> > Hi,
> >> >
> >> > I have just bumped into a particular situation, I think I know what's
> >> > happening but I'd like to share and, if possible, have it confirmed
> here.
> >> > Additionally, some info on this subject could be added to the wiki
> page
> >> >
> >>
> https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Attributewicket:message
> >> >
> >> > In a regular <table> html tag (wicket:id-less), I'd like to have a
> >> > wicket:message attribute (for the 'summary' attribute) in order to
> take
> >> > advantage from wicket's localization mechanism. Under this tag, I have
> a
> >> > number of wicket components. My surprise came when I found the
> following
> >> > error:
> >> >
> >> > <table wicket:message="summary:myresource">
> >> >> <tr><td><span wicket:id="myComponent"></span></td></tr>
> >> >> </table>
> >> >>
> >> >> org.apache.wicket.markup.MarkupException: Unable to find component
> with
> >> id
> >> >> 'myComponent' in [MarkupContainer [Component id =
> _message_attr_303]].
> >> This
> >> >> means that you declared wicket:id=myComponentin your markup, but that
> >> you
> >> >> either did not add the component to your page at all, or that the
> >> hierarchy
> >> >> does not match.
> >> >>
> >> >
> >> >
> >> > The first suspicious thig I noticed here was the "_message_attr_303"
> in
> >> the
> >> > component hierarchy. Digging through the code, I found in
> >> > WicketMessageTagHandler that this id is given to components with
> >> > wicket:message attributes and without wicket:id's.
> >> >
> >> > So, maybe what's happening here is that the <table> tag is being
> assigned
> >> a
> >> > wicket:id and Wicket expects me to add 'myComponent' to the
> automatically
> >> > generated _message_attr_303... Should it be fixed by modelling the
> >> <table>
> >> > tag with a webmarkupcontainer and adding 'myComponent' to it ?
> >> >
> >> > Cheers,
> >> > Xavier
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
"Klein bottle for rent--inquire within."

Reply via email to