Entries tagged with "jsf"
Using forceId with facelets
Recently JSF project that I am working on was shifted from JSP to facelets.
It was really easy task, but nevertheless several problems arose during migration. One of them – using forceId with some myfaces components. The problem is that facelets uses JSF component classes as beans, but forceId is not a java property of tomahawk components. Instead it is passed as JSF attribute and this is handled somewhere is JSP tag classes that are not used by facelets. Of course this can be solved by writing custom TagHandler (analogous of JSP Tag class), but it would be too much work – write TagHandler for every myfaces component.
Much easier solution exists – use f:attribute like this:
<t:outputText id="myd" value="#{bean.property}">
<f:attribute name="forceId" value="true"/>
</t:outputText>
Posted by ksh on May 22, 2006 | 2 comments | development, java, jsf