Class RibbonToolbarTransform

    • Constructor Detail

      • RibbonToolbarTransform

        public RibbonToolbarTransform()
    • Method Detail

      • getSelectedToolbarId

        public int getSelectedToolbarId()
        Returns the id of the selected toolbar, usually stored as a user preference value that will be updated every time the user changes the selected toolbar, to keep track of the last selection.
        Returns:
        String that represents the id of the toolbar
      • getDefaultTargetPath

        public java.lang.String getDefaultTargetPath()
        Returns the targetPath specified on the pageConfig file
        Returns:
        the targetPath
      • isToolbarSelected

        public boolean isToolbarSelected​(java.lang.String tb)
        Determines if the toolbar is currently selected.
        Parameters:
        tb - String The local name of the toolbar (e.g. Home, Tools, Format, etc).
        Returns:
        Boolean True if the toolbar is currently selected.
      • isToolbarEnabled

        public boolean isToolbarEnabled​(java.lang.String tb)
        Determines if the tab for the supplied toolbar name should be visible.
        Parameters:
        tb - String the local name of the toolbar (e.g. Home, Tools, Format, etc).
        Returns:
        Boolean True if the tab for this toolbar should be visible.
      • removeToolbarEvents

        public void removeToolbarEvents​(Block tb)
        This method removes toolbar button Event information that is not needed client-side.
        Parameters:
        tb - Block The ToolbarModel Block for event information removal.
      • processToolbarEvents

        public void processToolbarEvents​(Block b)
        This method generates the resolved links for any toolbar buttons with events.
        Parameters:
        b - Block The RibbonToolbarModel Block to search for events.
      • getAllGridStyles

        public java.util.Enumeration<WebObjectInfo> getAllGridStyles()
        Used to retrieve the grid autostyles
        Returns:
        an Enumeration that holds all the valid grid autostyles
      • getAutostyleIcon

        public java.lang.String getAutostyleIcon​(WebObjectInfo oi)
        Method that generates a unique style class based on the WebObjectInfo id Implementation: " mstrLayoutItem style_" + oi.getID();
        Parameters:
        oi -
        Returns:
        String that shall be used for the style class for the tile of the autostyle pulldown
      • getToolbarPreferenceName

        protected java.lang.String getToolbarPreferenceName()
        Method that returns the name of the preference used to store the last selected toolbar, used by getSelectedToolbarId()
        Returns:
        the preference name
      • getListName

        protected java.lang.String getListName()
      • getToolbarName

        protected java.lang.String getToolbarName()
      • toolbarTaskLoad

        public void toolbarTaskLoad​(Block baseBlock)
                             throws java.lang.Exception
        Will set the desired blockModel on the baseBlock, depending on the requested toolbar. This method will be used tipically by the ToolbarRequestLoader that is the layout that the task uses to populate the on demand toolbars
        Parameters:
        baseBlock -
        Throws:
        java.lang.Exception
      • loadRibbon

        public void loadRibbon​(Block ribbonModel)
                        throws java.lang.Exception
        Will load the basic structure of the ribbon, from the pageConfig. The ribbon is the mix of tabs, menus and toolbars. This method will be called typically by the ReportToolbarLayout or the DocumentToolbarLayout
        Parameters:
        ribbonModel - Block of RibbonToolbarModel type
        Throws:
        java.lang.Exception
      • loadRibbonView

        public void loadRibbonView​(Block ribbonView)
                            throws java.lang.Exception
        The ribbon contains two blocks, the view and the model. This method is used to populate the view block of the ribbon. The method will fill the viewStack with toolbar blocks.
        Parameters:
        ribbonView -
        Throws:
        java.lang.Exception
      • loadSelectedModel

        public void loadSelectedModel​(Block ribbonModel)
                               throws java.lang.Exception
        Replaces the model placeholder with the real toolbar model based on the selected toolbar preference, after filling the ribbon (tabs and toolbars) we need to populate the first toolbar, the selected toolbar. This method will be called typically by the ReportToolbarLayout or the DocumentToolbarLayout
        Parameters:
        ribbonModel -
        Throws:
        java.lang.Exception
      • loadResolvedFeatures

        public void loadResolvedFeatures​(Block baseModel)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getRibbonsFromPageConfig

        protected RibbonList getRibbonsFromPageConfig​(java.lang.String listName)
        Get the list of ribbons from the page config using the page name
        Parameters:
        page -
      • addBackHistoryItemsToModel

        public void addBackHistoryItemsToModel​(Block baseBlock)
      • addForwardHistoryItemsToModel

        public void addForwardHistoryItemsToModel​(Block baseBlock)
      • addPageHistoryItemsToModel

        public void addPageHistoryItemsToModel​(Block baseBlock,
                                               boolean isBackList)