aspose file tools
The moose likes JSF and the fly likes JSF pass parameters onclick Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSF pass parameters onclick" Watch "JSF pass parameters onclick" New topic
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
    
    7

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF pass parameters onclick
 
Similar Threads
Parameter , Pass by REF
Coding Tricks
out of memory error
Doubt Regarding PreparedStatement
Pls give me solution to solve "String literal too long" problem: