So my question is, can I in the rendered method get the calling component
from FacesContext?

No you can't

I can't figure out what you are doing though. The renderer has access
to the component and thus the attributes of that component. Why do you
need the faces context to give you the component when you already have
access to it? Are you trying to get a reference for use in EL? If so
that is not easy (I have tried, and have not found an adequate
solution)

Perhaps you can create a dummy component to surround the components
you want to access:

<my:captureComponent var="mycomponent">
</my:captureComponent>

Then in the decode, validate, update, encodeBegin, encodeChildren and
encodeEnd, you add that variable to the variable mapper (dataTable
does this with it's "var" attribute, so you can look at that code for
an example). Then at the end of that method set it back to what it was
before (push and pop a stack), that way it works for nested usage.

Then evaluating "#{mycomponent}" as a value binding will give you that component

Reply via email to