0 Replies Latest reply on Jan 13, 2011 1:37 AM by Guillermo Rodriguez

    extendedDataTable, jsFunction and queues

    Guillermo Rodriguez Newbie

      Hi everybody!

      I would like to use this  message to ask many small questions I have in mind. Please be kind. I;m using JBoss Portal and RichFaces.


      a. I have an extendedDataTable. The table has 10 columns and about 200 records. Any request for the table (request data for rendering the table or to handle an onselectionchanged event takes about 8 to 10 seconds, more if there are more records of course. Is that an average performance or something is really wrong?


      b. My backing bean has a method which returns the contents of the table as a list. Indeed, in all my code, it is only used to render the extendedDataTable. Once the table is rendered the function shouldn't be called again, but for some reason, for any event in other parts of the form, I keep receiving messages as if ajax is trying to get the rows of the table. The table is not rendered but the messages appear. The form is complex but I have regions all over the form in order to avoid resending the table data for any reason I can't find any reason why the table is attempting to get the rows. Mystery.


      c. Whenever I try to handle the onselectionchanged, it looks like the table takes about 8 seconds to transmit the info back to the server, mark the selections and then I get my response. I that normal? I guess JBoss or ajax is trying to resend all the data or something like that. I don't know. And if I get more rows, it gets slower.


      d. In order to avoid this overhead, I handled the selection as a javascript: onselectionchange="onAlertSelected(this)". This allows calling a javascript function which detects the row which was selected and extracts the id I need for my search. I pass that id back to the server using a jsFunction:


      <a4j:jsFunction name="setAlertId" reRender="claimDetailPanel,dischargeDataPanel">

           <a4j:actionparam name="alertId" assignTo="#{portletControlBean.alertId}" />




      So from the javascript I just call:



      And the jsFunction will send the id only. This works great and I get a response from the server in 3 seconds instead of the 10 seconds I get if I try to handle all the table. Like a mini parallel process.


      e. The problem with this approach is that now I can't use a queue. I create a form queue and set a max queue size to 2 events and a 1000msecs delay. But the queue never responds. I tried many queues, with and without limits but nothing. And the extendedDataTable has no eventsQueue parameter so I ant do nothing. I wonder if the problem may be in the processing style described in d.


      Ok, I don't expect many answers but please, if someone can make some light in this points I will really appreciate it.