Title: Finding the submitted UICommand in a PhaseListener

I'm writing my own, little optional validation framework. In my first approach I added a <f:param> to a command to mark validation as optional if this command has been submitted.

I am migrating to ADF Faces. The ADF components seem ignore <f:param>s. Thus, I'd like to use <f:attribute>.

Attributes are part of the UIComponent. Thus I need to find out, which UICommand has been submitted.

Does anyone know how to find out which UICommand has been submitted from within a PhaseListener? Basically I have access to the FacesContext and everything it provides.

I know that the UIViewRoot holds the list of events, which, in case of the relevant ActionEvent, have the submitted UICommand  as their source. But I don't know how to reach the list of queued events. They are not part of the API.

I have tried the Decorator Pattern for the UIViewRoot, trying to extend it by a getEvents method, by wrapping the Application and the ViewHandler. Unfortunately this breaks everything. Either the components or the framework must be using instanceof to see, if things are of the expected subclass.

Any suggestions would be appreciated.
Cheers,
Navid

Reply via email to