Class LoadScriptTag

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class LoadScriptTag
    extends javax.servlet.jsp.tagext.TagSupport
    See Also:
    Serialized Form
    • Constructor Detail

      • LoadScriptTag

        public LoadScriptTag()
    • Method Detail

      • setWebContext

        public void setWebContext​(String webContext)
      • getWebContext

        public String getWebContext()
      • setSrc

        public void setSrc​(String src)
      • getSrc

        public String getSrc()
      • getJsPromiseScope

        public String getJsPromiseScope()
      • setJsPromiseScope

        public void setJsPromiseScope​(String jsPromiseScope)
      • getJsPromiseName

        public String getJsPromiseName()
      • setJsPromiseName

        public void setJsPromiseName​(String jsPromiseName)
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.TagSupport
        Throws:
        javax.servlet.jsp.JspException
      • generateDynamicScriptLoading

        public static String generateDynamicScriptLoading​(String src,
                                                          String jsPromiseName,
                                                          String jsPromiseScope)
        Centralization of dynamic script instantiation. Even if several calls are done for a same HTML page, the script is loaded one time only.
        Parameters:
        src - the script src.
        jsPromiseName - the name of a promise.
        jsPromiseScope - the scope of the promise.
        Returns:
        the loading treatment.