3 Replies Latest reply on Jan 12, 2009 3:49 PM by Gustavo Bustos

    s:link performance problem

    Gustavo Bustos Newbie

      Hi all,

      I have a strange problem, maybe will be my mistake or a s:link bug.
      I used a s:link in a page that is a list of elements(h:datatable tag) with name requirementsList.xhtml, this page has a s:link like this:

      <s:link id=create value=#{messages['button.add.requirement']}
           rendered=#{requirementListAction.createEnabled} />

      The link is used to create a new element for the requirements list, so must redirect to another page called requirementEdit that is returned by the method beginCreate.

      Now, the performance problem is the follow:
      When my jboss is running, I call the page requirementsList.xhtml, then I noticed a very long url in the final html that is rendered by s:link tag “http://localhost:8080/darwin/project/requirementList.seam?actionMethod=project%2FrequirementList.xhtml%3ArequirementAction.beginCreate”.

      When I click on the link the current page (requirementsList.xhtml) is called again, before passing to the requirementeEdit page returned by the method requirementAction.beginCreate (it is logical due to the final url that is rendered). So, my requirementsList fetches ‘n’ elements from my DB and is calling twice and fetching n elements again (I see this on my log files, the SQL sentences appear twice).

      Is it a normal process with s:link tag or my mistake? I need help with this, because my application has many s:links and the same problem occurs in all pages that it appears.


      Gustavo Bustos.-