8 Replies Latest reply on Jan 22, 2008 12:05 PM by alllle

    Redirect and GET parameters

    amorfis

      Hi,

      There is page in my application with list of articles. I want to put there also links to articles, but I want to use redirect, for user to bookmark article page. Unfortunately I have problems putting this parameter into URL.

      In pages.xml I have something like this:

      <page view-id="/home.jsp">
       <navigation>
       <rule if-outcome="viewArticle">
       <redirect view-id="/article.jsp" />
       </rule>
       </navigation>
      </page>


      home.jsp is my list of articles, there is something like this:
      <h:dataTable var="art" value="#{arts}">
       <h:column>
       ...
       <s:link action="viewArticle" value="more...">
       <f:param name="articleId" value="#{art.articleId}"/>
       </s:link>
       ...
       </h:column>
      </h:dataTable>


      When I click the link, I am redirected to URL:
      http://localhost:8080/app/article.xhtml?conversationId=2

      There is no articleId parameter. I tried to put h:form and h:commandButton there instead of s:link, but it also didn't work.

      What am I doing wrong?

      I know there were questions like this on this forum, I found a few, but I didn't find answers.

      Best regards
      Pawel Stawicki