Re: Populate two fields with one value

2007-05-18 Thread Laurie Harper
It didn't work because you're saying 'set this hidden field to the value the user hasn't entered yet': In other words, what that says is 'set the value of the acc.lastName input to the value acc.firstName has when the form is rendered'. The value submitted for acc.lastName would therefo

Re: Populate two fields with one value

2007-05-18 Thread Mansour
Yes, I am going to do this in my action. But out of curiosity, I would like to know how to do this. I tried what you did (in my original post) and didn't work. Ed Griebel wrote: You should probably be doing this in your action class, not your JSP. If it should always be set to acc.firstName,

Re: Populate two fields with one value

2007-05-18 Thread Adam Ruggles
I have to ask... why don't you just set it in the action? public String execute() throws Exception { this.lastName = this.firstName; ... } Mansour wrote: Yes, I do have the correct setters for the Account object. Lance wrote: Do you have the approptriate getters and setters? eg action.

Re: Populate two fields with one value

2007-05-18 Thread Ed Griebel
You should probably be doing this in your action class, not your JSP. If it should always be set to acc.firstName, then you could just hardcode a hidden field: On 5/18/07, Mansour <[EMAIL PROTECTED]> wrote: how to populate 2 fields in my action with one value ? for example I need to populate th

Re: Populate two fields with one value

2007-05-18 Thread Mansour
Yes, I do have the correct setters for the Account object. Lance wrote: Do you have the approptriate getters and setters? eg action.getAcc().setFirstName() action.getAcc().setLastName() Mansour wrote: I tried it. It's not working either. Guillaume Carré wrote: 2007/5/18, Mansour <[EMAIL P

Re: Populate two fields with one value

2007-05-18 Thread Lance
Do you have the approptriate getters and setters? eg action.getAcc().setFirstName() action.getAcc().setLastName() Mansour wrote: I tried it. It's not working either. Guillaume Carré wrote: 2007/5/18, Mansour <[EMAIL PROTECTED]>: how to populate 2 fields in my action with one value ? for exa

Re: Populate two fields with one value

2007-05-18 Thread Dave Newton
--- Mansour <[EMAIL PROTECTED]> wrote: > I tried it. It's not working either. What do you mean, populate two values in your action with one value? Under what circumstances would that population happen? Are you filling out a search form and attempting to search based on what was actually filled ou

Re: Populate two fields with one value

2007-05-18 Thread Mansour
I tried it. It's not working either. Guillaume Carré wrote: 2007/5/18, Mansour <[EMAIL PROTECTED]>: how to populate 2 fields in my action with one value ? for example I need to populate the first name and last name with one value for searching: try this: Search Account -

Re: Populate two fields with one value

2007-05-18 Thread Guillaume Carré
2007/5/18, Mansour <[EMAIL PROTECTED]>: how to populate 2 fields in my action with one value ? for example I need to populate the first name and last name with one value for searching: try this: Search Account -- Guillaume Carré ---