Re: Parameter interception

2007-06-26 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
> Hey Dave, to you care to comment?

Sure; might as well earn my pay today.

Oh, wait.

>> Do you know what the code would look like to get
the
>> id off the action?

AFAIK ModelDriven just pushes the model on to the top
of the stack, so the easiest would be to use the OGNL
stack notation: "[1].id"

d.



   

Choose the right car based on your needs.  Check out Yahoo! Autos new Car 
Finder tool.
http://autos.yahoo.com/carfinder/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Parameter interception

2007-06-26 Thread stanlick

Hey Dave, to you care to comment?

On 6/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Alright!  Now we are getting somewhere.  Do you know what the code would
look like to get the id off the action?

Scott

On 6/25/07, Dave Newton < [EMAIL PROTECTED]> wrote:
>
> --- [EMAIL PROTECTED] wrote:
> > 
> > 
>
> If you've implemented ModelDriven and it's returning
> the payrollUpdate, then this would be expected
> behavior: ModelDriven puts the model on the stack so
> its properties are available w/o prefixing.
>
> d.
>
>
>
>
> 

>
> Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
> mail, news, photos & more.
> http://mobile.yahoo.com/go?refer=1GNXIC
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Scott
[EMAIL PROTECTED]





--
Scott
[EMAIL PROTECTED]


Re: Parameter interception

2007-06-25 Thread stanlick

Alright!  Now we are getting somewhere.  Do you know what the code would
look like to get the id off the action?

Scott

On 6/25/07, Dave Newton <[EMAIL PROTECTED]> wrote:


--- [EMAIL PROTECTED] wrote:
> 
> 

If you've implemented ModelDriven and it's returning
the payrollUpdate, then this would be expected
behavior: ModelDriven puts the model on the stack so
its properties are available w/o prefixing.

d.






Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
news, photos & more.
http://mobile.yahoo.com/go?refer=1GNXIC

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Scott
[EMAIL PROTECTED]


Re: Parameter interception

2007-06-25 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
> 
> 

If you've implemented ModelDriven and it's returning
the payrollUpdate, then this would be expected
behavior: ModelDriven puts the model on the stack so
its properties are available w/o prefixing.

d.



   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Parameter interception

2007-06-25 Thread stanlick

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: 
   id: 

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]


Re: Parameter interception

2007-06-24 Thread Dave Newton
--- [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]



Parameter interception

2007-06-24 Thread stanlick

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?

--
Scott
[EMAIL PROTECTED]