4 Replies Latest reply on Oct 5, 2010 2:29 PM by Leo van den berg

    Request parameters deleted after first submit

    Bogdan Mocanu Newbie

      Hello,


      I am developing an application with Seam and for one page (a book view page) I specified that I need an id sent as a request parameter. So my URL must be /book-view.seam?bookid=22.


      Everything is ok, from the book list page I get redirected to book-view, and the id is correctly set. However, after first change in the page (that is, after first submit of the page), Seam deletes the request parameter (all these submits from the book-view page happen in a conversation).


      Now this is a problem for me. I would like the bookid request parameter to remain on that page, in order to keep the page bookmark-able.


      Here is my configuration for the book-list:


      <page view-id="/book-list.xhtml">
          <navigation from-action="#{bookSearch.selectBook}">
              <begin-conversation/>
              <redirect view-id="/book-view.xhtml">
                  <param name="bookid" value="#{bookSearch.book.id}"/>
              </redirect>
          </navigation>
      </page>


      And here is the configuration for book-view:


      <page view-id="/book-view.xhtml" no-conversation-view-id="/home.xhtml">
          <param name="bookid" value="#{bookView.bookIdStr}"/>
      </page>


      So my question is how can I make Seam to keep the request parameters on each redirect, so that they remain in the address bar after each submit from a page that requires these parameters?


      Should I stop using <h:commandLink/> and <h:commandButton/> and instead use <s:link/> and <s:button/> ?


      Thank you very much for reading this post, and for your answer in advance.


      Bogdan.