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 8711851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:59:12+00:00 2026-06-13T04:59:12+00:00

I started study RichFaces 4.2.2 and have a problem in simple example, I have

  • 0

I started study RichFaces 4.2.2 and have a problem in simple example, I have an xml:

<ui:define name="content">       
        <h:form>
            <rich:panel style="width: 50%">
                <h:panelGrid columns="2">
                    <h:outputText value="Name:"/>
                    <h:inputText id="inp" value="#{echoBean.name}">
                        <a4j:ajax event="keyup" render="echo count"  listener="#{echoBean.countListener}"/>
                    </h:inputText>

                    <h:outputText value="Echo:"/>
                    <h:outputText id="echo" value="#{echoBean.name}"/>

                    <h:outputText value="Count:"/>
                    <h:outputText id="count" value="#{echoBean.count}"/>
                </h:panelGrid>
                <a4j:commandButton value="Submit" actionListener="#{echoBean.countListener}" render="echo, count"/>
            </rich:panel>
        </h:form>

</ui:define>

and a simple bean:

@Component("echoBean")
@Scope(value = "session")
public class EchoBean {
private String name;
private Integer count = 0;

//getter setter methods here

public void countListener(ActionEvent event) {
    count++;
    }
}

And when i try to print in inputText i have exception:

Caused by: javax.el.MethodNotFoundException: /home.xhtml @35,112 listener="#{echoBean.countListener}": Method not found: com.example.training.bean.EchoBean@d523fa.countListener()
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:102)
at org.ajax4jsf.component.behavior.MethodExpressionAjaxBehaviorListener.processAjaxBehavior(MethodExpressionAjaxBehaviorListener.java:71)
at javax.faces.event.AjaxBehaviorEvent.processListener(AjaxBehaviorEvent.java:113)
at javax.faces.component.behavior.BehaviorBase.broadcast(BehaviorBase.java:98)
at org.ajax4jsf.component.behavior.AjaxBehavior.broadcast(AjaxBehavior.java:348)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:763)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
... 19 more

But why? With button this same listener works just fine and in docs for “listener” parameter in a4j:ajax it says that:

The expression must evaluate to a public method that takes an ActionEvent parameter, with a return type of void, or to a public method that takes no arguments with a return type of void

Why it uses countListener() without ActionEvent parameter? I don’t get it.

  • 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-06-13T04:59:14+00:00Added an answer on June 13, 2026 at 4:59 am

    For you to be able to use the listener attribute with RF4, your listener method should take an argument of the AjaxBehaviorEvent type, not an ActionEvent type. The other alternative approach as you can see from the error message is to define a standard java method that doesn’t take arguments and has a void return type as in

       public void countListener();
    

    Why it uses countListener() without ActionEvent parameter? I don’t get it.

    That’s the contract for the API, you’re required to conform to be able to use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started to study Three20 and I have a simple question about TT_RELEASE_SAFELY
My name's Ali, I have just started two units of study with the Open
Started practicing with XML and C# and I have an error message of There
I just started study of class and object in php. I have a very
I just started to study the android so im asking such a simple question.
I have just started a feasibility study on Django for my company and I
I have started to study GUI applications programming based on XLib directly and I
Lately I have started to study Prolog , as soon as I've dealt with
I have just started to study computer sciences at my university where they teach
Premise: I've started to study javascript and the DOM and I have this HTML

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.