Alright, I looked at the source and it is creating a value binding for it. But in my phaselistener I call the getValue(facesContext) on the value binding it returns null.
Any solutions? Shawn -----Original Message----- From: Garner, Shawn Sent: Tuesday, April 17, 2007 3:05 PM To: 'MyFaces Discussion' Cc: '[EMAIL PROTECTED]' Subject: RE: f:attribute in phaselistener component.getAttributes().containsKey("fieldRef") returns false Is there any way to fix this to get the attribute? Shawn -----Original Message----- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 3:18 PM To: MyFaces Discussion Subject: Re: f:attribute in phaselistener Garner, Shawn wrote: > I upgraded to 1.1.5 and now my phase listener can no longer get my > f:attribute attribute on a component (eg: <h:inputText>). > > I iterate over the client IDs with messages by doing > FacesContext.getClientIdsWithMessages(); > > I get the component by UIViewRoot.findComponent(clientID) and then try > to get the attribute by String fieldRef = > component.getAttributes().get("fieldRef"); > > It worked before I upgraded. There was a change to f:attribute in 1.1.5; before then it would evaluate its expression on first view and store the result on the target component. From 1.1.5 it stores the EL-expression on the target component and evaluates it each time. However the attribute should still be present. Maybe it is there but evaluating to null at the time you make the call? Try component.getAttributes().containsKey("fieldRef") to see if the entry is there.. Regards, Simon