Package org.openfaces.util

Examples of org.openfaces.util.Script


        return true;
    }

    private void renderInitScript(FacesContext context) throws IOException {
        boolean useDisplayNoneByDefault = getUseDisplayNoneByDefault();
        Script initScript = new ScriptBuilder().initScript(context, this, "O$.Popup._init",
                useDisplayNoneByDefault).semicolon();
        Rendering.renderInitScript(context, initScript,
                Resources.utilJsURL(context),
                Resources.internalURL(context, "popup.js"));
    }
View Full Code Here


        writer.writeAttribute("style", styleBuilder.toString(), null);
        writer.writeText(weightFormat.format(getWeight()), null);
        writer.endElement("span");

        Script initScript = new ScriptBuilder().initScript(context, this, "O$.TagCloudItem._init",
                styleClass,
                rolloverStyleClass,
                tagCloud.getClientId(context),
                tagCloud.getStyle(),
                tagCloud.getStyleClass()
View Full Code Here

        ValidationProcessor processor = ValidationProcessor.getInstance(context);
        HtmlMessages htmlMessages = (HtmlMessages) component;
        if (processor != null) {
            String styleClassName = Styles.getCSSClass(context, component, htmlMessages.getStyle(), htmlMessages.getStyleClass());

            Script clientScript = getClientScript(context, component, styleClassName);
            Rendering.renderInitScript(context, clientScript, getJavascriptLibraryUrls(context));
            boolean globalOnly = ((UIMessages) component).isGlobalOnly();
            if (!globalOnly) {
                ValidatorUtil.renderPresentationExistsForAllInputComponents(context);
            }
View Full Code Here

        if (forComponentClientId == null) {
            Rendering.logWarning(context, "Cannot render floatingIconMessage because can't calculate " +
                    "target component client ID. It may be caused by 'for' attribute absence");
            return;
        }
        Script clientScript = getClientScript(context, fim, forComponentClientId,
                clientValidation, pageDefinedMessage, useDCVP, useDSVP);
        Rendering.renderInitScript(context, clientScript, getJavascriptLibraryUrls(context));
        if (clientScript.toString().length() > 0) {
            if (!isDefaultPresentation(fim))
                ValidatorUtil.renderPresentationExistsForComponent(forComponentClientId, context);
            Styles.renderStyleClasses(context, fim, true, false);
        }
    }
View Full Code Here

                }
                UIForm form = Components.getEnclosingForm(component);
                if (validationProcessor.isUseDefaultClientValidationPresentationForForm(form)) {
                    ValidatorUtil.renderPresentationExistsForComponent(forComponentClientId, context);
                }
                Script clientScript = getClientScript(component.getClientId(context), forComponentClientId, component);
                Rendering.renderInitScript(context, clientScript, getJavascriptLibraryUrls(context, clientValidation));
                Styles.renderStyleClasses(context, component);
            }
        }
    }
View Full Code Here

    private void encodeScripts(FacesContext context, TagCloud cloud) throws IOException {
        String  rolloverClass = getRolloverStyleClass(context, cloud);
        String  itemRolloverClass = getItemRolloverStyleClass(context, cloud);

        Script initScript = new ScriptBuilder().initScript(context, cloud, "O$.TagCloud._init",
                cloud.getLayout(),
                rolloverClass,
                itemRolloverClass,
                cloud.getShadowScale3D(),
                cloud.getRotationSpeed3D(),
View Full Code Here

    protected void renderInitScript(FacesContext facesContext, SelectBooleanCheckbox checkbox,
                                    JSONObject imagesObj, JSONObject stylesObj,
                                    AnonymousFunction onchangeFunction, boolean triStateAllowed) throws IOException {
        Iterable<String> stateList = getStateList(checkbox, triStateAllowed);
        Script initScript = new ScriptBuilder().initScript(facesContext, checkbox, "O$.Checkbox._init",
                imagesObj,
                stylesObj,
                stateList,

                checkbox.isDisabled(),
View Full Code Here

    protected void renderInitScript(FacesContext facesContext, OUISelectManyInputBase selectManyInputBase,
                                    JSONObject imagesObj, JSONObject stylesObj,
                                    int selectItemCount, AnonymousFunction onchangeFunction)
            throws IOException {
        SelectManyCheckbox selectManyCheckbox = (SelectManyCheckbox) selectManyInputBase;
        Script initScript = new ScriptBuilder().initScript(facesContext, selectManyCheckbox, "O$.ManyCheckbox._init",
                imagesObj,
                stylesObj,
                selectItemCount,
                selectManyCheckbox.isDisabled(),
                selectManyCheckbox.isReadonly(),
View Full Code Here

        String defaultProgressImgUrl = Resources.getURL(context, null, null, progressBar.getDefaultProgressImgUrl());
        listOfImages.add(defaultProgressImgUrl);

        Rendering.renderPreloadImagesScript(context, listOfImages, false);

        Script initScript = new ScriptBuilder().initScript(context, progressBar, "O$.ProgressBar._init",
                progressBar.getValue(),
                progressBar.getLabelAlignment(),
                progressBar.getLabelFormat(),
                defaultProgressImgUrl,
                DEF_PROGRESS_CLASS
View Full Code Here

    protected void renderInitScript(FacesContext facesContext, OUISelectManyInputBase selectManyInputBase,
                                    JSONObject imagesObj, JSONObject stylesObj, int selectItemCount, AnonymousFunction onchangeFunction)
            throws IOException {
        SelectOneRadio selectOneRadio = (SelectOneRadio) selectManyInputBase;
        Script initScript = new ScriptBuilder().initScript(facesContext, selectOneRadio, "O$.Radio._init",
                imagesObj,
                stylesObj,
                selectItemCount,
                selectOneRadio.isDisabled(),
                selectOneRadio.isReadonly(),
View Full Code Here

TOP

Related Classes of org.openfaces.util.Script

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.