struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown" <mr...@twdata.org>
Subject Re: i18n/TextProvider issues
Date Fri, 11 Apr 2008 05:57:37 GMT
Sounds good.  Are there any performance implications?

Don

On Fri, Apr 11, 2008 at 3:48 PM, Jeromy Evans
<jeromy.evans@blueskyminds.com.au> wrote:
> I've been investigating some i18n issues in the 2.1.x branch and found that
> the search algorithm used by the Text tag differs from that of UIBean.
>  The Text tag iterates through the ValueStack looking for the first
> TextProvider and invokes getText(...) on the first found.
>  The UIBean executes the OGNL expression "getText(String)", which matches
> this method of the first TextProvider.
>
>  This works almost all the time, but I have two issues with it:
>  - the inconsistent search algorithm causes inconsistent behaviour when
> there's something unexpected in the stack
> (https://issues.apache.org/struts/browse/WW-2539)
>  - the OGNL expression is slow
> (https://issues.apache.org/struts/browse/WW-1681) and fragile
> (https://issues.apache.org/struts/browse/WW-2511)
>
>  I'm going to remove the hardcoded OGNL expressions from UIBean and Label
> and replace them with the same algorithm used by Text.  I would have
> proceeded without saying so but I also discovered that the TestAction used
> by the unit tests relies on getText being invoked directly by OGNL rather
> than its TextProvider implementation, so the consequences may be larger that
> I first imagined.
>
>  Please speak up if you see any potential issues.
>
>  regards,
>  Jeromy Evans
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>  For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message