Why 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:43 UTC
Read the original article Hit count: 339

Filed under:
|
|

I haven't ever before created custom component in jsf so I've noticed it 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