1 Reply Latest reply on Dec 7, 2005 7:57 AM by Micha? ?

    DataModel and No conversation context active

    Micha? ? Newbie

      Hi everyone!

      I have two pages, displaying data in tables. Tables are in relation 1:n. First page displays data from the master table. Every row contains button, which allows to navigate to detail view, displaying ale data from second table, that are in relation with chosen element.
      First page (master.jsp):

      <h:dataTable id="workers" value="#{workers}" var="w" >
       <h:commandButton id="detailActionID"
       value="Show detail" />

      Second page (detail.jsp):
      <h:dataTable id="wards" value="#{wards}" var="ward">

      ViewerAction stateful bean serves viewing.

      public class ViewerAction implements Viewer
       private List<Worker> workers;
       Manage manager;
       @Out(value = "wards", required = false)
       private List<Ward> wards;
       private Worker supervisor;
       public String watchWorkers()
       this.workers = (List<Worker>) manager.getWorkers();
       return "watchWorkers";
       public String showWardsOfSupervisor()
       this.wards = (List<Wards>)this.manager
       return "showWards";

      Manager is backing stateful bean, processing bussiness logic.
      I have following flow:
      * [outer] -> ViewerAction.watchWorkers : begin conversation, retrieve data from manage backing bean, displays master table
      * master.jsp -> ViewerAction.showWardsOfSupervisor -> detail.jsp: retrieve detail data from backing bean, displays detail table, end conversation

      All data displays fine. Let's suppose that user press the back button in the browser. Content of the master.jsp generated page displays. Now, user presses the same 'detail' button that he pressed before. The next thing he sees is an empty table only with column headers. I checked - ViewerAction.showWardsOfSupervisor doesn't recieve any input. Why seam doesn't redirect user to main page as specified in @Conversational(ifNotBegunOutcome="main")?

      best regards