Why do encodeXxx methods in UIComponent accept FacesContext parameter?

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2010-04-26T11:38:14Z Indexed on 2010/04/26 11:53 UTC
Read the original article Hit count: 247

Filed under:
|
|

I haven't ever before created custom components in JSF so I've noticed only now that methods like encodeBegin(), encodeEnd() etc accept FacesContext parameter.

FacesContext instance can usually be received with FacesContext.getCurrentInstance().

So, I wonder whether these methods have FacesContext parameter just for convenience or some different objects can be passed there (maybe from external resources..). If the latter is possible then could you give an example pls.

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf