In Sun's own Java EE5 tutorial it says that when developing JSF components that have no children you should implement encodeEnd rather than encodeBegin:

"The UIComponentBase class defines a set of methods for rendering markup: encodeBegin, encodeChildren, and encodeEnd. If the component has child components, you might need to use more than one of these methods to render the component; otherwise, all rendering should be done in encodeEnd"

I have developed a couple of custom UI Components for MyFaces and when they don't have children I have used encodeBegin, which according to the above quote is not right. Does anyone know why using encodeEnd would be more correct / customary?

Randahl


Reply via email to