1 Reply Latest reply on Jul 20, 2007 3:38 AM by Orsier Adrien

    Browser's back button problem

    Orsier Adrien Newbie

      Hello guys,

      I'm have troubling making the 'browser's back button' feature works, using JBoss 4.2 and Seam 2.0.

      I basically have a page, called Topic.xhtml, displaying some topic.
      Earch topic has some children, so when I click on a topic on that page, I change the value of the 'selectedTopic' outjected property and reload the Topic.xhtml page that displays the children of selectedTopic.
      Basically, I can't get the browser's back button to work.

      This is the content of Topic.xhtml:

       <h:dataTable value="#{selectedTopic.children}" var="topic">
       <h:commandLink action="#{topicManager.viewTopic(topic)}">#{topic.relativeName}</h:commandLink>

      This is my back SFSB:
      public class TopicManager implements TopicManagerInterface {
       @Begin(join = true)
       public String viewTopic(Topic topic)

      And I added this to pages.xml:

      <page name="viewTopic"
       <transition to="viewTopic"/>
       <transition name="complete" to="complete"/>

      Note that the first time Topic.xhtml is called, it's by the viewTopic method.

      As I understand it, the problem is that the back button sends me to the last viewed page seen BEFORE Topic.xhtml.
      The problem is that I want to send him back to Topic.xhtml, but just with the data state rollbacked.

      Dunno, maybe that's not even possible?