• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF pass parameters onclick

 
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic