Package com.microstrategy.web.tags
Class WebBlockEditTagImpl
- java.lang.Object
-
- com.microstrategy.web.tags.TagImpl
-
- com.microstrategy.web.tags.WebBlockEditTagImpl
-
- All Implemented Interfaces:
DynamicTag
,EnumHTMLTags
,LayoutParserAware
,Tag
,java.io.Serializable
- Direct Known Subclasses:
WebBlockEditBlockTagImpl
,WebBlockEditListTagImpl
public abstract class WebBlockEditTagImpl extends TagImpl
- Since:
- MicroStrategy Web 9.0.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
resolvedMethodName
-
Fields inherited from interface com.microstrategy.web.tags.DynamicTag
ATTR_NAME_METHOD, ATTR_NAME_METHOD_BASE, ATTR_NAME_NAME, METHOD_SOURCE_BEAN, METHOD_SOURCE_BEAN_NAME, METHOD_SOURCE_OBJECT, METHOD_SOURCE_TRANSFORM, METHOD_SOURCE_TRANSFORM_NAME
-
Fields inherited from interface com.microstrategy.web.tags.EnumHTMLTags
ATT_ACTION, ATT_ALIGN, ATT_ALT, ATT_AUTOCOMPLETE, ATT_BORDER, ATT_CELLPADDING, ATT_CELLSPACING, ATT_CHECKED, ATT_CLASS, ATT_CMD_FORMAT_TYPE, ATT_CMDID, ATT_CMDLVL, ATT_COLS, ATT_COLSPAN, ATT_DG, ATT_DIALOG, ATT_DISABLED, ATT_FOR, ATT_HEIGHT, ATT_HREF, ATT_HSPACE, ATT_ID, ATT_IFRAME, ATT_LANGUAGE, ATT_MAXLENGTH, ATT_METHOD, ATT_MODAL, ATT_NAME, ATT_NOWRAP, ATT_ONCHANGE, ATT_ONCLICK, ATT_ONFOCUS, ATT_ONKEYDOWN, ATT_ONKEYUP, ATT_ONMOUSEOUT, ATT_ONMOUSEOVER, ATT_ONSUBMIT, ATT_PARAM, ATT_PLACEHOLDER, ATT_READONLY, ATT_REL, ATT_ROWS, ATT_ROWSPAN, ATT_SCRIPT_CLASS, ATT_SELECTED, ATT_SIZE, ATT_SRC, ATT_STYLE, ATT_SUMMARY, ATT_TARGET, ATT_TITLE, ATT_TY, ATT_TYPE, ATT_VALIGN, ATT_VALUE, ATT_VALUE_ABSBOTTOM, ATT_VALUE_ABSMIDDLE, ATT_VALUE_BOTTOM, ATT_VALUE_BUTTON, ATT_VALUE_CHECKBOX, ATT_VALUE_DEFAULT, ATT_VALUE_EMBED, ATT_VALUE_FALSE, ATT_VALUE_HIDDEN, ATT_VALUE_IMAGE, ATT_VALUE_JAVASCRIPT, ATT_VALUE_LEFT, ATT_VALUE_MAX, ATT_VALUE_MIDDLE, ATT_VALUE_MIN, ATT_VALUE_NUMBER, ATT_VALUE_POST, ATT_VALUE_RADIO, ATT_VALUE_SUBMIT, ATT_VALUE_TEXT, ATT_VALUE_TOP, ATT_VALUE_TRUE, ATT_VSPACE, ATT_WIDTH, TAG_NAME_ANCHOR, TAG_NAME_CELL, TAG_NAME_DIV, TAG_NAME_HEADER, TAG_NAME_IFRAME, TAG_NAME_IMAGE, TAG_NAME_INPUT, TAG_NAME_LABEL, TAG_NAME_MAP, TAG_NAME_OPTION, TAG_NAME_ROW, TAG_NAME_SCRIPT, TAG_NAME_SELECT, TAG_NAME_SPAN, TAG_NAME_STYLE, TAG_NAME_TABLE, TAG_NAME_TBODY, TAG_NAME_TEXTAREA, TAG_NAME_THEAD
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addArgument(ArgumentTag tag)
Adds anArgumentTag
as a child of the current tag.Tag
addChild(Tag tag)
Adds a child tag.void
addOnException(OnExceptionTag tag)
Adds anOnExceptionTag
as a child of the current tag.void
childrenAdded()
void
doEndTag(LayoutContext context)
This method is called after the rendering methodTag.renderCloseTag(MarkupOutput)
is called to render the closing part of a tag, such as "".void
doStartTag(LayoutContext context)
This method is called before the rendering methodTag.renderOpenTag(MarkupOutput, LayoutContext)
is called to render the opening part of a tag, such as "".java.util.Enumeration
getArguments()
Returns anEnumeration
over all the arguments of the method from which the dynamic contents are generated.protected java.util.List
getCachedArguments()
protected abstract java.lang.Object
getEditObject(BlockTarget pathTarget)
protected java.util.List
getExceptions()
protected java.lang.Object[]
getInvocationArguments(MarkupOutput markup, LayoutContext context)
protected java.lang.Object[]
getInvocationArgumentsFromContext(MarkupOutput markup, LayoutContext context)
java.lang.String
getMethodName()
Returns the method name from which the dynamic contents are generated.protected abstract java.lang.Class
getMethodParameterClass()
protected java.lang.Object
getMethodParameterObject(BlockTarget pathTarget)
protected java.lang.Class[]
getMethodParameters()
This method returns the array of method parameter class.protected java.lang.Class[]
getMethodParametersFromContext(LayoutContext context)
This method returns the method parameters class array from context.int
getMethodSource()
Returns the method source in which the method is defined.java.util.Enumeration
getOnExceptions()
Returns anEnumeration
over all the exception tags associated with the method from which the dynamic contents are generated.protected java.lang.String
getResolvedMethodName()
java.lang.Object
invokeMethod(MarkupOutput markup, LayoutContext context)
Invokes the method to generate the dynamic contents.void
setAttribute(java.lang.String attrName, java.lang.String attrValue)
Sets a new value to the attribute with the specified attribute name.void
setMethodName(java.lang.String methodName)
Sets the method name from which the dynamic contents are generated.void
setMethodSource(java.lang.String source)
Sets the method source in which the method is defined.protected void
setMethodSourceInternal(int source)
-
Methods inherited from class com.microstrategy.web.tags.TagImpl
addChild, addChild, addTextChild, addTextChild, checkEmptyString, checkModifiable, checkNullObject, generateErrorMessage, getAttribute, getAttributeNames, getAttributeNamesCollection, getAttributesCollection, getChildren, getChildrenCollection, getContent, getCssClass, getDeepCopy, getDynamicAttributesCollection, getId, getLineNumber, getPreserveCase, getRootTag, getSealed, getStyle, getTagName, isClosedRequired, isContentInline, isDynamic, removeAttribute, removeChildren, render, render, renderAllAttributes, renderChildTags, renderCloseTag, renderCloseTag, renderOpenTag, renderOpenTag, replaceContent, setAttributes, setCssClass, setDynamic, setDynamicInternal, setId, setIsClosedRequired, setIsContentInline, setLineNumber, setPreserveCase, setRootTag, setSealed, setStyle, setTagName, shouldCloseTag
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.tags.Tag
addChild, addChild, addTextChild, addTextChild, getAttribute, getAttributeNames, getChildren, getContent, getCssClass, getDeepCopy, getId, getLineNumber, getPreserveCase, getRootTag, getSealed, getStyle, getTagName, isClosedRequired, isContentInline, isDynamic, removeChildren, render, render, renderCloseTag, renderOpenTag, renderOpenTag, replaceContent, setAttributes, setCssClass, setDynamic, setId, setIsClosedRequired, setIsContentInline, setLineNumber, setPreserveCase, setRootTag, setSealed, setStyle, setTagName
-
-
-
-
Method Detail
-
doStartTag
public void doStartTag(LayoutContext context)
Description copied from interface:Tag
This method is called before the rendering methodTag.renderOpenTag(MarkupOutput, LayoutContext)
is called to render the opening part of a tag, such as "". It is recommended to put all the preparations in this method that does not require rendering to the
". It is recommended to put all the cleaning work in this method that does not require rendering to theMarkupOutput
object.- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagImpl
- Parameters:
context
- theLayoutContext
object within which the rendering occurs.
-
doEndTag
public void doEndTag(LayoutContext context)
Description copied from interface:Tag
This method is called after the rendering methodTag.renderCloseTag(MarkupOutput)
is called to render the closing part of a tag, such as "
MarkupOutput
object.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagImpl
- Parameters:
context
- theLayoutContext
object within which the rendering occurs.
-
getMethodParametersFromContext
protected java.lang.Class[] getMethodParametersFromContext(LayoutContext context) throws TypeUnsupportedException
This method returns the method parameters class array from context. Default behavior is to retrieve it from cache.- Parameters:
context
- The layout context.- Returns:
- The array of parameter classes.
- Throws:
TypeUnsupportedException
-
getInvocationArgumentsFromContext
protected java.lang.Object[] getInvocationArgumentsFromContext(MarkupOutput markup, LayoutContext context) throws ArgumentUnresolvedException, EmptyListException
-
getMethodParameterClass
protected abstract java.lang.Class getMethodParameterClass()
-
getMethodParameterObject
protected java.lang.Object getMethodParameterObject(BlockTarget pathTarget) throws ArgumentUnresolvedException
- Throws:
ArgumentUnresolvedException
-
getEditObject
protected abstract java.lang.Object getEditObject(BlockTarget pathTarget) throws ArgumentUnresolvedException
- Throws:
ArgumentUnresolvedException
-
getMethodName
public java.lang.String getMethodName()
Description copied from interface:DynamicTag
Returns the method name from which the dynamic contents are generated. The method name is actually the value of the attibuteDynamicTag.ATTR_NAME_METHOD
.- Specified by:
getMethodName
in interfaceDynamicTag
- Returns:
- the method name.
-
setMethodName
public void setMethodName(java.lang.String methodName) throws UnmodifiableException
Description copied from interface:DynamicTag
Sets the method name from which the dynamic contents are generated. The method name is actually the value of the attibuteDynamicTag.ATTR_NAME_METHOD
.- Specified by:
setMethodName
in interfaceDynamicTag
- Parameters:
methodName
- the method name.- Throws:
UnmodifiableException
- thrown if the current tag is read-only.
-
getArguments
public java.util.Enumeration getArguments()
Description copied from interface:DynamicTag
Returns anEnumeration
over all the arguments of the method from which the dynamic contents are generated.- Specified by:
getArguments
in interfaceDynamicTag
- Returns:
- an
Enumeration
over all the arguments.
-
addArgument
public void addArgument(ArgumentTag tag) throws UnmodifiableException
Description copied from interface:DynamicTag
Adds anArgumentTag
as a child of the current tag.- Specified by:
addArgument
in interfaceDynamicTag
- Parameters:
tag
- anArgumentTag
to be added.- Throws:
UnmodifiableException
- thrown if the current tag is read-only.
-
addOnException
public void addOnException(OnExceptionTag tag) throws UnmodifiableException
Description copied from interface:DynamicTag
Adds anOnExceptionTag
as a child of the current tag.- Specified by:
addOnException
in interfaceDynamicTag
- Parameters:
tag
- anOnExceptionTag
to be added.- Throws:
UnmodifiableException
- thrown if the current tag is read-only.
-
getOnExceptions
public java.util.Enumeration getOnExceptions()
Description copied from interface:DynamicTag
Returns anEnumeration
over all the exception tags associated with the method from which the dynamic contents are generated.- Specified by:
getOnExceptions
in interfaceDynamicTag
- Returns:
- an
Enumeration
over all theOnExceptionTag
tags.
-
getMethodSource
public int getMethodSource()
Description copied from interface:DynamicTag
Returns the method source in which the method is defined. Method source can be one of the following- Specified by:
getMethodSource
in interfaceDynamicTag
- Returns:
- the method source.
-
setMethodSource
public void setMethodSource(java.lang.String source) throws UnmodifiableException
Description copied from interface:DynamicTag
Sets the method source in which the method is defined. Method source can be one of the following- Specified by:
setMethodSource
in interfaceDynamicTag
- Parameters:
source
- the method source.- Throws:
UnmodifiableException
- thrown if the current tag is read-only.
-
invokeMethod
public java.lang.Object invokeMethod(MarkupOutput markup, LayoutContext context) throws MalformedMethodException, EmptyListException
Description copied from interface:DynamicTag
Invokes the method to generate the dynamic contents.- Specified by:
invokeMethod
in interfaceDynamicTag
- Parameters:
markup
- aMarkupOutput
object which could be the first parameter of the method if the current tag is aRenderTag
.context
- aLayoutContext
object from which the method source and list values are cached.- Returns:
- the return value of the method call.
- Throws:
MalformedMethodException
- thrown if there is any exception making the method call.EmptyListException
- thrown if theList
cached in theLayoutContext
is empty.
-
addChild
public Tag addChild(Tag tag) throws UnmodifiableException
Description copied from interface:Tag
Adds a child tag.- Specified by:
addChild
in interfaceTag
- Overrides:
addChild
in classTagImpl
- Parameters:
tag
- the child tag to be added.- Returns:
- the child tag just being added.
- Throws:
UnmodifiableException
- thrown if the current tag is read-only.
-
setAttribute
public void setAttribute(java.lang.String attrName, java.lang.String attrValue) throws UnmodifiableException
Description copied from interface:Tag
Sets a new value to the attribute with the specified attribute name. If the specified attribute does not exist in the current tag, adds it. If the specified attribute value is null, removes the attribute from the current tag.- Specified by:
setAttribute
in interfaceTag
- Overrides:
setAttribute
in classTagImpl
- Parameters:
attrName
- the name of the attributeattrValue
- the value of the attribute- Throws:
UnmodifiableException
- thrown if the current tag is read-only.
-
getCachedArguments
protected java.util.List getCachedArguments()
-
getExceptions
protected java.util.List getExceptions()
-
getResolvedMethodName
protected java.lang.String getResolvedMethodName()
-
getMethodParameters
protected java.lang.Class[] getMethodParameters() throws TypeUnsupportedException
This method returns the array of method parameter class. The default behavior is to compute from argument tags.- Returns:
- The array of method parameter class.
- Throws:
TypeUnsupportedException
-
getInvocationArguments
protected java.lang.Object[] getInvocationArguments(MarkupOutput markup, LayoutContext context) throws ArgumentUnresolvedException, EmptyListException
-
setMethodSourceInternal
protected void setMethodSourceInternal(int source)
-
childrenAdded
public void childrenAdded()
- Specified by:
childrenAdded
in interfaceLayoutParserAware
-
-