3 Replies Latest reply on Mar 23, 2007 12:48 PM by Wayne Bagguley

    s:link bug?

    Wayne Bagguley Newbie

      I've got a <h:datatable> like this:

      <h:dataTable value="#{jobListHandler.jobList}" var="jobStore">

      Nested inside are some <h:column> elements as you'd expect.

      I want to include an <s:link> in one of the columns but before I did that I noticed that 'jobListHandler.jobList' was getting called twice to render the table only once. As it's making a database call I'm not happy about this, but it gets worse.

      If I add this code inside one of the <h:column> tags then 'jobListHandler.jobList' gets called twice (as before) and once for each and every table row displayed (a total of 13 times in this case):

      <s:link action="#{jobHandler.reprint}" value="Reprint">
       <f:param value="#{jobStore.id}" name="jobStoreId"/>

      Why is this happening? Am I misunderstanding the usage of <h:dataTable> and/or <s:link>?