Examples of ScriptTag


Examples of com.github.dandelion.core.html.ScriptTag

    switch (asset.getType()) {
    case css:
      tag = new LinkTag(asset.getFinalLocation());
      break;
    case js:
      tag = new ScriptTag(asset.getFinalLocation());
      break;
    default:
      tag = null;
    }
    if (tag != null) {
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

    public void renderView(ServletRequest request, ServletResponse response, ServletContext servletContext)
            throws IOException
    {
        ResponseRenderAppender appender = new ResponseRenderAppender(response);
        ScriptTag.State state = new ScriptTag.State();
        ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, request);
        state.suppressComments = false;
        br.doStartTag(appender, state);

        appender.append(ScriptRequestState.getString("popupReturn_begin", null));
        assert request instanceof HttpServletRequest : request.getClass().getName();
        HttpServletRequest httpRequest = (HttpServletRequest) request;

        if (_retrieveMap != null) {
            for (Iterator/*<Map.Entry>*/ i = _retrieveMap.entrySet().iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry) i.next();
                String fieldID = (String) entry.getKey();
                String expressionToRetrieve = "${" + (String) entry.getValue() + '}';
                try {
                    String value =
                            InternalExpressionUtils.evaluateMessage(expressionToRetrieve, null, httpRequest, servletContext);
                    String item =
                            ScriptRequestState.getString("popupReturn_item", new Object[]{fieldID, value});
                    appender.append(item);
                }
                catch (ELException e) {
                    _log.error("Error evaluating expression " + expressionToRetrieve, e);
                }
            }
        }

        appender.append(ScriptRequestState.getString("popupReturn_end", new Object[]{_callbackFunc}));
        br.doEndTag(appender, false);
    }
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

        if (writeLegacy || _writeId || writeName)
            jsu.writeNetuiNameFunctions(this, writeLegacy, _writeId, writeName);

        ScriptTag.State state = null;
        ScriptTag br = null;
        if (_funcBlocks != null && _funcBlocks.size() > 0) {
            if (!script) {
                state = new ScriptTag.State();
                state.suppressComments = false;
                br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, pageContext.getRequest());
                br.doStartTag(sb, state);
                script = true;
            }
            String s = ScriptRequestState.getString("functionComment", null);
            sb.append(s);
            int cnt = _funcBlocks.size();
            for (int i = 0; i < cnt; i++) {
                sb.append((String)_funcBlocks.get(i));
                if (i != cnt - 1) {
                    sb.append("\n");
                }
            }
        }

        if (script) {
            assert(br != null);
            br.doEndTag(sb, false);
        }
    }
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

    public static void writeScriptBlock(ServletRequest req, AbstractRenderAppender results, String script)
    {
        assert(results != null);
        ScriptTag.State state = new ScriptTag.State();
        state.suppressComments = false;
        ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, req);

        results.append("\n");
        br.doStartTag(results, state);
        results.append(script);
        br.doEndTag(results, false);
        results.append("\n");
    }
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

            throws IOException
    {
        response.setContentType("text/html; charset=UTF-8");
        ResponseRenderAppender appender = new ResponseRenderAppender(response);
        ScriptTag.State state = new ScriptTag.State();
        ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, request);
        state.suppressComments = false;
        br.doStartTag(appender, state);

        appender.append(ScriptRequestState.getString("popupReturn_begin", null));
        assert request instanceof HttpServletRequest : request.getClass().getName();
        HttpServletRequest httpRequest = (HttpServletRequest) request;

        if (_retrieveMap != null) {
            for (Iterator/*<Map.Entry>*/ i = _retrieveMap.entrySet().iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry) i.next();
                String fieldID = (String) entry.getKey();
                String expressionToRetrieve = "${" + (String) entry.getValue() + '}';
                try {
                    String value =
                            InternalExpressionUtils.evaluateMessage(expressionToRetrieve, null, httpRequest, servletContext);
                    String item =
                            ScriptRequestState.getString("popupReturn_item", new Object[]{fieldID, value});
                    appender.append(item);
                }
                catch (ELException e) {
                    _log.error("Error evaluating expression " + expressionToRetrieve, e);
                }
            }
        }

        appender.append(ScriptRequestState.getString("popupReturn_end", new Object[]{_callbackFunc}));
        br.doEndTag(appender, false);
    }
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

    public static void writeScriptBlock(ServletRequest req, AbstractRenderAppender results, String script)
    {
        assert(results != null);
        ScriptTag.State state = new ScriptTag.State();
        state.suppressComments = false;
        ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, req);

        results.append("\n");
        br.doStartTag(results, state);
        results.append(script);
        br.doEndTag(results, false);
        results.append("\n");
    }
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

    public static void writeScriptBlock(ServletRequest req, AbstractRenderAppender results, String script)
    {
        assert(results != null);
        ScriptTag.State state = new ScriptTag.State();
        state.suppressComments = false;
        ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, req);

        results.append("\n");
        br.doStartTag(results, state);
        results.append(script);
        br.doEndTag(results, false);
        results.append("\n");
    }
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

        if (writeLegacy || _writeId || writeName)
            jsu.writeNetuiNameFunctions(this, writeLegacy, _writeId, writeName);

        ScriptTag.State state = null;
        ScriptTag br = null;
        if (_funcBlocks != null && _funcBlocks.size() > 0) {
            if (!script) {
                state = new ScriptTag.State();
                state.suppressComments = false;
                br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, pageContext.getRequest());
                br.doStartTag(sb, state);
                script = true;
            }
            String s = ScriptRequestState.getString("functionComment", null);
            sb.append(s);
            int cnt = _funcBlocks.size();
            for (int i = 0; i < cnt; i++) {
                sb.append((String)_funcBlocks.get(i));
                if (i != cnt - 1) {
                    sb.append("\n");
                }
            }
        }

        if (script) {
            assert(br != null);
            br.doEndTag(sb, false);
        }
    }
