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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DesignerTabBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTab()
Opens the given tab, adding it to the topbar menu.void
closeTab(TabModel tab)
Close the given tab, removing it from the topbar menu.List<TabModel>
getAvailableTabs()
String
getExtraTopMenuXhtml()
org.primefaces.model.menu.MenuModel
getMoreTabMenuEntries()
String
getOverlayStyleClass(TabModel tab)
String
getTabMenuCloseIconStyleClass(TabModel tab)
List<TabModel>
getTabMenuItems()
String
getTabMenuStyleClass(TabModel tab)
String
getTabStyleClass(TabModel tab)
boolean
isAnyTabShownInTopMenu()
boolean
isAnyTabVisible()
boolean
isHasMoreTabMenuEntries()
void
onChangesStatus()
Remote command for when a tab has got unsaved / saved changes.void
onPageError()
Remote command for when a tab encountered an error.void
reloadTab(TabModel tab)
When an error occurred in a tab, this method attempts to reload the tab by refreshing the iframe.void
switchToTab()
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
.
-
-
-
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.
-
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.
-
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 setTabModel.isOpen()
totrue
.- Parameters:
tab
- Tab to switch to.
-
-