2 Replies Latest reply on Jun 26, 2007 6:57 AM by lkowalczyk

    Selecting from a dataTable works randomly

    lkowalczyk

      I have a dataTable with a control variable named "report". The dataTable is populated from a collection of EJB3 entities.

      Upon clicking one of the links in the table the user is transferred to another view which accepts an @In parameter named report. This view creates another dataTable (in the form of a UIData object) and displays it.

      All of this works only once -- all subsequent attempts to click my way through the tables fail miserably with an exception in com.sun.facelets.el.LegacyValueBinding.setValue.

      The first dataTable looks like this:

      <h:dataTable var="report" value="#{reports}" id="list">
       <h:commandLink rendered="#{report.ready}" action="#{showreport.show}" value="Show report"/>
      </h:dataTable>
      

      The #{showreport.show} action does nothing but creating a UIData object marked with an @Out annotation and some data values (a List also marked with an @Out).

      The UIData object is then displayed by the following tag:

      <h:dataTable binding="#{showreport.dataTable}" value="#{showreport.tableRows}"/>


      As I said before, this scheme works perfectly until I return to the first dataTable and click on the "Show report" link again. The second (and any next) time I get this exception:

      javax.faces.el.PropertyNotFoundException: /report/showreport.xhtml @22,97 binding="#{showreport.dataTable}": Bean: org.javassist.tmp.java.lang.Object_$$_javassist_187, property: dataTable
      at com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java:72)
      at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:443)
      at org.jboss.seam.jsf.SeamApplication11.createComponent(SeamApplication11.java:78)
      at com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:237)
      [...]

      Creating a setter for the dataTable property does not help much -- the same exception is thrown.

      How do I ensure that the results of calling an action are consistent throughout the use of the application?

      I'm using Seam 1.2.1.