Class ShortcutTagHelper
- java.lang.Object
-
- com.microstrategy.web.app.taglibs.CoreTagHelper
-
- com.microstrategy.web.app.taglibs.MstrPageTagHelper
-
- com.microstrategy.web.app.taglibs.AbstractBodyTagHelper
-
- com.microstrategy.web.app.taglibs.ShortcutTagHelper
-
public class ShortcutTagHelper extends AbstractBodyTagHelper
Helper for theShortcutOptionsTag
tag library.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.app.taglibs.MstrPageTagHelper
_mstrPage
-
-
Constructor Summary
Constructors Constructor Description ShortcutTagHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyClass(java.lang.String className, java.lang.String styleName, java.lang.String selectedName)
Adds a new property class to the list.void
cleanState()
Resets the state of the tag library, by cleaning the values of the properties initialized for this tag.MarkupOutput
getContentHead()
Obtains the contents to render before the tag's body.MarkupOutput
getContentTail()
Obtains the contents to render after the tag's body.java.lang.String
getNormalClass()
Gets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helperjava.lang.String
getSelectedClass()
Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helperjava.lang.String
getSelectedShortcut()
Gets the value assigned to the selected attribute of the custom tag instance that uses this helperMarkupOutput
getShortcutMarkup()
Generates the HTML content for the current shortcut element.java.lang.String
getType()
Gets the value assigned to the type attribute of the custom tag instance that uses this helperboolean
getUcase()
Gets the value assigned to the ucase attribute of the custom tag instance that uses this helperboolean
hasMoreElements()
Determines if there are still elements on the shortcut list to be displayedboolean
isTagVisible()
Indicates if the tag is visible or not.boolean
nextElement()
Moves the current position to the next element in the shortcut list that shall be displayed on the page.java.lang.String
processShortcutBody(java.lang.String bodyContent)
Analyzes the body of this tag instance in search of anyAPPLYPROPERTY
special attribute that was defined together with aShortcutPropertyTag
tag so each one of the elements is formatted.void
setNormalClass(java.lang.String value)
Sets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helpervoid
setSelectedClass(java.lang.String value)
Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helpervoid
setSelectedShortcut(java.lang.String value)
Sets the value assigned to the selected attribute of the custom tag instance that uses this helpervoid
setType(java.lang.String value)
Sets the value assigned to the type attribute of the custom tag instance that uses this helpervoid
setUcase(boolean value)
Sets the value assigned to the ucase attribute of the custom tag instance that uses this helperboolean
shallRepeatTag()
Indicates if the content of the tag should be analyzed and displayed again or not.-
Methods inherited from class com.microstrategy.web.app.taglibs.MstrPageTagHelper
getContainerServices, newHiddenInputBuilder, newURIBuilder, resolveNumericAttribute, setPageComponent
-
Methods inherited from class com.microstrategy.web.app.taglibs.CoreTagHelper
getTagsFactory
-
-
-
-
Method Detail
-
cleanState
public void cleanState()
Resets the state of the tag library, by cleaning the values of the properties initialized for this tag.- Overrides:
cleanState
in classMstrPageTagHelper
-
hasMoreElements
public boolean hasMoreElements()
Determines if there are still elements on the shortcut list to be displayed- Returns:
true
if the shortcut list contains at least one more element that shall be shown on the page.
-
nextElement
public boolean nextElement()
Moves the current position to the next element in the shortcut list that shall be displayed on the page.- Returns:
true
there exists still an element to be displayed, andfalse
if there's no more elements to render.
-
addPropertyClass
public void addPropertyClass(java.lang.String className, java.lang.String styleName, java.lang.String selectedName)
Adds a new property class to the list. This mehod is called from the ShortcutPropertyTag for applying any special formatting to the elements to be displayed.
-
getShortcutMarkup
public MarkupOutput getShortcutMarkup()
Generates the HTML content for the current shortcut element.- Returns:
- a
MarkupOutput
instance initialized with all the HTML content that shall be rendered for the current shortcut item.
-
processShortcutBody
public java.lang.String processShortcutBody(java.lang.String bodyContent)
Analyzes the body of this tag instance in search of anyAPPLYPROPERTY
special attribute that was defined together with aShortcutPropertyTag
tag so each one of the elements is formatted.- Returns:
- a
String
value with the final body content of the tag, with the style definition added, as specified by theShortcutPropertyTag
and theAPPLYPROPERTY
value.
-
isTagVisible
public boolean isTagVisible()
Indicates if the tag is visible or not.- Specified by:
isTagVisible
in classAbstractBodyTagHelper
- Returns:
- a
boolean
value indicating if the tag is visible or not
-
shallRepeatTag
public boolean shallRepeatTag()
Indicates if the content of the tag should be analyzed and displayed again or not.- Specified by:
shallRepeatTag
in classAbstractBodyTagHelper
- Returns:
- a
boolean
value indicating if the tag contents should be analyzed again or not.
-
getContentHead
public MarkupOutput getContentHead() throws java.io.IOException
Obtains the contents to render before the tag's body.- Specified by:
getContentHead
in classAbstractBodyTagHelper
- Returns:
- a
MarkupOutput
instance initialized with the contents to display - Throws:
java.io.IOException
- if an error happens while getting the contents to render.
-
getContentTail
public MarkupOutput getContentTail() throws java.io.IOException
Obtains the contents to render after the tag's body.- Specified by:
getContentTail
in classAbstractBodyTagHelper
- Returns:
- a
MarkupOutput
instance initialized with the contents to display - Throws:
java.io.IOException
- if an error happens while getting the contents to render.
-
setNormalClass
public void setNormalClass(java.lang.String value)
Sets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helper- Parameters:
value
-String
value of the CSS class to apply
-
getNormalClass
public java.lang.String getNormalClass()
Gets the value assigned to the shortcutClass attribute of the custom tag instance that uses this helper- Returns:
String
value of the CSS class to apply
-
setSelectedClass
public void setSelectedClass(java.lang.String value)
Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helper- Parameters:
value
-String
value of the CSS class to apply for the selected shortcut.
-
setType
public void setType(java.lang.String value)
Sets the value assigned to the type attribute of the custom tag instance that uses this helper- Parameters:
value
-String
value of the type of shortcut list to display
-
setUcase
public void setUcase(boolean value)
Sets the value assigned to the ucase attribute of the custom tag instance that uses this helper- Parameters:
value
-boolean value defining the upper case flag
-
getUcase
public boolean getUcase()
Gets the value assigned to the ucase attribute of the custom tag instance that uses this helper- Returns:
boolean value defining the upper case flag
-
getType
public java.lang.String getType()
Gets the value assigned to the type attribute of the custom tag instance that uses this helper- Returns:
String
value of the type of shortcut list to display.
-
getSelectedClass
public java.lang.String getSelectedClass()
Sets the value assigned to the shortcutSelectedClass attribute of the custom tag instance that uses this helper- Returns:
String
value of the CSS class to apply to the selected shortcut.
-
getSelectedShortcut
public java.lang.String getSelectedShortcut()
Gets the value assigned to the selected attribute of the custom tag instance that uses this helper- Returns:
- a
String
with the name of the selected shortcut
-
setSelectedShortcut
public void setSelectedShortcut(java.lang.String value)
Sets the value assigned to the selected attribute of the custom tag instance that uses this helper- Parameters:
value
- aString
with the name of the selected shortcut
-
-