1 Reply Latest reply on Sep 9, 2008 4:05 PM by Chris Simons

    Can you bind a commandLink action to a ui:param?

    Chris Simons Expert

      I'm trying unsuccessfully to implement a container of possible buttons and their values.

      I want the commandLinks to be based around an image.

      Therefore, I am using a ui:include and sending in several parameters to this template, including an action parameter.  Is this even possible?

      I have been unsuccessful getting the action parameter to be bound successfully to the h:commandLink, like so:

      <h:commandLink action="#{action}">
             <h:graphicImage value="#{theme.imgdir}/data-table/page_white_edit.png"

      Everything looks fine, but when I click the link, I get the following stack trace:

      Caused by: javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /layout/tables/action-edit-button.xhtml @9,35 action="#{action}": /pm/pds/viewPersonalProfile.xhtml @370,84 value="#{userProfileManager.modifyEmergencyContact}": Property 'modifyEmergencyContact' not found on type org.javassist.tmp.java.lang.Object_$$_javassist_7
              at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84)
              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)

      I'd prefer to use some custom EL tags/notation but I've been unsuccessful at getting my project to deploy using this feature.

      If anyone has a better way of accomplish what I'm trying to do, please feel free to show me the way.