Hi,
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:column>
| <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" />
| </h:outputText>
| </h:commandLink>
| </h:panelGrid>
| </h:column>
| </h:dataTable>
This is mapped in faces-config.xml like:
<navigation-rule>
| <navigation-case>
| <from-outcome>update</from-outcome>
| <to-view-id>/index.jsp</to-view-id>
| </navigation-case>
| </navigation-rule>
|
| <managed-bean>
| <managed-bean-name>mainBean</managed-bean-name>
|
<managed-bean-class>com.util.ejb.backing.MainBackingBean</managed-bean-class>
| <managed-bean-scope>session</managed-bean-scope>
| </managed-bean>
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,
Peter
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927516#3927516
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927516
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user