0 Replies Latest reply on Mar 6, 2009 5:45 AM by vk101

    Can action in pages.xml execute before param assignment?

      In pages.xml, I use the param subelement of the page element to convert and set the request parameter into the home object's ID. For example, if someone accesses myobject.seam?id=4, then the id 4 would be converted to Integer then assigned to a home object's id attribute:



      <param name="id" value="#{myobjectHome.id}" converterId="javax.faces.Long" />




      The problem is that I also use the action attribute of the page element in pages.xml, but the above assignment doesn't happen before the action method is executed (because that method occurs before navigation to the page). This is causing messy code because I have to manually access the request parameter in the code, convert it, assign it, etc. It also takes away from pages.xml as being an easy place to refer to for all request parameters that are used by the application (because the code here is manually accessing it).


      Is there any straightforward way to get the param assignment to occur before the action method is run? If not, how can I manually trigger that param assignment at the beginning of my action method by calling whatever Seam code was going to do it after navigation to the page?