Seam component initialization parameter after request parameters is set

I am using the scope-scope component as a view controller. I need the "init" method on this controller, where I can perform authorization checks, load some objects from JPA, etc.

The problem is that if I decided to do this in the method @Create, the parameters defined in page.xmlare not yet set (via GET). Fields @RequestParameterare set, but they are less flexible - they cannot be used in the inner classes of a component or simply somewhere deeper in the bean path. For example, I can direct name=abcin #{controller.user.name}, but can only use the component level installer with @RequestParameter.

Is there any other way to make the "init" method where all request parameters are set?

+3
source share
2 answers

Could not find a solution in the end. Moving a project to Spring MVC.

+2
source

Maybe you can try this in u page.xml

<param name="xxx" value="#{component.xxx}"/>
<action execute="#{component.init}"/>
0
source

Source: https://habr.com/ru/post/1774174/


All Articles