When a user presses the command button on page 1 I wish to execute PrePopulateFields() and then direct the user to that page or redirect the user then call PrePopulateFields(); I'm not fussy so long as the fields displayed are updated.
Can anyone tell me whether this is possible and how to do it.
Thanks in advance Kris. [ June 26, 2008: Message edited by: Bear Bibeault ]
Is the Command Button's action listener in the same Backing Bean as "PrePopulateFields" function? If so, just call the function in the command button's action listener's function. If they are in separate Backing Beans (I don't why it should be), take the instance of the BB from the faces context and execute the function.
I hope I understood the question correctly.
Regards,<br />Joe<br /> <br />"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."<br />--Martin Golding
You can have one backing bean reference another backing bean by using the faces-config file to inject the referenced bean into the referencing bean.
However, if you're expecting to click a button in one web browser window or tab and have the properties updated in another window or tab, that's not possible. JSF is using HTTP and HTTP requires that all responses come back to the same place that the request came from.
Customer surveys are for companies who didn't pay proper attention to begin with.