You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Radek Terber <te...@b2bcentrum.cz> on 2009/08/17 11:21:56 UTC

How to pass message's parameters in template

Hi all.

Is there any way how to pass parameter to message directly in TML file ?

For example:
I have component Example1 (resides in "Example1.java") and in it's 
"Example1.tml" is something like this:
============================
in Example1.tml is
------------------------------------------
<div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" >
...
${message:any-message-text-requires-parameter}
...

</div>
------------------------------------------
============================
in "Example1.properties" is
------------------------------------------
any-message-text-requires-parameter=Any text which "%s" here requires 
parameter
------------------------------------------

And now, I would like pass the "%s" value directly in TML file (to avoid 
divide those text to two or more fragments).
I know possibility to prepare entire message in JAVA class, but it is 
more coding, more getters ...

Thanks.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to pass message's parameters in template

Posted by Olle Hallin <ol...@gmail.com>.
Yes there is, in the Chenille Kit.

See http://www.chenillekit.org/chenillekit-tapestry/messageformatbinding.html

Olle


2009/8/17 Radek Terber <te...@b2bcentrum.cz>:
> Hi all.
>
> Is there any way how to pass parameter to message directly in TML file ?
>
> For example:
> I have component Example1 (resides in "Example1.java") and in it's
> "Example1.tml" is something like this:
> ============================
> in Example1.tml is
> ------------------------------------------
> <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" >
> ...
> ${message:any-message-text-requires-parameter}
> ...
>
> </div>
> ------------------------------------------
> ============================
> in "Example1.properties" is
> ------------------------------------------
> any-message-text-requires-parameter=Any text which "%s" here requires
> parameter
> ------------------------------------------
>
> And now, I would like pass the "%s" value directly in TML file (to avoid
> divide those text to two or more fragments).
> I know possibility to prepare entire message in JAVA class, but it is more
> coding, more getters ...
>
> Thanks.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Olle Hallin
Senior Java Developer and Architect
olle.hallin@crisp.se
www.crisp.se

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org