myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: trinidad outputFormat and f:param support
Date Tue, 04 Sep 2007 05:25:13 GMT
BTW, for all of these examples, you should just use tr:outputText
instead of tr:outputFormatted.

outputFormatted really has nothing to do with "outputFormat".
What tr:outputFormatted gives you is support for (a subset of)
HTML formatting without opening the security hole of
escape="false".

-- Adam



On 8/30/07, Andrew Robinson <andrew.rw.robinson@gmail.com> wrote:
> Well you could do:
>
> <tr:outputFormatted value="#{myfunc:format2(str, arg1, arg2)}" />
>
> where you could write format1, format2, etc. EL functions to do the work.
>
> You could also do:
>
> <t:buffer into="#{formattedString}">
> <h:outputFormat value="#{message.key}">
>   <f:param value="param1" />
> </h:outputFormat>
> </t:buffer>
>
> <tr:outputFormatted value="#{formattedString}" />
>
> On 8/30/07, Paul Mander <paul.mander@chordiant.com> wrote:
> >
> >
> >
> > Andrew Robinson-5 wrote:
> > >
> > > Well, that is not localizable
> > >
> > > I think the use case that he means is more like:
> > >
> > > <tr:outputFormatted value="#{messages.str}">
> > > <f:param value="#{myarg}" />
> > > </tr:outputFormatted>
> > >
> > > messages.properties
> > > str = Test {0} param
> > >
> > >
> >
> > That's a better example.
> >
> > --
> > View this message in context: http://www.nabble.com/trinidad-outputFormat-and-f%3Aparam-support-tf4347417.html#a12401317
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
>

Mime
View raw message