0 Replies Latest reply on Jun 12, 2009 1:32 PM by Osian Hughes

    Extending Seam JSF components

    Osian Hughes Newbie


      I have a situation where I need to extend some of the core JSF seam components, primarily s:link, because I need to create an image button which supports the s:link due to conversation traversing.

      Before pageflows and conversation, I managed to do this through facelet components, but due to the way that seam evaluates the EL string given, it can't evaluate parameters being passed into a facelet, hence the need to create a proper JSF component for it.

      Here is a sample facelet doing what I need to do:

           <ui:param name="actionButton" value="#{actionButton}"/>
           <ui:param name="disabled" value="#{disabled}"/>
           <s:link rendered="#{actionButton.seam}" action="#{actionButton.notifyOfSelection}" style="text-decoration: none;" disabled="#{actionButton.disabled or disabled}" >
                     visible="#{not actionButton.hidden}" 
                     style="border: 0; padding: 2px;" 

      And a sample usage:

           <medComp:actionButton actionButton="#{mediationFlowSearch.performSearch}"/>

      But when this is used, Seam complains that it can't evaluate 'actionButton', i.e. it is null, whereas when I use the same concept but using commandLink instead, it works without any problems.

      I think this is something to do with phases.

      Does anyone have any experience with extending the Seam JSF library, or any advice on how to approach this, i.e. do I need to extend s:link, or can this be acheived another way?