1 Reply Latest reply on Mar 7, 2006 3:21 AM by Peter Jansson

    JSF - commandLink - NoSuchMethodException

    Peter Jansson Newbie


      I'm trying to create a simple web app, but have unfortunately encountered some problems with the commandLink's actionListener. Basically what I want to do is, when a user press a link, getting the page to reload with some new content from the backing bean. All my JSF is rendered as it should, initially, but I get this error message trying to press a link:

      javax.faces.el.EvaluationException: Exception while invoking expression #{mainBean.changeID}
      Caused by: java.lang.NoSuchMethodException: com.util.ejb.backing.MainBackingBean.changeID(javax.faces.event.ActionEvent)

      In my JSP, the code looks as follows:

      <h:dataTable id="history" var="history" value="#{mainBean.history}">
       <h:panelGrid id="historyTimePanel" styleClass="wideColumn">
       <h:commandLink id="reload" action="#{mainBean.update}" actionListener="#{mainBean.changeID}" immediate="true">
       <f:param id="sessionID" name="mainSessionID" value="#{history.id}"/>
       <h:outputText id="historyTimeText" value="#{history.endTask}" rendered="#{mainBean.mainSessionEntity.id != history.id}">
       <f:convertDateTime dateStyle="full" />

      This is mapped in faces-config.xml like:

      And further, this is the relevant part of my MainBackingBean:

      public class MainBackingBean implements ActionListener {
       public void changeID(ActionEvent actionEvent) throws FacesException {
       System.out.println("this time maybe?");
       public String update() {
       return "update";

      The system is set up on JBoss 4.0.4RC1.

      Am all out of ideas trying what seems to be a million different ways to get this to work, without any success... Beginning to suspect a faulty setup somewhere. Any idea or suggestion is highly appreciated!

      Best regards,