I'm using an event-scope component as a view controller. I need to have an "init" method on that controller, where I can do authorization checks, load some entities from JPA, etc.
Problem is, if I choose to do that in a @Create method, parameters defined in page.xml are not yet set (via GET). @RequestParameter fields get set, but they are less flexible - can't use them in inner classes of the component, or just somewhere deeper down in a bean path. For example, I can direct name=abc to #{controller.user.name}, but can only use a component-level setter with @RequestParameter.
Is there another way to do an "init" method, where all request parameters are set, then?
Couldn't find a solution, after all. Moving project to Spring MVC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With