Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Model getter misfiring

stanlick

2007-03-22

Replies:

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@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.