Examples of ScriptManager


Examples of it.eng.spagobi.utilities.scripting.ScriptManager

  public IDataStore load(IDataReader dataReader) {
    logger.debug("IN");
    String data = null;
    IDataStore dataStore = null;
    ScriptManager sm = new ScriptManager();
    if(predefinedGroovyScriptFileName!=null && !predefinedGroovyScriptFileName.equals("")){
      sm.setPredefinedGroovyScriptFileName(predefinedGroovyScriptFileName);
    }
    if(predefinedJsScriptFileName!=null && !predefinedJsScriptFileName.equals("")){
      sm.setPredefinedJsScriptFileName(predefinedJsScriptFileName);
    }
   
    try {
      if(statement != null){
        logger.debug("Statement "+statement);
        data = sm.runScript(statement, languageScript);
      }
      else{
        logger.debug("Use script (no parameters) "+script);
        data = sm.runScript(script, languageScript);
      }
      // check if the result must be converted into the right xml sintax
      boolean toconvert = checkSintax(data);
      if(toconvert) {
        data = convertResult(data);
View Full Code Here

Examples of it.eng.spagobi.utilities.scripting.ScriptManager

    Binding bind = ScriptManager.fillBinding(attributes);

    //Substitute profile attributes with their value
    String cleanScript=substituteProfileAttributes(getScript(), attributes);
    setScript(cleanScript);
    ScriptManager sm = new ScriptManager();
    result = sm.runScript(getScript(), bind, languageScript);  
    // check if the result must be converted into the right xml sintax
    boolean toconvert = checkSintax(result);
    if(toconvert) {
      result = convertResult(result);
    }
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

            throw new JspException("RegionWidget not set: " + regionWidget);
        }

        if (widget != null && getBean().getSupportedWidgetTypes().contains(widget.getType()) ) {
            if ( widget.isDisableRendering() ) {
                ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
                String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getId(),
                        regionWidget.getId(),
                        StringEscapeUtils.escapeJavaScript(widget.getDisableRenderingMessage()),
                        regionWidget.isCollapsed(),
                        widget.getId());
                String key = REGISTER_DISABLED_WIDGET_KEY + "-" + widget.getId();
                scriptManager.registerScriptBlock(key, widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
            } else {
                writeString(getBean().render(new RegionWidgetWrapper(widget, regionWidget), getContext()));
            }
        }
        else {
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

    @Override
    public int doStartTag() throws JspException {

        if (regionWidget != null && getBean().getSupportedWidgetTypes().contains(regionWidget.getWidget().getType()) ) {
            if ( regionWidget.getWidget().isDisableRendering() ) {
                ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
                String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getEntityId(),
                        regionWidget.getEntityId(),
                        StringEscapeUtils.escapeJavaScript(regionWidget.getWidget().getDisableRenderingMessage()),
                        regionWidget.isCollapsed(),
                        regionWidget.getWidget().getEntityId());
                scriptManager.registerScriptBlock(widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
            } else {
                writeString(getBean().render(regionWidget, getContext()));
            }
        }
        else {
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

    @Override
    public int doStartTag() throws JspException {

        if (regionWidget != null && getBean().getSupportedWidgetTypes().contains(regionWidget.getWidget().getType()) ) {
            if ( regionWidget.getWidget().isDisableRendering() ) {
                ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
                String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getId(),
                        regionWidget.getId(),
                        StringEscapeUtils.escapeJavaScript(regionWidget.getWidget().getDisableRenderingMessage()),
                        regionWidget.isCollapsed(),
                        regionWidget.getWidget().getId());
                String key = REGISTER_DISABLED_WIDGET_KEY + "-" + regionWidget.getWidget().getId();
                scriptManager.registerScriptBlock(key, widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
            } else {
                writeString(getBean().render(regionWidget, getContext()));
            }
        }
        else {
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

            throw new JspException("RegionWidget not set: " + regionWidget);
        }

        if (widget != null && getBean().getSupportedWidgetTypes().contains(widget.getType()) ) {
            if ( widget.isDisableRendering() ) {
                ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
                String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getId(),
                        regionWidget.getId(),
                        StringEscapeUtils.escapeJavaScript(widget.getDisableRenderingMessage()),
                        regionWidget.isCollapsed(),
                        widget.getId());
                String key = REGISTER_DISABLED_WIDGET_KEY + "-" + widget.getId();
                scriptManager.registerScriptBlock(key, widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
            } else {
                writeString(getBean().render(new RegionWidgetWrapper(widget, regionWidget), getContext()));
            }
        }
        else {
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

            throw new JspException("RegionWidget not set: " + regionWidget);
        }

        if (widget != null && getBean().getSupportedWidgetTypes().contains(widget.getType()) ) {
            if ( widget.isDisableRendering() ) {
                ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
                String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getId(),
                        regionWidget.getId(),
                        StringEscapeUtils.escapeEcmaScript(widget.getDisableRenderingMessage()),
                        regionWidget.isCollapsed(),
                        widget.getId());
                String key = REGISTER_DISABLED_WIDGET_KEY + "-" + widget.getId();
                scriptManager.registerScriptBlock(key, widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
            } else {
                writeString(getBean().render(new RegionWidgetWrapper(widget, regionWidget), getContext()));
            }
        }
        else {
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

            throw new JspException("RegionWidget not set: " + regionWidget);
        }

        if (widget != null && getBean().getSupportedWidgetTypes().contains(widget.getType()) ) {
            if ( widget.isDisableRendering() ) {
                ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
                String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getId(),
                        regionWidget.getId(),
                        StringEscapeUtils.escapeJavaScript(widget.getDisableRenderingMessage()),
                        regionWidget.isCollapsed(),
                        widget.getId());
                String key = REGISTER_DISABLED_WIDGET_KEY + "-" + widget.getId();
                scriptManager.registerScriptBlock(key, widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
            } else {
                writeString(getBean().render(new RegionWidgetWrapper(widget, regionWidget), getContext()));
            }
        }
        else {
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

    @Override
    public int doStartTag() throws JspException {

        if (regionWidget != null && getBean().getSupportedWidgetTypes().contains(regionWidget.getWidget().getType()) ) {
            if ( regionWidget.getWidget().isDisableRendering() ) {
                ScriptManager scriptManager = getBeanFromContext(ScriptManager.class);
                String widgetScript = String.format(DISABLED_SCRIPT_BLOCK, regionWidget.getRegion().getEntityId(),
                        regionWidget.getEntityId(),
                        StringEscapeUtils.escapeJavaScript(regionWidget.getWidget().getDisableRenderingMessage()),
                        regionWidget.isCollapsed(),
                        regionWidget.getWidget().getEntityId());
                scriptManager.registerScriptBlock(widgetScript, ScriptLocation.AFTER_RAVE, RenderScope.CURRENT_REQUEST, getContext());
            } else {
                writeString(getBean().render(regionWidget, getContext()));
            }
        }
        else {
View Full Code Here

Examples of org.apache.rave.portal.web.renderer.ScriptManager

    }

    @Override
    public int doStartTag() throws JspException {
        int returnValue = SKIP_BODY;
        ScriptManager scriptManager = getBean();
        validateParams(scriptManager);
        List<String> scripts = scriptManager.getScriptBlocks(location, getContext());
        if(scripts != null) {
            renderScripts(scripts);
            returnValue = EVAL_BODY_INCLUDE;
        }
        location = null;
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.