You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by st...@gmail.com on 2007/03/22 19:24:31 UTC
Model getter misfiring
I discovered something strange today after adding logging to my domain
classes. If I have the following text field on my web page:
<s:textfield name="user.zip.city" label="%{getText('
user.zip.city')}"size="40" readonly="true" />
the Zip is being requested from User twice! If I change my field to:
<s:textfield name="user.zip.city" label="City" size="40"
readonly="true" />
it is called once! Of course I get no text from the property file
either!!! Why would getText() need to consult with the domain object? This
might explain some of the performance issues.
--
Scott
stanlick@gmail.com
Re: Model getter misfiring
Posted by st...@gmail.com.
This looks like a much better form! I'll try it once I get booted up and
let you know.
Scott
On 3/23/07, Ted Husted <hu...@apache.org> wrote:
>
> What happens if the new (and preferred) key form is used instead?
>
> <s:textfield key="user.zip.city" readonly="true" />
>
> -T.
>
>
> On 3/22/07, stanlick@gmail.com <st...@gmail.com> wrote:
> > I discovered something strange today after adding logging to my domain
> > classes. If I have the following text field on my web page:
> >
> > <s:textfield name="user.zip.city" label="%{getText('
> > user.zip.city')}"size="40" readonly="true" />
> >
> > the Zip is being requested from User twice! If I change my field to:
> >
> > <s:textfield name="user.zip.city" label="City" size="40"
> > readonly="true" />
> >
> > it is called once! Of course I get no text from the property file
> > either!!! Why would getText() need to consult with the domain
> object? This
> > might explain some of the performance issues.
> >
> > --
> > Scott
> > stanlick@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Scott
stanlick@gmail.com
Re: Model getter misfiring
Posted by Ted Husted <hu...@apache.org>.
What happens if the new (and preferred) key form is used instead?
<s:textfield key="user.zip.city" readonly="true" />
-T.
On 3/22/07, stanlick@gmail.com <st...@gmail.com> wrote:
> I discovered something strange today after adding logging to my domain
> classes. If I have the following text field on my web page:
>
> <s:textfield name="user.zip.city" label="%{getText('
> user.zip.city')}"size="40" readonly="true" />
>
> the Zip is being requested from User twice! If I change my field to:
>
> <s:textfield name="user.zip.city" label="City" size="40"
> readonly="true" />
>
> it is called once! Of course I get no text from the property file
> either!!! Why would getText() need to consult with the domain object? This
> might explain some of the performance issues.
>
> --
> Scott
> stanlick@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org