0 Replies Latest reply on Jun 18, 2009 12:29 AM by slawek t

    seam's <s:link ...> pointing to the JSF site it's located in

    slawek t Novice

      How to get <s:link view="#{what_here}" /> generating link pointing to the same site where it's located?
      I need it to provide language selection for user.

      I've got a view /example.xhtml contains code
      <s:link view="/example.xhtml">
         <f:param name="language" value="#{localeSelector.language}" />

      Generated link is pointing to the same site it's located in but parameter is telling what language is selected and finally there is generated always the same link but parameter is varying.

      In my case I'm using url_rewrite and selected language is part of url, e.g.: http://www.mysite.com/app/en/example and when user selects another language this url is changing to http://www.mysite.com/app/de/example.

      Above JSF code snippet is working but I must always know target view for <s:link .../> .

      Finally I would like to have this <s:link.../> located in header template and generate url pointing to currently loaded site (in other words to itself) with different language parameters only.