Class FixedTabFactory
java.lang.Object
net.sf.basedb.clients.web.extensions.AbstractJspFactory
net.sf.basedb.clients.web.extensions.AbstractJspActionFactory<TabAction>
net.sf.basedb.clients.web.extensions.tabcontrol.FixedTabFactory
- All Implemented Interfaces:
DynamicActionAttributes
,TabAction
,Action
,ActionFactory<TabAction>
A simple implementation of a tab action factory that
creates the same fixed tab for all users not using any
context information.
If the extension point supports scripts and stylesheets, use the
AbstractJspFactory.setScript(String)
and AbstractJspFactory.setStylesheet(String)
methods.
Each call to these methods will add the argument to a set. Use
the AbstractJspFactory.getScripts()
and AbstractJspFactory.getStylesheets()
methods to gain
access to the sets, for example, to remove added items.
- Since:
- 2.17
- Author:
- nicklas
- Last modified
- $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetActions
(InvokationContext<? super TabAction> context) This method may be called one or several times for each request.getClazz()
Class attribute of the main tab tag.Get the (HTML) contents of the tab.The external id of a help text that the user can display to get more information about how to use the information in this tab.getId()
ID attribute of the main tab tag.getStyle()
Extra CSS style attributes that will be added to thestyle
attribute of the main tab tag.int
Get the tab index used to control focus order when tabbing.getTitle()
Get the title of the tab.A tooltip that is shown as a yellow popup when the user points the mouse at the tab.boolean
If the tab should be visible or not.void
void
setContent
(String content) void
void
void
void
setTabIndex
(String tabIndex) void
void
setTooltip
(String tooltip) void
setVisible
(boolean visible) void
setVisible
(String visible) Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspActionFactory
prepareContext
Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspFactory
getDynamicActionAttributes, getParameter, getScripts, getStylesheets, prepareContext, setParameter, setScript, setStylesheet
-
Field Details
-
actions
-
id
-
clazz
-
style
-
title
-
tooltip
-
helpId
-
visible
private boolean visible -
-
tabIndex
private int tabIndex
-
-
Constructor Details
-
FixedTabFactory
public FixedTabFactory()Create a new factory instance.
-
-
Method Details
-
getActions
Description copied from interface:ActionFactory
This method may be called one or several times for each request. This is decided by the extension point. If, for example, the extension point is a pure single-item extension point then this method is probably only called once. If the extension point is a per-item extension point in a list context, then this method may be called once for every item in the list. The context parameter contains all information about the context of the extension point, including the current item, if any.- Specified by:
getActions
in interfaceActionFactory<TabAction>
- Parameters:
context
- The current invokation context- Returns:
- An array of actions that should be added to the extension point. Returns null or an empty array if there are no actions in the current context.
-
getId
Description copied from interface:TabAction
ID attribute of the main tab tag. You need to set this value to reference the tab in a javascript. -
getClazz
Description copied from interface:TabAction
Class attribute of the main tab tag. -
getStyle
Description copied from interface:TabAction
Extra CSS style attributes that will be added to thestyle
attribute of the main tab tag. -
getTitle
Description copied from interface:TabAction
Get the title of the tab. -
getTooltip
Description copied from interface:TabAction
A tooltip that is shown as a yellow popup when the user points the mouse at the tab.- Specified by:
getTooltip
in interfaceTabAction
- Returns:
- The tooltip or null to not display any tooltip
-
isVisible
public boolean isVisible()Description copied from interface:TabAction
If the tab should be visible or not. -
getHelpId
Description copied from interface:TabAction
The external id of a help text that the user can display to get more information about how to use the information in this tab. SeeHelp.getExternalId()
. -
getContent
Description copied from interface:TabAction
Get the (HTML) contents of the tab.- Specified by:
getContent
in interfaceTabAction
-
getTabIndex
public int getTabIndex()Description copied from interface:TabAction
Get the tab index used to control focus order when tabbing. Use -1 to disable.- Specified by:
getTabIndex
in interfaceTabAction
-
setId
-
setClazz
-
setStyle
-
setTitle
-
setTooltip
-
setVisible
public void setVisible(boolean visible) -
setVisible
-
setHelpId
-
setContent
-
setTabIndex
-