title: Retrieve the fragment (hash) from a URL and inject the values into the bean
body: <p>I am looking for a way to inject values from the fragment (#) of a URL into bean(JSF), in the same way query-parameter values are injected. I am using Ben Alman's Bookmarkable jQuery plugin (<a href="http://benalman.com/projects/jquery-bbq-plugin/" rel="noreferrer">http://benalman.com/projects/jquery-bbq-plugin/</a>) to create the URL fragments. I was hoping that Custom regex patterns from prettyFaces could be a way to solve my problem but until now I have been unsuccessful.</p>
  
  <p>(<a href="http://ocpsoft.com/docs/prettyfaces/snapshot/en-US/html_single/#config.pathparams.regex" rel="noreferrer">http://ocpsoft.com/docs/prettyfaces/snapshot/en-US/html_single/#config.pathparams.regext</a>) </p>
  
  <p><strong>I would like to define here my situation and if any one has an idea, i
  would love to try them out.</strong></p>
  
  <p>I am using<br>
   RichFaces: 3.3.3,<br>
   Spring: 3.0.2.RELEASE,<br>
    Hibernate: 3.5.3-Final,<br>
    JSF: 2.0.2-FCS,<br>
    PrettyFaces: 3.0.1</p>
  
  <p>The web application generates, following kind of URL where parameters
  are listed after a hash(#). The idea is to have an ajax based
  Bookmarkable URL. So every time I click on an element that changes the
  state of the system, the value is sent to the server via ajax and the
  URL after the hash is rewritten. There can be 1 to 3 parameters after
  the hash, the number of parameters are optional.</p>
  
  <p>My goal is, when the user bookmarks the URL (with hash) and than
  revisits the saved page, the page should inject the correct values
  into the system and visualize the page in the previous state (like
  query-parameter).</p>
  
  <p>Below, I have a regular expression that would catch all the parameters
  after the hash.  </p>
  
  <pre><code>//URL:   
  http://localhost:8080/nymphaea/workspace/#node=b48dd073-145c-4eb6-9ae0-e1d8ba90303c&amp;lod=75e63fcd-f94a-49f5-b0a7-69f34d4e63d7&amp;ln=en
  
  //Regular Expression:    
  \#(\w*\=(\w{8}-\w{4}-\w{4}-\w{4}-\w{12}))|\&amp;(\w*\=(\w{8}-\w{4}-\w{4}-\w{4}-\w{12}))|\&amp;(\w*\=\w{2})
  </code></pre>
  
  <p>I know there are websites that some how send the URL fragment into there server side logic,</p>
  
  <ul>
  <li><a href="http://maps.yahoo.com/#mvt=m&amp;lat=36.952736&amp;lon=-95.84758&amp;zoom=11&amp;tt=starbucks&amp;tp=1&amp;ioride=us" rel="noreferrer">http://maps.yahoo.com/#mvt=m&amp;lat=36.952736&amp;lon=-95.84758&amp;zoom=11&amp;tt=starbucks&amp;tp=1&amp;ioride=us</a></li>
  <li><a href="http://www.cbc.ca/video/#/Shows/Death_Comes_to_Town/ID=1365210427" rel="noreferrer">http://www.cbc.ca/video/#/Shows/Death_Comes_to_Town/ID=1365210427</a></li>
  </ul>
  
  <p><strong>Is there anyway to inject values from the URL fragments into server side beans?</strong></p>