LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsTabs

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.LyWebPageWriter
              extended by leon.view.web.struts.LyStrutsContainer
                  extended by leon.view.web.struts.LyStrutsTabs
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalContainer, LyGraphicalFieldItem, LyGraphicalPanel, LyGraphicalTabs, LyViewComponent, LyFreeInterface, LySetTabInterface, LyWebComponent

public class LyStrutsTabs
extends LyStrutsContainer
implements LyGraphicalTabs, LySetTabInterface

This class implements the Tabs object (as described in the dtd) for Struts viewer.

TABS: Tabs
A container of tab type allows displaying different panels in the same graphical area, only one panel being visible at once. Each panel is contained in a tab, the container being made up of a set of tabs. The displaying that corresponds to a container of tab type must present two areas: a first one showing the names of the different tabs and a second one allowing displaying the panels.


Field Summary
static java.lang.String __VERSION
           
static int DECO_DISABLED_LABEL_PARAMETER
          Constant used to generate CSS class name for selected label.
static int DECO_DISABLED_SELECTED_LABEL_PARAMETER
          Constant used to generate CSS class name for selected label.
static int DECO_HEADERS_PARAMETER
          Constant used to generate CSS class name for headers.
static int DECO_LABEL_PARAMETER
          Constant used to generate CSS class name for label.
static int DECO_SELECTED_LABEL_PARAMETER
          Constant used to generate CSS class name for selected label.
static int DECO_TAB_CONTENT_PARAMETER
          Constant used to generate CSS class name for tab content.
static java.lang.String TABS_WRAP
          Indicates if tabs must wrap automatically in web mode.
 
Fields inherited from class leon.view.web.LyWebPageWriter
FORCE_AJAX, MAIN_BUFFER
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsTabs(LyTabs tabs)
          Constructor.
 
Method Summary
 void addTab(LyTab tab, int pos)
          Sets force reload to true.
 void clearBeginScripts()
          (non-Javadoc).
 void clearCssScripts()
          (non-Javadoc).
 void clearEndScripts()
          (non-Javadoc).
 java.lang.String getActionUrl()
          Method overriden to return the URL to the "Command" struts action path.
 java.util.Vector<LyWebPageWriter> getPageWriters()
          (non-Javadoc).
 java.lang.String getRedirect(java.lang.String frame)
          Gets the url for an alternate Web page.
 LyTab getSelectedTab()
          Gets the selected tab in the current tabs view.
 void init()
          Initialization method.
 boolean isFrameSet()
          (non-Javadoc).
 void preparePage(java.lang.String frame, java.lang.String targetWindow)
          (non-Javadoc).
 void removeTab(LyTab tab)
          Sets force reload to true.
 void setEnabled(java.lang.String tabId, boolean enabled)
          This method allows to enable or disable a specific tab.
 void setForceReloadState(boolean force)
          (non-Javadoc).
 void setLabel(java.lang.String tabId, java.lang.String newLabel)
          This method allows to change the label of a specific tab.
 void setSelectedTab(java.lang.String selectedTab)
          Updates attribute selectedTab to the given value.
 void writeBeginPage(java.io.Writer pw, java.lang.String frame)
          Writes the beginning of the page.
 void writeEndPage(java.io.Writer pw, java.lang.String frame)
          Writes the end of the page.
 void writeHtml(LyWebPageWriter pw)
          Write HTML description corresponding to this component.
 void writeHtml(java.io.Writer pw, java.lang.String frame)
          (non-Javadoc).
 
