Hello Bruno,
> Unfortunately I see that the parameters ${viewSize} and ${listSize} are
not
> rendered as expected but the whole string is displayed as it appears in
the
> UiLabel.xml file.

${viewSize} and ${listSize} means that we should put this values in the
screen context first then this will be available in the UiLabel.xml
file.Suppose you are preparing context in the *Screens.xml then you should
write down something like this :-

<set field="viewSize" value="2"/>
<set field="listSize" value="2"/>

Or if you would like to put this values in the *.bsh file that is included
in your *Screens.xml file then you should write down the following code.

context.put("viewSize","2");
context.put("listSize","2");

If you are keeping your values in the parameters then you should read the
values from the parameters map inside your UiLabel.xml file.
In this case you will read by ${parameters.viewSize} &
${parameters.listSize}
For example :-
<set field="parameters.viewSize" value="2"/>
<set field="parameters.listSize" value="2"/>

& while putting the values in *.bsh

parameters.put("viewSize","2");
parameters.put("listSize","2");

You should notice that in the screen definition all the Decorator comes
after setting this context values and decorator includes(set) the values
from Property Files.So all the values kept in the context(either in
parameters or context map) will be available in those *UiLabel.xml files.

And for the localization thing I agree from the Scott's comment.
So I think I am safe on that point :-)

Please let us know if you still have some more question.

--
Ashish


On Sun, Jun 29, 2008 at 2:25 PM, Scott Gray <[EMAIL PROTECTED]> wrote:

> Hi Bruno
>
> I think you're looking for something like this:
> UtilProperties.getMessage(resource,
> "AccountingAdditionalShippingChargeForShipment",
> UtilMisc.toMap("shipmentId", shipmentId), locale);
>
> Regard
>
> 2008/6/29 Bruno Busco <[EMAIL PROTECTED]>:
>
> > Hi,
> > I am trying to add the following UiLabel that includes some parameters
> >
> >    <property key="ProductOnlyShowingFirstN">
> >        <value xml:lang="en">NOTE: Only showing the first ${viewSize} of
> > ${listSize} products. To view the rest, use the Products tab for this
> > category.</value>
> >        <value xml:lang="it">NOTA: Sono elencati solo ${viewSize} di
> > ${listSize} prodotti. Per visualizzare gli altri, usa il pannello
> Prodotti
> > di questa categoria.</value>
> >    </property>
> >
> > I would like to use it in miniproductlist.ftl to replace an english
> > constant
> > text.
> > Unfortunately I see that the parameters ${viewSize} and ${listSize} are
> not
> > rendered as expected but the whole string is displayed as it appears in
> the
> > UiLabel.xml file.
> >
> > What is the correct way to display parametrized labels?
> >
> > Many thanks,
> > Bruno
> >
>

Reply via email to