Re: string-binding problem
Christian Sell <[email protected]> Wed, 15 Jan 2003 18:10:17 +0100
| Newsgroups | gmane.comp.java.tapestry.devel |
|---|---|
| Message-ID | <[email protected]> |
could somebody confirm that the issue described below is a bug? Should I
enter it into the bug tracker?
As it turns out, the only way to get around this is to change the
application design to be like the workbench demo, where after changing
the locale the user is directed to another page. If instead you want to
redisplay the same page, it will not show the new localization.
regards
Christian Sell wrote:
> to answer my question regarding a workaround:
>
> I tried this:
>
> <binding name="value" expression='getString("message")'/>
>
> this forced the binding to be evaluated every time - BUT:
>
> The string table for the component is created lazily based on the
> current locale and cached afterward. It is NOT recreated if the locale
> changes, and therefore wrong if the same component is reused in a
> subsequent request. See method AbstractComponent.getString(String key).
>
> it seems I cannot proceed without hacking tapestry - or redesigning my app
>
> Christian
>
> Christian Sell wrote:
>
>> Hello,
>>
>> On one of my pages, I am using an Insert component with a
>> string-binding parameter. On the same page, I have a form with a
>> Select component which allows setting the Locale. After setting the
>> locale, the same page is redisplayed.
>>
>> Now it turns out that when the locale is set, the Insert element does
>> not change its appearance according to the new locale. Only after
>> visiting another page and returning to the previous one, the new
>> localized string is shown.
>>
>> I went to the source code and discovered that string-bindings are only
>> evaluated once when the component is first created - in method
>> ParameterManager.setup(IRequestCycle cycle). It seems that when the
>> same page is redisplayed after changing the locale, this does not happen.
>>
>> I consider this a bug. My suggestion is that
>> StringBinding.isInvariant() should return false, and not true as is
>> currently the case.
>>
>> objections? Or is there a workaround?
>>
>> Christian
>>
>>
>>
>> -------------------------------------------------------
>> This SF.NET email is sponsored by: FREE SSL Guide from Thawte
>> are you planning your Web Server Security? Click here to get a FREE
>> Thawte SSL guide and find the answers to all your SSL security issues.
>> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
>> _______________________________________________
>> Tapestry-developer mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>>
>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by: Take your first step towards giving
> your online business a competitive advantage. Test-drive a Thawte SSL
> certificate - our easy online guide will show you how. Click here to get
> started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
> _______________________________________________
> Tapestry-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>
-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en