2 Replies Latest reply: May 18, 2012 3:11 PM by 932831 RSS

    Region disapears after refresh from Parent Page

      I have header portion and showDetailsItem in main page. On changing value of dropdown from header portion, the open tab data is expected to refresh.
      In couple of tabs I have included <af:commandNavigationItem> items and number of regions are included as child item in those tabs.
      On selection of <af:commandNavigationItem>, respective associated region in tab is refreshed. In normal run they are working fine independently.

      <af:showDetailItem textAndAccessKey="MAIN1" id="sdacctDtls" immediate="true"

      <af:region value="#{bindings.accountdetailstaskflowdefinition1.regionModel}" id="acctDtls" />
      <af:setPropertyListener from="MAIN_TAB" to="#{pageFlowScope.tabClicked}" type="disclosure"/>

      similarly for DETAILS_TAB etc
      Activation of respective taskFlow is controlled from page-def file.
      Problem arises, while the tab with commandNavigationItem is disclosed and value of dropdown from Header section is changed.
      In this scenario, only commandNavigationItem are displayed. The region portion below is refreshed as blank.

      But when I click on adjuscent tab and again come back to previuos tab...data appears.
      Can you please guide me on above issue...

        • 1. Re: Region disapears after refresh from Parent Page
          Any suggestions which leads to solutn are very appriciable.
          • 2. Re: Region disapears after refresh from Parent Page
            For this i found the work around in adf bounded javascript... this might be the pointer for some...

            Try using adf javascript if permissible. Put coomand button in visible="false" mode in your parent region
            Put this script inside Parent region just before u r making call to child region
            StringBuilder script = new StringBuilder();
            script.append("var partialSubmit = true;");
            script.append("var button = AdfPage.PAGE.findComponentByAbsoluteId('reloadButton');"); //'reloadButton' should be absoulte id for ex: "region1:1:pt1:reload"

            private void writeJavaScriptToClient(String script) {
            FacesContext fctx = FacesContext.getCurrentInstance();
            ExtendedRenderKitService erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
            erks.addScript(fctx, script);

            Reload button
            <af:commandButton text="Reload" id="reload" binding="#{Backingbean.reload}" actionListener="xyz" immediate="true" visible="false"></af:commandButton>

            This will create submit event and hence enhances probability of displaying child region.