1 Reply Latest reply on Apr 29, 2009 11:21 AM by Nick Belaevski

    Datatable Refresh after a popup (popup generated  using serv

    Anand Saranath Srinivasa Raghavan Newbie


      We have an existing application in which we generate a table using jsp. There are context menus attached to this jsp generated table. We are trying to come out with a new functionality where we are using Richfaces 3.3.0 to generate the table dynamically and attach context menu to it. All these works fine. I am hitting a roadblock when I use the context menu. On clicking on the context menu in the new jsf page, I will pop up an existing window which will have a jsp page. When the user interacts with this jsp page, I want a data table in the the new jsf page to be refreshed.

      Since the pop up acts like a separate thread (the javascript used to pop up does a window.open(url) to open this new pop up), I am clueless as to how to make that jsp / servlet to refresh this new page. I am attaching the code snippets for the same.

      Any help in this regard will be much appreciated. This is a very critical requirement for us. This is a showstopper for this.


      After the saInteractWithJob.jsp closes, I want the data table "queueTable" in the queueJobs.xhtml refreshed.

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
      <div align="center">
       <a4j:loadScript src="../../javascript/saSov.js" />
       <rich:contextMenu attached="false" id="menu" submitMode="ajax">
       <rich:menuItem onclick="return interactWithJob('{queue}', '{jobId}', '{iType}');">
       <a4j:support event="oncomplete" actionListener="#{SOV_SpecificQueueBean.queryJobs}" reRender="queueTable"/>
       <h:outputText value="Interact with Job {jobId})"/>
       <rich:menuItem actionListener="#{SOV_SpecificQueueBean.stopJob}" reRender="queueTable">
       <h:outputText value="Stop Job {jobId})" />
       <rich:dataTable value="#{SOV_SpecificQueueBean.valueList}" var="row" width="100%" rows="#{SOV_SpecificQueueBean.maxRecords}"
       id="queueTable" sortMode="multiple">
       <rich:columns id="#{row.data[index]}_#{index}" value="#{SOV_SpecificQueueBean.columns}" var="col" index="index"
       sortBy="#{row.data[index]}" sortOrder="#{col.ordering}">
       <f:facet name="header">
       <h:outputText value="#{col.name}" />
       <h:outputText value="#{row.data[index]}" />
       <rich:componentControl for="menu" operation="show" event="onRowClick">
       <f:param value="#{row.jobReqDesc.jobId}" name="jobId" />
       <f:param value="#{row.jobReqDesc.interactionType}" name="iType" />
       <f:param value="#{row.jobReqDesc.queue}" name="queue" />
      interactWithJob javascript --
      function interactWithJob(queue, job, interactionType) {
       alert("I am inside interact");
       var winLink = "/activator/jsp/saInteractWithJob.jsp?queueName=" + queue + "&jobId=" + job + "&inter
      actionType=" + interactionType;
       return true;