Class DesignerTabBean

  • All Implemented Interfaces:
    Serializable

    @RequestScoped
    @Named("designerTabBean")
    public class DesignerTabBean
    extends Object
    implements Serializable
    Bean controlling the components of the designer.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • DesignerTabBean

        public DesignerTabBean()
    • Method Detail

      • addTab

        public void addTab()
        Opens the given tab, adding it to the topbar menu.
      • closeTab

        public void closeTab​(TabModel tab)
        Close the given tab, removing it from the topbar menu.
        Parameters:
        tab - Tab to remove.
      • getAvailableTabs

        public List<TabModel> getAvailableTabs()
        Returns:
        A list of all available tabs.
      • getExtraTopMenuXhtml

        public String getExtraTopMenuXhtml()
        Returns:
        XHTML page with the extra top menu items of the active tab.
      • getMoreTabMenuEntries

        public org.primefaces.model.menu.MenuModel getMoreTabMenuEntries()
        Returns:
        A menu model entry with the tab that can be added.
      • getOverlayStyleClass

        public String getOverlayStyleClass​(TabModel tab)
        Parameters:
        tab - An existing tab.
        Returns:
        The style class for the error overlay of the given tab in the main content area.
      • getTabMenuCloseIconStyleClass

        public String getTabMenuCloseIconStyleClass​(TabModel tab)
        Parameters:
        tab - An existing tab.
        Returns:
        The style class for the close icon of the given tab.
      • getTabMenuItems

        public List<TabModel> getTabMenuItems()
        Returns:
        All tabs that are considered tabs.
      • getTabMenuStyleClass

        public String getTabMenuStyleClass​(TabModel tab)
        Parameters:
        tab - An existing tab.
        Returns:
        The style class for the menu entry of the given tab in the topbar menu.
      • getTabStyleClass

        public String getTabStyleClass​(TabModel tab)
        Parameters:
        tab - An existing tab.
        Returns:
        The style class for the iframe of the given tab in the main content area.
      • isAnyTabShownInTopMenu

        public boolean isAnyTabShownInTopMenu()
        Returns:
        Whether any tab is shown in the top menu, regardless of whether is is opened.
      • isAnyTabVisible

        public boolean isAnyTabVisible()
        Returns:
        true if any tab is shown, false if no tab is shown.
      • isHasMoreTabMenuEntries

        public boolean isHasMoreTabMenuEntries()
        Returns:
        Whether any more menu model entry can be added.
      • onChangesStatus

        public void onChangesStatus()
        Remote command for when a tab has got unsaved / saved changes.
      • onPageError

        public void onPageError()
        Remote command for when a tab encountered an error.
      • reloadTab

        public void reloadTab​(TabModel tab)
        When an error occurred in a tab, this method attempts to reload the tab by refreshing the iframe.
        Parameters:
        tab - Tab to reload.
      • switchToTab

        public void switchToTab()
        Switch to the designer tab given as indicated by the request parameter.
      • switchToTab

        public void switchToTab​(TabModel tab)
        Switches to the given tab, and set TabModel.isOpen() to true.
        Parameters:
        tab - Tab to switch to.