You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/08/31 04:51:42 UTC
T5: Script rewriting
Hi,
I have this in the template:
<script type="text/javascript">
<!--
google_ad_client = "pub-12345";
google_color_border = "FFFFFF";
//-->
</script>
but T5 already arranged it :
<script type="text/javascript">
<!-- google_ad_client = "pub-12345";
google_color_border = "FFFFFF";
// -->
</script>
pulling up the line with 'good_ad_client' one line up in the rendered html,
and the browser will display nothing, any way to stop T5 doing that? Thanks,
A.C.
--
View this message in context: http://www.nabble.com/T5%3A-Script-rewriting-tf4357979.html#a12419844
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] how to get a dynamic localized key value
Posted by 蝈蝈龙 <el...@gmail.com>.
Thanks Nick.
2007/8/31, Nick Westgate <ni...@key-planning.co.jp>:
>
> I know it's a bit painful without OGNL, but we have to make do.
> If you can't do it in the template, call a Java method.
> Something like ...
>
> ${userState}
> ...
>
> @Inject
> private Messages messages;
> ...
>
> String getUserState()
> {
> return messages.get(getUser().getState());
> }
>
> Cheers,
> Nick.
>
>
> Allen Guo wrote:
> > Hi All,
> >
> > I have a question on how to get a dynamic localized key value
> > Below is a scenario
> > [<t:loop source="users" value="_user">
> > ${message:<prop:user.state>}
> > </t:loop>
> >
> > I hope similar codes above can get the localized key from properties
> > file dynamiclly
> > There may be following data in properties file
> >
> > // **_zh_CN.properties
> > california=加利福尼亚
> > indiana=印第安那
> >
> > // **_en_US.properties
> > california=Califonia
> > indiana=Indiana
> >
> >
> > Any ideas?
> >
> > Cheers
> > Guoguo Long
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: [T5] how to get a dynamic localized key value
Posted by Nick Westgate <ni...@key-planning.co.jp>.
I know it's a bit painful without OGNL, but we have to make do.
If you can't do it in the template, call a Java method.
Something like ...
${userState}
...
@Inject
private Messages messages;
...
String getUserState()
{
return messages.get(getUser().getState());
}
Cheers,
Nick.
Allen Guo wrote:
> Hi All,
>
> I have a question on how to get a dynamic localized key value
> Below is a scenario
> [<t:loop source="users" value="_user">
> ${message:<prop:user.state>}
> </t:loop>
>
> I hope similar codes above can get the localized key from properties
> file dynamiclly
> There may be following data in properties file
>
> // **_zh_CN.properties
> california=加利福尼亚
> indiana=印第安那
>
> // **_en_US.properties
> california=Califonia
> indiana=Indiana
>
>
> Any ideas?
>
> Cheers
> Guoguo Long
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
[T5] how to get a dynamic localized key value
Posted by Allen Guo <el...@gmail.com>.
Hi All,
I have a question on how to get a dynamic localized key value
Below is a scenario
[<t:loop source="users" value="_user">
${message:<prop:user.state>}
</t:loop>
I hope similar codes above can get the localized key from properties
file dynamiclly
There may be following data in properties file
// **_zh_CN.properties
california=加利福尼亚
indiana=印第安那
// **_en_US.properties
california=Califonia
indiana=Indiana
Any ideas?
Cheers
Guoguo Long
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Script rewriting
Posted by 蝈蝈龙 <el...@gmail.com>.
2007/8/31, Angelo Chen <an...@yahoo.com.hk>:
>
>
> Hi Nick,
> Thanks, it works!
>
> Nick Westgate wrote:
> >
> > Try
> > <!-- //
> >
> > Cheers,
> > Nick.
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/T5%3A-Script-rewriting-tf4357979.html#a12420152
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: T5: Script rewriting
Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Nick,
Thanks, it works!
Nick Westgate wrote:
>
> Try
> <!-- //
>
> Cheers,
> Nick.
>
>
>
--
View this message in context: http://www.nabble.com/T5%3A-Script-rewriting-tf4357979.html#a12420152
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Script rewriting
Posted by Nick Westgate <ni...@key-planning.co.jp>.
Try
<!-- //
Cheers,
Nick.
Angelo Chen wrote:
> Hi,
>
> I have this in the template:
>
> <script type="text/javascript">
> <!--
> google_ad_client = "pub-12345";
> google_color_border = "FFFFFF";
> //-->
> </script>
>
> but T5 already arranged it :
> <script type="text/javascript">
> <!-- google_ad_client = "pub-12345";
> google_color_border = "FFFFFF";
> // -->
> </script>
>
> pulling up the line with 'good_ad_client' one line up in the rendered html,
> and the browser will display nothing, any way to stop T5 doing that? Thanks,
>
> A.C.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org