Reply To: java.lang.IllegalStateException: PhaseBinding does not support retrieval

Splash Forums Rewrite Users java.lang.IllegalStateException: PhaseBinding does not support retrieval Reply To: java.lang.IllegalStateException: PhaseBinding does not support retrieval

#24670

@Oswald:

Thank you very much for your suggestion. I also thought about this in the last days. Actually I like the idea of some kind of auto-detection regarding the deferral. I think this is possible.

My thoughts on the implementation:

Currently the ParameterHandler writes the binding to the context and then the DeferredHandler wraps it and puts it back into the context. The ParameterHandle is then able to use this wrapped binding. The current implementation isn’t very nice IMHO.

One idea would be to define an SPI which the ParameterHandler uses to allow other modules to wrap bindings and operations. The JSF implementation of the SPI could then decide whether deferral is necessary or not. Either by checking for the @Deferred annotation (for backwards compatibility) or by checking the annotations on the class to identify JSF managed beans.

Essentially this would mean that @Deferred isn’t processed by an annotation handler any more. Instead there would be a “binding/operation wrapper SPI”.