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

Posted on 2011-10-20
Last Modified: 2013-11-24
when I click Button in JSF I want to Perform some action
Question by:stmani2005
    LVL 20

    Expert Comment

    What is the code that you have so far for the button can you post that?
    LVL 10

    Expert Comment

    by:Pramod Kumar
    Below is the very basic example to handle button action in JSF
    LVL 20

    Expert Comment

    Basic example -

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

    myaction is the action in your backing bean (mybackingbean) used for the page
    LVL 8

    Author Comment

    give me one example

    when i click button it would perform some action
    LVL 9

    Accepted Solution

    Here is a simple tutorial

    Remember that if you are calling an action method in managed bean, it should return a String.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
    Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    This video teaches viewers about errors in exception handling.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now