Methods inherited from class leon.view.web.LyWebPageWriter
addBeginScript, addCssScript, addEndScript, addEndScript, append, clearBeginScripts, clearBuffer, clearCssScripts, clearEndScripts, copyScriptsTo, endComponent, free, getActiveFormId, getActiveName, getAttachmentDirectory, getAttachmentHandler, getBackground, getBackgroundColor, getBeginScriptsAsHtml, getBuffer, getCssFileAsHtml, getCssScriptsAsHtml, getEndScriptsAsHtml, getForceReloadState, getFormId, getFrameName, getId, getLastReloadTime, getNextJavaScriptId, getOldIds, getOpenFormContent, getOpenFormContent, getProperty, getScriptRoot, getTarget, getWindowName, isInnerView, isNoFrames, isPrintMode, isVisible, setActiveBuffer, setAttachmentDirectory, setAttachmentDirectory, setAttachmentHandler, setAttachmentHandler, setBackground, setBackgroundColor, setBodyClassName, setFormId, setFrameName, setInnerView, setLastModified, setNoFrames, setPrintMode, setProperty, setTitle, setVisible, setWindowName, setWriteDivOnly, startComponent, writeBeginScripts, writeCssScripts, writeDivOnly, writeEndScripts, writePageContent
 
Methods inherited from class leon.view.web.LyWebObject
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getScrollHeightForSplitter, getUrl, getWebViewManager, refresh, replaceUrl, replaceUrl, setUpdating, updateRefreshInfo, writeJson
 
Methods inherited from class leon.view.graphic.LyGraphicalObject
expand, getBounds, getChildrenBounds, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.graphic.LyGraphicalComponent
free, getViewComponent
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

TABS_WRAP

public static java.lang.String TABS_WRAP
Indicates if tabs must wrap automatically in web mode. Can be one of the three following values: true = tabs wrap automatically false = the window width is increased in order to have tabs on the same line arrows = arrows appear to scroll the different tabs without increasing the window width


DECO_LABEL_PARAMETER

public static int DECO_LABEL_PARAMETER
Constant used to generate CSS class name for label.


DECO_DISABLED_LABEL_PARAMETER

public static int DECO_DISABLED_LABEL_PARAMETER
Constant used to generate CSS class name for selected label.


DECO_SELECTED_LABEL_PARAMETER

public static int DECO_SELECTED_LABEL_PARAMETER
Constant used to generate CSS class name for selected label.


DECO_DISABLED_SELECTED_LABEL_PARAMETER

public static int DECO_DISABLED_SELECTED_LABEL_PARAMETER
Constant used to generate CSS class name for selected label.


DECO_TAB_CONTENT_PARAMETER

public static int DECO_TAB_CONTENT_PARAMETER
Constant used to generate CSS class name for tab content.


DECO_HEADERS_PARAMETER

public static int DECO_HEADERS_PARAMETER
Constant used to generate CSS class name for headers.

Constructor Detail

LyStrutsTabs

public LyStrutsTabs(LyTabs tabs)
Constructor.

Parameters:
tabs - the tabs component
Method Detail

writeHtml

public void writeHtml(LyWebPageWriter pw)
Description copied from interface: LyWebComponent
Write HTML description corresponding to this component.

Specified by:
writeHtml in interface LyWebComponent
Parameters:
pw - the page writer

writeHtml

public void writeHtml(java.io.Writer pw,
                      java.lang.String frame)
               throws java.io.IOException
Description copied from class: LyWebPageWriter
(non-Javadoc).

Overrides:
writeHtml in class LyWebPageWriter
Throws:
java.io.IOException
See Also:
LyWebPageWriter.writeHtml(java.io.Writer, java.lang.String)

getActionUrl

public java.lang.String getActionUrl()
Method overriden to return the URL to the "Command" struts action path.

Overrides:
getActionUrl in class LyWebPageWriter
Returns:
the URL of the action or null.

init

public void init()
Initialization method.
Overriden to add initialization of this class attributes.

Overrides:
init in class LyWebPageWriter
See Also:
leon.view.web.LyWebPage#init()

preparePage

public void preparePage(java.lang.String frame,
                        java.lang.String targetWindow)
Description copied from class: LyWebPageWriter
(non-Javadoc).

Overrides:
preparePage in class LyWebPageWriter
See Also:
LyWebPageWriter.preparePage(java.lang.String, java.lang.String)

getRedirect

public java.lang.String getRedirect(java.lang.String frame)
Description copied from class: LyWebPageWriter
Gets the url for an alternate Web page.

Specified by:
getRedirect in class LyWebPageWriter
Parameters:
frame - the frame to redirect
Returns:
the URL of the alternate Web page

setSelectedTab

