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.