1

I have a composite component on which I have a parameter that I would like to add only depending on an attribute. I've tried to do this but the parameter is always being added.

<cc:interface>
    <cc:attribute name="testParam" default="#{null}"/>
</cc:interface>
<!-- IMPLEMENTATION -->
<cc:implementation>
        <p:commandLink id="nav-link" value="TESTLINK"
                       process="@this"update="@form >
            <f:param id="test1" name="test1" 
               value="#{cc.attrs.testParam}"
               rendered="#{cc.attrs.testParam ne null}"/>
            </p:commandLink>
            <f:param id="test2" name="test2" 
               value="#{cc.attrs.testParam}"
               rendered="#{cc.attrs.testParam eq 'null' ? false : true}"/>
            </p:commandLink>
            <f:param id="test3" name="test3" 
               value="#{cc.attrs.testParam}"
               rendered="#{cc.attrs.testParam ne 'null'}"/>
            </p:commandLink>
    </cc:implementation>

For every case, the parameter is being added with string value 'null'. Any hints?

Thanks!

Rodrigo Martinez
  • 913
  • 3
  • 13
  • 29

0 Answers0