Package de.xima.fc.gui.bean.designer
Class DesignerTabBean
java.lang.Object
de.xima.fc.gui.bean.designer.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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTab()
Opens the given tab, adding it to the topbar menu.void
Close the given tab, removing it from the topbar menu.org.primefaces.model.menu.MenuModel
getTabStyleClass
(TabModel tab) boolean
boolean
boolean
void
Remote command for when a tab has got unsaved / saved changes.void
Remote command for when a tab encountered an error.void
When an error occurred in a tab, this method attempts to reload the tab by refreshing the iframe.void
Switch to the designer tab given as indicated by the request parameter.void
switchToTab
(TabModel tab) Switches to the given tab, and setTabModel.isOpen()
totrue
.
-
Constructor Details
-
DesignerTabBean
public DesignerTabBean()
-
-
Method Details
-
addTab
public void addTab()Opens the given tab, adding it to the topbar menu. -
closeTab
Close the given tab, removing it from the topbar menu.- Parameters:
tab
- Tab to remove.
-
getAvailableTabs
- Returns:
- A list of all available tabs.
-
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
- Parameters:
tab
- An existing tab.- Returns:
- The style class for the error overlay of the given tab in the main content area.
-
getTabMenuCloseIconStyleClass
- Parameters:
tab
- An existing tab.- Returns:
- The style class for the close icon of the given tab.
-
getTabMenuItems
- Returns:
- All tabs that are considered tabs.
-
getTabMenuStyleClass
- Parameters:
tab
- An existing tab.- Returns:
- The style class for the menu entry of the given tab in the topbar menu.
-
getTabStyleClass
- 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
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
Switches to the given tab, and setTabModel.isOpen()
totrue
.- Parameters:
tab
- Tab to switch to.
-