Pich a écrit : >> The renderer has access to the component and thus the attributes of that >> > component. > > This is what I want to do. How do I have accecss to the component and its > attribute in the code of the rendered method? And remember that I do not use > one component binding for each component. I have a Map<UICompontent> that I > have all components in. How do I know which one, perhaps out of 10 > components, is calling the rendered attribute? > > Best regards > > Pichdude > Hi,
i think you have a big design issue. You are mixing the value binding of the rendered attribute (which is a method use to know if a component need to be rendered depending on "the state of a given bean"), whith what andrew told you which is related on the "renderer" (the renderer has access to current component because it's passed as a parameter). I think, in you case, as you already have component bindings in a map, just create another Map for the rendered attribute. JSF by itself do not write somewhere the "current component". However, as andrew suggested, the datatable store the current index and current value in a request scoped bean so that inner component can use it, maybe you can create your own component bases on this code. However, as said, rendered attribute should be linked to a bean status, not the current component, otherwise that would mean you would mix view logic and buisness logic...

