I’ve a little experience with JSF and I would like to know the best practice to build a classic crud application with search capabilities. In particular I ‘m in doubt about this last one; I’ve a form where the user type the object id; I’ve all my entities mapped with jpa and the relating facade session bean. But in the jsf page how could I read the parameter, call the finder method and then display the object properties?
Shall I use a servlet that get the object and store it in the request scope and access to that eith JSF EL?
Thank you in advance
You don’t need a servlet. Just inject the session facade / EJB by
@EJBin managed bean and call it in the bean action method and then display it the usual JSF/EL way in the result page.View:
Model: