Ok, then just check component has a parent in your getinputfor, just to
be sure. If the parent is correct, maybe, i said maybe, it's because you
are using jsp (if am not wrong, in jsp, during first rendering, the
parsing of jsp and rendering of component is done at the same time, that
mean you render your label when inputtext does not yet exist, thought i
am not certain of behaviour of JSF in jsp, this part is very tricky)

PS: if there is a parent, try to dump recursively it's children tree in
a console, it might be helpfull in debuging (and takes only a few lines
of code).
 
En l'instant précis du 12/21/06 12:00, Josué Alcalde González
s'exprimait dans toute sa noblesse:
> El jue, 21-12-2006 a las 11:54 +0100, David Delbecq escribió:
>   
>> When exactly do you call getInputFor()? During rendering process?
>> (encodeBegin()/encondEnd())
>> according to specs, findComponent will not work properly if your Label
>> is not yet attached to it's parent NamingContainer. (form in you case),
>> so i would suggest to check for getInputFor only in renderer.
>>     
>
>   
>>     
>
> I am calling it in the method:
> "encodeBeforeEnd" in my custom renderer.
> it is a helper method in HtmlLabelRenderer which is called just before
> writing the end element of the label.
>
>
>   

Reply via email to