• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

when I click Button in JSF I want to Perform some action

when I click Button in JSF I want to Perform some action
0
Manikandan Thiagarajan
Asked:
Manikandan Thiagarajan
1 Solution
 
a_bCommented:
What is the code that you have so far for the button can you post that?
0
 
Pramod KumarCommented:
Below is the very basic example to handle button action in JSF
http://myfaces.apache.org/jsfintro.html
0
 
a_bCommented:
Basic example -

 <h:commandButton value="Click Me" action="mybackingBean.myaction" />

myaction is the action in your backing bean (mybackingbean) used for the page
0
 
Manikandan ThiagarajanSenior consultantAuthor Commented:
give me one example

when i click button it would perform some action
0
 
darkappleCommented:
Here is a simple tutorial
http://www.roseindia.net/jsf/commandButton.shtml


Remember that if you are calling an action method in managed bean, it should return a String.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now