0 Replies Latest reply on Nov 19, 2008 2:35 AM by Amit Bafna

    Page parameter propogation

    Amit Bafna Newbie

      All,


      I have a screen where I display a list of reports. User can either click on Run link to run the report. Or, user can click on Edit link to display report configuration, where they can make some changes and run the report. When user requests to edit the report, the report configuration is loaded through page action. Report Id is defined in code with @RequestParameter annotation. 


      reportList.xhtml


      <s:link value="Run" title="Run #{report.name}" action="#{report.runReport}">
          <f:param name="reportId" value="#{report.id}" />
          <s:conversationPropagation type="none" />
      </s:link>
      <s:link view="/reportEdit.xhtml" value="Edit" title="Edit #{report.name}">
          <f:param name="reportId" value="#{report.id}" />
          <s:conversationPropagation type="none" />
      </s:link>



      reportEdit.xhtml


      ...
      ...
      report configuration
      ...
      ...
      <a4j:outputPanel id="actionButtonPanel">
          <a4j:commandButton type="button" id="saveReport" value="Save Report" onclick="#{rich:component('saveReportPanel')}.show()"/>
          <a4j:commandButton type="button" id="runReport" value="Run Without Saving" action="#{report.runReport}" reRender="reportProgressPanel" />
          <a4j:commandButton type="button" id="abandonChanges" value="Abandon Changes" rendered="#{report.hasChanged()}" onclick="#{rich:component('abandonPanel')}.show()"/>
      </a4j:outputPanel>
      



      pages.xhtml


      <page view-id="/reportEdit.xhtml" login-required="true" action="#{reportConfiguration.loadReport}">
          <begin-conversation join="true"/>
          <description>Edit Report</description>
          <param name="reportId" />
      </page> 
      



      When user clicks on Run link, report is executed just fine. Similarly, when edit link is clicked the report configuration is loaded just fine but when user tries to submit the report, application throws an exception saying ReportId is null.


      My understanding from Seam reference was that ReportId should continue to hold the value that was assigned to when the form is submitted.


      The value is transparently propagated with any JSF form submission for the page with the given view id



      What am I doing wrong?


      Thanks
      Amit