You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by andyandy <la...@yahoo.com> on 2008/11/23 18:07:51 UTC
bean population problem in struts
Hello. I have a problem and have been trying to figure out for several days
now.
I have the following bean structure
Customer
Address
CreditCard
The problem is when the same page must be displayed again with the old data,
due to validation errors from the user. The values of the properties of the
Customer bean are repopulated correctly. The problem comes with the Address
and CreditCard beans, which properties values are initialized for no
apparent reason. These objects do not have null values. Instead
com.myApp.home.beans.AddressBean@5f7d3f
But if I try to get the address.getStreetName(), the value is blank, though
a value was introduced.
I store and retrieve my form bean from the session scope. And the struts
automatic validation is set to false in the struts-config.xml, as I’m doing
it manually.
Can somebody help me telling me what I’m doing wrong? Thanks a lot in
advance!
--
View this message in context: http://www.nabble.com/bean-population-problem-in-struts-tp20648297p20648297.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: bean population problem in struts
Posted by Dave Newton <ne...@yahoo.com>.
--- On Sun, 11/23/08, andyandy wrote:
> I have the following bean structure
> Customer
> Address
> CreditCard
> The problem is when the same page must be displayed again
> with the old data, due to validation errors from the user.
> The values of the properties of the Customer bean are repopulated
> correctly. The problem comes with the Address and CreditCard beans,
> which properties values are initialized for no apparent reason. These
> objects do not have null values. Instead
> com.myApp.home.beans.AddressBean@5f7d3f
> But if I try to get the address.getStreetName(), the value
> is blank, though a value was introduced.
>
> I store and retrieve my form bean from the session scope.
> And the struts automatic validation is set to false in the
> struts-config.xml, as I’m doing it manually.
>
> Can somebody help me telling me what I’m doing wrong?
Without further information it's impossible to help; including details like the actual configuration, form bean code, and so on is kinda helpful.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org