0 Replies Latest reply on Nov 16, 2008 10:26 PM by Val Sw

    please help, conversation question

    Val Sw Expert
      I am missing just the flow... please help, I tried lot of things but looks like missing the basic .... Let me know if xxxx.page.xml is required

      Details :
      I have a button in Project.xhtml page, it takes user to QuantExperimentEdit.xhtml where user fills the form and clicks Save button is displayed.
      Project.xhtml
      -------------
      <s:button value="Add Experiment"
                view="/QuantExperimentEdit.xhtml">
           <f:param name="projectHjid"
                     value="#{projectHome.instance.hjid}"/>
           <f:param name="projectFrom" value="Project"/>
      </s:button>
      URL on clicking above button: http://localhost:8080/seamGenUI/QuantExperimentEdit.seam?projectHjid=1&projectFrom=Project&cid=55

      There is also a button on same Project.xhtml, which allows the user to update any information and "Update" button is displayed.
      <s:button view="/QuantExperimentEdit.xhtml"
           id="editExp"
      value="View / Edit Experiment"
      action="#{quantExperimentHome.editProject}">
           <f:param name="quantExperimentHjid"
                     value="#{quantExperiment.hjid}"/>
           <f:param name="quantExperimentFrom" value="Project"/>
      </s:button>
      URL : http://localhost:8080/seamGenUI/QuantExperimentEdit.seam?quantExperimentFrom=Project&projectHjid=1&quantExperimentHjid=1&projectFrom=Project&cid=56&actionMethod=Project.xhtml%3AquantExperimentHome.editProject

      QuantExperimentEdit.xhtml
      -------------------------
      <h:commandButton id="save" value="Save experiment"
            action="#{quantExperimentHome.persist}"
         disabled="#{!quantExperimentHome.wired}"
         rendered="#{!quantExperimentHome.managed}" >
      </h:commandButton>

      <h:commandButton id="update"
        value="Update experiment"
      action="#{quantExperimentHome.update}"
      rendered="#{quantExperimentHome.managed}"
      onclick="if (!confirm('Are you sure you want to update this experiment ?')) return false;"/>

      <s:button id="done" value="Back to Experiment page" propagation="end" view="/Project.xhtml"/>
      URL: http://localhost:8080/seamGenUI/Project.seam?quantExperimentFrom=Project&projectHjid=1&quantExperimentHjid=1&projectFrom=Project&conversationPropagation=end&cid=57

      If user clicks "Add Experiment" first time everything works smooth and blank form is displayed with "Save" button.

      If user clicks "View / Edit Experiment" and then clicks "Back to Experiment page" somehow propagation is not ended thus on clicking "Add Experiment" page displays "Update" button this time, it should display "Save".

      Clicking "Back to Experiment page" button retains the quantExperimentId