Package org.richfaces.javascript

Examples of org.richfaces.javascript.JavaScriptService


            } else {
                String clientId = component.getClientId(context);

                setContextAttribute(context, clientId);

                JavaScriptService javaScriptService = ServiceTracker.getService(context, JavaScriptService.class);
                javaScriptService.addPageReadyScript(context, new JSLiteral(String.format(SCRIPT, clientId)));
            }
        }
    }
View Full Code Here


    public void setValue(String value) {
        this.value = value;
    }

    public String action() {
        JavaScriptService javaScriptService = ServiceTracker.getService(JavaScriptService.class);
        FacesContext facesContext = FacesContext.getCurrentInstance();
        javaScriptService.addPageReadyScript(facesContext, SCRIPT);
        return null;
    }
View Full Code Here

    public static final String RENDERER_TYPE = "org.richfaces.bootstrap.PopoverRenderer";
   
    private static JSLiteral POPOVER_INIT_CODE = new JSLiteral("$('[rel=popover]').popover();");
   
    public void ensureInitCode(FacesContext facesContext) {
        JavaScriptService service = ServiceTracker.getService(JavaScriptService.class);
       
        service.addPageReadyScript(facesContext, POPOVER_INIT_CODE);
    }
View Full Code Here

    public static final String RENDERER_TYPE = "org.richfaces.bootstrap.TooltipRenderer";
   
    private static JSLiteral TOOLTIP_INIT_CODE = new JSLiteral("$('[rel=tooltip]').tooltip();");
   
    public void ensureInitCode(FacesContext facesContext) {
        JavaScriptService service = ServiceTracker.getService(JavaScriptService.class);
       
        service.addPageReadyScript(facesContext, TOOLTIP_INIT_CODE);
    }
View Full Code Here

        Object script = getScriptObject(context, component);
        if (script == null) {
            return;
        }

        JavaScriptService service = ServiceTracker.getService(JavaScriptService.class);
        service.addScript(context, script);
    }
View Full Code Here

     */
    protected void addOnCompleteParam(FacesContext context, String itemName, String panelId) {
        String script = new StringBuilder().append("RichFaces.$('").append(panelId).append("').onCompleteHandler('")
                .append(itemName).append("');").toString();

        JavaScriptService scriptService = ServiceTracker.getService(JavaScriptService.class);
        scriptService.addScript(context, new JSLiteral(script.toString()));
    }
View Full Code Here

        Object script = getScriptObject(context, component);
        if (script == null) {
            return;
        }

        JavaScriptService javaScriptService = ServiceTracker.getService(JavaScriptService.class);
        javaScriptService.addScript(context, script);
    }
View Full Code Here

    /**
     * This method ensures that component which should be focused will be present in the page in the time of running script (oncomplete).
     */
    public void renderOncompleteScript(FacesContext context, String script) {
        JavaScriptService javaScriptService = ServiceTracker.getService(JavaScriptService.class);
        javaScriptService.addScript(context, new JSLiteral(script));
    }
View Full Code Here

            } else {
                String clientId = component.getClientId(context);

                setContextAttribute(context, clientId);

                JavaScriptService javaScriptService = ServiceTracker.getService(context, JavaScriptService.class);
                javaScriptService.addPageReadyScript(context, new JSLiteral(String.format(SCRIPT, clientId)));
            }
        }
    }
View Full Code Here

* @author abelevich
*
*/
public abstract class DnDRenderBase extends RendererBase {
    public void buildAndStoreScript(FacesContext facesContext, UIComponent component) {
        JavaScriptService javaScriptService = ServiceTracker.getService(JavaScriptService.class);
        DnDScript dragScript = buildClientScript(facesContext, component);
        if (javaScriptService != null && dragScript != null) {
            javaScriptService.addPageReadyScript(facesContext, dragScript);
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.javascript.JavaScriptService

Copyright © 2018 www.massapicom. 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.