Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADF: Tab needs to be refreshed when I revisit the tab with Dynamic Tab shell

Deepthi kolliparaOct 9 2013 — edited Oct 10 2013

Hi ADF Experts,

   we are using dynamic tab shell template in our project.I have many tabs opened in page ,When I navigate from one tab
to another tab , current tab needs to be refreshed.
when I navigate from tabs below mwthod will execute.

  public void tabActivatedEvent(ActionEvent action)
  {
    RichCommandNavigationItem tab =
      (RichCommandNavigationItem) action.getComponent();
      Integer tabIndex = (Integer) tab.getAttributes().get("tabIndex");
      List<Tab> tabs = getTabs();

      Tab currTab = tabs.get(getSelectedTabIndex());
     
      if (currTab.isDirty())
      {

        //JRS set the dirty tab as the current tab, so when the dialog handles 'YES'
        // it will be getting the correct tab index to close
        setSelectedTabIndex(getSelectedTabIndex());

        _showDialog(getTabDirtyPopup());
        return;
      }
    setSelectedTabIndex( tabIndex);
  }

  public void setSelectedTabIndex(int index)
  {
    _tabTracker.setSelectedTabIndex(index);
    initTrackTabDirty();
    refreshTabContent();
  }

  public void refreshTabContent()
  {
    AdfFacesContext.getCurrentInstance().addPartialTarget(getTabsNavigationPane());
    AdfFacesContext.getCurrentInstance().addPartialTarget(getContentArea());
  }

Help me if anyone knows how to achieve this.

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2013
Added on Oct 9 2013
3 comments
794 views