Topic
1 reply Latest Post - ‏2012-08-02T11:50:53Z by SystemAdmin
SystemAdmin
SystemAdmin
6420 Posts
ACCEPTED ANSWER

Pinned topic javax.faces.el.MethodNotFoundException

‏2012-08-02T08:25:13Z |
Hey,

I'm building Faces Portlet project and i faced that problem

Caused by: javax.faces.el.MethodNotFoundException: doLinkMailAction: pagecode.jsp.ContactDetailsView.doLinkMailAction()
at com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:207)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:125)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
... 128 more
In that portlet i have 5-10 sub pages and those all of those pages have button group. it's not a good way to desing navigation of anybutton so i'm decided to make a action class and code everything in it. So in future if something must be change it's easier to change action class so others would changed. But i can't use this class in Portlet Project.

here i just wrote one method in Action class

import pagecode.PageCodeBase;
public class ContactDetailsAction extends PageCodeBase{

public String doLinkMailAction() {
getSessionScope().put("com.ibm.faces.portlet.page.view", "/jsp/contactDetails/ContactEmailAddress.jsp");
return "ContactEmailAddress";
}

}
when this link button clicked it should go to ContactEmailAddress page

and i use this method in here


  • <h:commandLink styleClass="commandLink"id="link1" action="#{contactDetailsAction.doLinkMailAction}">
    <h:outputText id="text2" styleClass="outputText"value="#{msg.cdv_LINK_COMMAND_MAIL_ADRESS}">
    </h:outputText>
    </h:commandLink>


  • Kind Regards,
    Mustafa
Updated on 2012-08-02T11:50:53Z at 2012-08-02T11:50:53Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6420 Posts
    ACCEPTED ANSWER

    Re: javax.faces.el.MethodNotFoundException

    ‏2012-08-02T11:50:53Z  in response to SystemAdmin
    Somehow i found a solution.
    Before using my Action class in portlet project i have to use it in managed bean I tried that. In "Faces Config Editor" i created a Managed Bean and as a class i added my Action class. Then saved it and it works well.