I have been using JSF + RF for over 2 years and have'nt had a chance to extend the existing capabilities of components.
Now the requirement is I have to trim the string and display it if it is more than 25 characters.
This has been achieved as below
<c:choose>
<c:when test="#{fn:length(teststep.name) > 25}">
<h:outputText title="#{teststep.name}" value="#{fn:substring(teststep.name, 0, 25)}..."/>
</c:when>
<c:otherwise>
<h:outputText title="#{teststep.name}" value="#{teststep.name}"/>
</c:otherwise>
</c:choose>
But I use this code in lot many places (and want to avoid boilerplate code of 8 lines everytime) so thought of custom h:outputText to provide trim functionality.
Could you let me know how would I write a custom tag in JSF
Regards, Satya