Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6159061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:04:05+00:00 2026-05-23T21:04:05+00:00

I am using JSF, richfaces 4 stuff and i want to call a bean

  • 0

I am using JSF, richfaces 4 stuff and i want to call a bean method when javascript function trigger.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:04:06+00:00Added an answer on May 23, 2026 at 9:04 pm

    You can use <a4j:jsFunction> , which allows you to perform Ajax requests to invoke the bean method directly from JavaScript code , and the response can be returned in a JSON format to use in a client JavaScript calls.

    Please note that <a4j:jsFunction> is required to be inside a <h:form> .
    For example, you define the a4j:jsFunction likes this :

    <h:form> 
        <a4j:jsFunction name="myJsFunction"  action="#{bean.someAction}" reRender="xxxxx"/>
     </h:form>
    

    A javascript function which name called myJsFunction() is created and it will invoke someAction() on the bean when being called.

    For example , in your javascript function :

    <script type="text/javascript">
    function yourJavaScriptFuntion() {
        ..............;
        myJsFunction();  //bean.someAction() will invoke here
        ..............;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Richfaces JSF and I want to iterate over an Map<Object,Object> . I
I'd like to be able to make an Ajax call using JSF/Seam/RichFaces and have
I am using java 6 jsf 1.2 and richfaces 3.3.3 When I call the
I want to perform the following task using JSF / Richfaces On click of
I am developing simple application using JSF with richfaces. I want to upload folder(select
I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many
I'm using JSF (Mojarra 1.2) with Richfaces (3.3.2) within some facelets which are used
Using Richfaces 3.3.0GA, jsf 1.2_14 and facelets. I have a richfaces ModalPanel with an
How do I connect to the database(MYSQL) in connection bean using JSF to retrieve
I'm using JSF 1.2 with Richfaces, and for every ajax request, the server is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.