java - Primefaces sources jsf -
i've downloaded primefaces sources see if can learn them. jar contains bunch of java classes use writers handle rendering etc. expecting find .xhtml files with
<ui:composition> ... </ui:composition> , <cc:interface> etc etc
anyway got me thinking, there way write facelets , composite components or wrote in xhtml files compiled them java classes? sorry if question absurd new jsf.
template files , composite components enduser's convenience because it's easy write , use them. basic jsf implementation (the f:
, h:
components) , component libraries primefaces use fullworthy ui components. classes extend jsf uicomponent
class.
development of uicomponent
classes relatively complex , clumsy. you've got take lot of things account when developing them, such writing tag files (you've define every attribute in xml file), configuration files (link component , renderer each other), etc, end more modular , reuseable model , better efficiency. useable on plain old jsp files.
facelets templates unlike jsp files not compiled java classes. they're loaded , executed sax (xml) parser written in java.
update per comment: in general perform tad better if there relatively lot of business/conditional logic involved in no way related view, such heap of <c:if>
, <c:choose>
etc tags based on non-user-controlled input.
the book jsf 2.0 complete reference covers custom uicomponent development in chapter 10 "noncomposite components". java ee 5 tutorial covers well, it's targeted on jsf 1.2. it's unfortunately not in java ee 6 tutorial jsf 2, although technique has not changed, there several new annotations need know about.
Comments
Post a Comment