Hi Tim,
2008/3/11, Tim Stephenson <[EMAIL PROTECTED]>:
> Thanks Volker
>
> Does this mean it never will or it would be a reasonable enhancement
feel free to add a enhancement request at jira.
> request? If the first does that mean i should always use the jsf core / html
> tags?
Did jsf core / html support this? I didn't know that.
>
> Obviously a more complex example would have the {0} in the middle of the
> resource string
>
You could create very complex value bindings :-)
We have something like this, and more complex ones in one app:
value="#{bundle.editUser}#{empty controller.user ? '' : ' ( '}#{empty
controller.user ? '' : controller.user.name}#{empty controller.user ?
'' : ' ) '}"
But i like the idea of formating such values/labels with MessageFormat
and params.
Regards,
Volker
> tim
>
> On 11/03/2008, Volker Weber <[EMAIL PROTECTED]> wrote:
> > Hi Tim,
> >
> > tobago resourceBundle did not support argument formating.
> >
> > in your case you can concatenate the two values into a single
> valueBinding:
> >
> > <tc:out value="#{bundle.title} #{bean.name}" />
> >
> >
> > Regards,
> > Volker
> >
> >
> > 2008/3/10, Tim Stephenson <[EMAIL PROTECTED]>:
> >
> > > Hi,
> > >
> > > I have loaded a resource bundle using
> > > <tc:loadBundle basename="messages" var="bundle" />
> > > and can output messages from the bundle like this:
> > > <tc:out value="#{bundle.title}" />
> > > where the relevant line of the resource bundle props file is
> > > title = Welcome
> > > which is all fine. But how can i substitute values into the resource
> > > bundle message?
> > >
> > > I tried putting this in the props file
> > > title = Welcome {0}
> > > and this into the jsp:
> > > <tc:out value="#{bundle.title}">
> > > <f:param value="#{bean.name}"></f:param>
> > > </tc:out>
> > > following the examples of JSF core, but apparently the tc control does
> > > not understand the param as I just see Welcome {0} output without any
> > > substitution.
> > >
> > > Is there some other way to achieve this for Tobago resource bundles?
> > >
> > > thanks in advance
> > >
> > >
> > > --
> > > Tim Stephenson
> > > e: [EMAIL PROTECTED]
> > >
> >
> >
> >
> > --
> > inexso - information exchange solutions GmbH
> > Bismarckstraße 13 | 26122 Oldenburg
> > Tel.: +49 441 4082 356 |
> > FAX: +49 441 4082 355 | www.inexso.de
> >
>
>
>
> --
> Tim Stephenson
> e: [EMAIL PROTECTED]
--
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de