I have a PayrollAction class that extends BaseAction which has an id field.
PayrollAction also contains a bean that contains an id field. The id fields
are the Hibernate PKs. My BaseAction
extends ActionSupport implements SessionAware, ModelDriven, Preparable. I
have carefully observed the following behavior. When a request is made of
PayrollAction with a parameter id=20, the following jsp displays 20 for both
fields:
payrollUpdate.id: <s:property value="payrollUpdate.id" /><br>
id: <s:property value="id" /><br>
If I set a breakpoint and change the id in the bean inside PayrollAction,
both fields display the updated value! It is as though id and
payrollUpdate.id are the same! My PayrollAction class has a
getPayrollUpdate() method that returns the PayrollUpdate bean. This seems
very strange.
On 6/24/07, Dave Newton <[EMAIL PROTECTED]> wrote:
--- [EMAIL PROTECTED] wrote:
> If I call an action with an id=20 parameter and that
> action contains both a field called id and a bean
> that contains an id field, both fields are being set
> to 20. Does the parameter "setter" logic set
> everything on the action object hierarchy that it
can
> find with the same name?
I don't think so; that could take an indeterminate
amount of time.
I just wrote an Action with a Long id field and an
object that has a Long id field; if I pass in an id=5
just the Action's id field gets set. If I implement
ModelDriven then just the object's id field is set.
Are you using the default stack?
d.
____________________________________________________________________________________
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Scott
[EMAIL PROTECTED]