Class MstrPageTagHelper

  • Direct Known Subclasses:
    AbstractBodyTagHelper, AbstractIfTagHelper, AbstractNoBodyTagHelper

    public class MstrPageTagHelper
    extends CoreTagHelper
    Class to be used as base for the implementation of the custom tag helpers. It provides the basic set of methods that will allow the custom tags to have access to the PageComponent instance used on the page being rendered, so any required properties can be obtained.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected PageComponent _mstrPage
      Property to keep the information about the PageComponent associated with the page currently being rendered
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanState()
      Resets the state of the tag library, by cleaning the values of the properties initialized for this tag.
      protected ContainerServices getContainerServices()
      Convenience method to retrieve the Container Services object associated with this pageComponent.
      protected ParameterBuilder newHiddenInputBuilder()
      Convenience method to retrieve a new instance of a Hidden Input Builder from the Container Services object.
      protected ParameterBuilder newURIBuilder()
      Convenience method to retrieve a new instance of a URI Builder from the Container Services object.
      protected int resolveNumericAttribute​(java.lang.String attribute)
      Utility method for translating the package, class and constant name information into the number it actually represents.
      void setPageComponent​(PageComponent mstrPage)
      Sets the PageComponent instance that will be used as base for the tag when generating the HTML to return to the user.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _mstrPage

        protected PageComponent _mstrPage
        Property to keep the information about the PageComponent associated with the page currently being rendered
    • Constructor Detail

      • MstrPageTagHelper

        public MstrPageTagHelper()
    • Method Detail

      • setPageComponent

        public void setPageComponent​(PageComponent mstrPage)
        Sets the PageComponent instance that will be used as base for the tag when generating the HTML to return to the user.
        Parameters:
        mstrPage - PageComponent instance corresponding to the page to be shown to the user as a result of his request.
      • 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 class CoreTagHelper
      • resolveNumericAttribute

        protected int resolveNumericAttribute​(java.lang.String attribute)
        Utility method for translating the package, class and constant name information into the number it actually represents. Used mainly for obtaining the ID of events and their arguments.
        Overrides:
        resolveNumericAttribute in class CoreTagHelper
        Parameters:
        attribute - a String that specifies the full location of a constant which int value will be retrieved. For example: com.microstrategy.web.app.beans.EnumServletEvents.WebEventCancel
        Returns:
        the int value associated with the element passed as parameter.
      • getContainerServices

        protected ContainerServices getContainerServices()
        Convenience method to retrieve the Container Services object associated with this pageComponent. If anything fails along the way, returns null.
        Returns:
        The ParameterBuilder instance to use for building URIs.
        Since:
        MicroStrategy Web 8.0.0
      • newURIBuilder

        protected ParameterBuilder newURIBuilder()
        Convenience method to retrieve a new instance of a URI Builder from the Container Services object. If anything fails along the way, returns null.
        Returns:
        The ParameterBuilder instance to use for building URIs.
        Since:
        MicroStrategy Web 8.0.0
      • newHiddenInputBuilder

        protected ParameterBuilder newHiddenInputBuilder()
        Convenience method to retrieve a new instance of a Hidden Input Builder from the Container Services object. If anything fails along the way, returns null.
        Returns:
        The ParameterBuilder instance to use for building URIs.
        Since:
        MicroStrategy Web 8.0.0