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

#24625

0swald
Participant

Hi Christian,
yes, I do understand how difficult it was create annotations for all cases, especially in such a zoo of JSF and CDI beans, I was thinking of it too, and here is my proposal:

1. The Rewrite engine checks the bean annotation (CDI or JSF)
2. If it’s JSF then the engine automatically creates all the actions and bindings as deferred after the RESTORE_VIEW phase.
3. If the user wants to fine-tune the phase, then he uses a stand-alone @Phase(before=, after=) annotation or something like that.

As for class inheritance, the only thing you could do is to get rid of the action and parameter annotation handlers and start examining the bean class via reflection as I did in my AbstractClassHandler<A extends Annotation>. This approach isn’t flawless – when examining the class you should already know all the method- or field-level annotations you might encounter in the class. And even worse – all other non-class-level enriching annotation handlers become to no use.

PS: and yes, I do actively use view-scoped beans when it comes to ajaxfied page, there’s no CDI equivalent for such cases.

  • This reply was modified 8 years, 5 months ago by  0swald.