| Author |
JSF pass parameters onclick
|
Himalay Majumdar
Ranch Hand
Joined: Sep 28, 2008
Posts: 324
|
|
Hi all,
I am trying to set a bean value when the button is click, by passing the parameters as setCurrentStatementId(statement.statementId). The parameter statement.statementId is basically intended to call a getter method in statement value object. Can anyone advise me if this is the correct way.
Many thanks.
-Himalay
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14572
|
|
No it isn't. An "action=" attribute isn't a function call or logic expression, it's the specification of the name of an action processor that is to be invoked. The action processor is a public method that take NO arguments and returns a String.
Action processors get their "parameters" from the backing beans. These properties are set as part of the JSF lifecycle when the data that to be set has passed validation. Normally an action is fired as part of a form submit process, so this is the same basic thing as having a form processor get called where the form's fields have been stored into backing beans.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: JSF pass parameters onclick
|
|
|