Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 5034 invoked from network); 11 Apr 2008 05:58:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Apr 2008 05:58:10 -0000 Received: (qmail 15662 invoked by uid 500); 11 Apr 2008 05:58:08 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 15625 invoked by uid 500); 11 Apr 2008 05:58:08 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 15614 invoked by uid 99); 11 Apr 2008 05:58:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Apr 2008 22:58:08 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [66.249.82.228] (HELO wx-out-0506.google.com) (66.249.82.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 05:57:26 +0000 Received: by wx-out-0506.google.com with SMTP id s14so384722wxc.26 for ; Thu, 10 Apr 2008 22:57:37 -0700 (PDT) Received: by 10.70.47.1 with SMTP id u1mr346052wxu.51.1207893457835; Thu, 10 Apr 2008 22:57:37 -0700 (PDT) Received: by 10.70.16.2 with HTTP; Thu, 10 Apr 2008 22:57:37 -0700 (PDT) Message-ID: <436d9a250804102257q49ab2bdfsfe42ec200895dcaa@mail.gmail.com> Date: Fri, 11 Apr 2008 15:57:37 +1000 From: "Don Brown" To: "Struts Developers List" Subject: Re: i18n/TextProvider issues In-Reply-To: <47FEFBC3.2090105@blueskyminds.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47FEFBC3.2090105@blueskyminds.com.au> X-Virus-Checked: Checked by ClamAV on apache.org Sounds good. Are there any performance implications? Don On Fri, Apr 11, 2008 at 3:48 PM, Jeromy Evans 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