I am trying to create a datatable composite component, this component needs to be used by two groups of developers, one who are using Spring web flow
and they need an action
attribute for the command link inside the composite component datatable and the others need the actionListener
attribute.
I would like to use the same xhtml for both cases. Is that feasible?
<composite:attribute name="isWebFlow" />
Would an attribute like above help me configure? The problem is that I have many command links in the datatable composite component and hence I cannot repeat them / render them based on the condition like :
<c:if test="#{cc.attrs.isWebFlow eq 'true'}">
<p:commandLink styleClass="filter #{cc.attrs.styleClass}" action="#{cc.attrs.action}"/>
</c:if>
<c:if test="#{cc.attrs.isWebFlow eq 'false'}">
<p:commandLink styleClass="filter #{cc.attrs.styleClass}" actionListener="#{cc.attrs.actionListener}"/>
</c:if>
Is there any other way to do this and re use the xhtml? Thanks in advance.