View Full Code Here

Examples of org.apache.beehive.netui.tags.rendering.ScriptTag

    public void renderView(ServletRequest request, ServletResponse response, ServletContext servletContext)
            throws IOException
    {
        ResponseRenderAppender appender = new ResponseRenderAppender(response);
        ScriptTag.State state = new ScriptTag.State();
        ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderingBase.SCRIPT_TAG, request);
        state.suppressComments = false;
        br.doStartTag(appender, state);

        appender.append(ScriptRequestState.getString("popupReturn_begin", null));
        assert request instanceof HttpServletRequest : request.getClass().getName();
        HttpServletRequest httpRequest = (HttpServletRequest) request;

        if (_retrieveMap != null) {
            for (Iterator/*<Map.Entry>*/ i = _retrieveMap.entrySet().iterator(); i.hasNext();) {
                Map.Entry entry = (Map.Entry) i.next();
                String fieldID = (String) entry.getKey();
                String expressionToRetrieve = "${" + (String) entry.getValue() + '}';
                try {
                    String value =
                            InternalExpressionUtils.evaluateMessage(expressionToRetrieve, null, httpRequest, servletContext);
                    String item =
                            ScriptRequestState.getString("popupReturn_item", new Object[]{fieldID, value});
                    appender.append(item);
                }
                catch (ELException e) {
                    _log.error("Error evaluating expression " + expressionToRetrieve, e);
                }
            }
        }

        appender.append(ScriptRequestState.getString("popupReturn_end", new Object[]{_callbackFunc}));
        br.doEndTag(appender, false);
    }
View Full Code Here

Examples of org.htmlparser.tags.ScriptTag

          if (link.getChild(0) instanceof ImageTag){
            ImageTag img = (ImageTag)link.getChild(0);
            binUrlStr = img.getImageURL();
          }
        } else if (node instanceof ScriptTag){
          ScriptTag script = (ScriptTag)node;
          binUrlStr = script.getAttribute("src");
        } else if (node instanceof LinkTagTag){
          LinkTagTag script = (LinkTagTag)node;
          binUrlStr = script.getAttribute("href");
        }
       
                if (binUrlStr == null)
                {
                    continue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.