Problem med JSP commandLink tag
Hej.Jeg har en dataTable med et commandLink tag.
<h:dataTable value="#{applicationScopeData.trainings}" rows="10" var="temp" rowClasses="list-row-odd,list-row-even" width="100%" binding="#{sessionScopeData.trainingData3}">
.
.
.
<h:column> <h:commandLink action="#{sessionScopeData.trainingParticipants}" > <h:outputText value="Detaljer" />
</h:commandLink>
</h:column>
.
.
.
</h:dataTable>
Når jeg skriver koden i eclipse, kan den selv foreslå metoden den skal bruge. Men når jeg trykker på linket kommer denne fejlmeddelelse:
02-08-2007 00:43:19 com.sun.faces.lifecycle.InvokeApplicationPhase execute
SEVERE: #{sessionScopeData.trainingParticipants}: javax.faces.el.MethodNotFoundException: trainingParticipants: model.SessionScopeData.trainingParticipants()
javax.faces.FacesException: #{sessionScopeData.trainingParticipants}: javax.faces.el.MethodNotFoundException: trainingParticipants: model.SessionScopeData.trainingParticipants()
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIData.broadcast(UIData.java:657)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Metoden den kalder:
public String getTrainingParticipants(){
selectedTraining = (Training) trainingData3.getRowData();
return "trainingDetails";
}
Et udpluk fra faces-config:
<navigation-rule>
<from-view-id>/pages/training.jsp</from-view-id>
<navigation-case>
<from-action>#{sessionScopeData.trainingParticipants}</from-action>
<from-outcome>trainingDetails</from-outcome>
<to-view-id>/pages/trainingDetails.jsp</to-view-id>
</navigation-case>
</navigation-rule>
Er der nogen der lige kan gennemskue den?
På forhånd tak.
Christoffer