Accessing Path-parameters

Splash Forums Rewrite Users Accessing Path-parameters

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25018

    Epic
    Participant

    Hello,

    I have a simple URL pattern <pattern value=”/c/#{Post.community}” /> but the path-parameters are not being populated in the bean variables at the constructor or init phase. I’m new to JSF, so I believe that the problem is that the values are not populated at this phase of the JSF cycle, but can someone let me know how to populate the values at this phase, since I will be using the values to populate the page content. I am currently using the workaround of extracting the values from FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(“community”);

    I’m posting to Rewrite because I’m using rewrite-servlet with rewrite-config-prettyfaces.

    Thanks!

    #25019

    You typically have to do such initialization work in a “page action”. This method will be executed on each request (with or without postbacks) and AFTER all path parameters have been injected into your beans.

    See:

    http://ocpsoft.org/docs/prettyfaces/3.3.3/en-US/html/Configuration.html#config.actions

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.