public void setSelectedTab(java.lang.String selectedTab)
Description copied from interface: LyGraphicalTabs
Updates attribute selectedTab to the given value.

Specified by:
setSelectedTab in interface LyGraphicalTabs
Parameters:
selectedTab - New value of selectedTab.

writeBeginPage

public void writeBeginPage(java.io.Writer pw,
                           java.lang.String frame)
                    throws java.io.IOException
Writes the beginning of the page. Overriden to add the selection of a given tab on load.

Overrides:
writeBeginPage in class LyWebPageWriter
Parameters:
pw - the page writer
frame - the frame where the page is written
Throws:
java.io.IOException - if something is wrong during page writing
See Also:
LyWebPage#writeBeginPage(Writer, String)

writeEndPage

public void writeEndPage(java.io.Writer pw,
                         java.lang.String frame)
                  throws java.io.IOException
Writes the end of the page. Overriden to add the selection of a given tab on load.

Overrides:
writeEndPage in class LyWebPageWriter
Parameters:
pw - the page writer
frame - the frame where the page is written
Throws:
java.io.IOException - if something is wrong during end page writes
See Also:
LyWebPage#writeEndPage(Writer, String)

getSelectedTab

public LyTab getSelectedTab()
Gets the selected tab in the current tabs view.

Returns:
the selected tab in the current tabs view
See Also:
setSelectedTab(String)

clearBeginScripts

public void clearBeginScripts()
Description copied from class: LyWebPageWriter
(non-Javadoc).

Overrides:
clearBeginScripts in class LyWebPageWriter
See Also:
LyWebPageWriter.clearBeginScripts()

clearEndScripts

public void clearEndScripts()
Description copied from class: LyWebPageWriter
(non-Javadoc).

Overrides:
clearEndScripts in class LyWebPageWriter
See Also:
LyWebPageWriter.clearEndScripts()

clearCssScripts

public void clearCssScripts()
Description copied from class: LyWebPageWriter
(non-Javadoc).

Overrides:
clearCssScripts in class LyWebPageWriter
See Also:
LyWebPageWriter.clearCssScripts()

isFrameSet

public boolean isFrameSet()
Description copied from class: LyWebPageWriter
(non-Javadoc).

Overrides:
isFrameSet in class LyWebPageWriter
See Also:
LyWebPageWriter.isFrameSet()

getPageWriters

public java.util.Vector<LyWebPageWriter> getPageWriters()
Description copied from class: LyWebPageWriter
(non-Javadoc).

Specified by:
getPageWriters in class LyWebPageWriter
See Also:
LyWebPageWriter.getPageWriters()

setForceReloadState

public void setForceReloadState(boolean force)
Description copied from class: LyWebPageWriter
(non-Javadoc).

Overrides:
setForceReloadState in class LyWebPageWriter
See Also:
LyWebPageWriter.setForceReloadState(boolean)

addTab

public void addTab(LyTab tab,
                   int pos)
Sets force reload to true.

Specified by:
addTab in interface LyGraphicalTabs
Parameters:
tab - The tabs to add to tabs list.
pos - Position where the sub-component is inserted.
See Also:
LyGraphicalTabs.addTab(LyTab, int), setForceReloadState(boolean)

removeTab

public void removeTab(LyTab tab)
Sets force reload to true.

Specified by:
removeTab in interface LyGraphicalTabs
Parameters:
tab - The tabs to remove to tabs list.
See Also:
LyGraphicalTabs.removeTab(LyTab), setForceReloadState(boolean)

setEnabled

public void setEnabled(java.lang.String tabId,
                       boolean enabled)
Description copied from interface: LySetTabInterface
This method allows to enable or disable a specific tab.

Specified by:
setEnabled in interface LySetTabInterface
enabled - true if the tab is enabled, false otherwise

setLabel

public void setLabel(java.lang.String tabId,
                     java.lang.String newLabel)
This method allows to change the label of a specific tab.

Specified by:
setLabel in interface LySetTabInterface
Parameters:
tabId - the label or identifier of the tab to be changed
newLabel - the new label of the tab to be changed

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com