Package org.openfaces.util

Examples of org.openfaces.util.NewInstanceScript


    }

    @Override
    public Script getClientScript(FacesContext context, UIComponent component) {
        UIComponent forComponent = getForComponent(_for, component);
        return new NewInstanceScript(getJsValidatorName(),
                getFormattedSummary(component),
                getFormattedDetail(component),
                forComponent != null ? forComponent.getClientId(context) : null);
    }
View Full Code Here


        return false;
    }

    public Script getClientScript(FacesContext context, UIComponent component) {
        String jsPattern = '^' + getPattern() + '$';
        return new NewInstanceScript(getJsValidatorName(),
                getFormattedSummary(component),
                getFormattedDetail(component),
                jsPattern,
                isTrimNeeded(),
                getType());
View Full Code Here

        Locale locale = numberConverter.getLocale();
        return new Object[]{
                message.getSummary(),
                message.getDetail(),
                new NewInstanceScript("O$.NumberConverter",
                        numberConverter.getCurrencyCode(),
                        numberConverter.getCurrencySymbol(),
                        locale,
                        numberConverter.getMaxFractionDigits(),
                        numberConverter.getMaxIntegerDigits(),
View Full Code Here

    @Override
    public Script getClientScript(FacesContext context, UIComponent component) {
        String dynamicClientFunction = (String) getDynamicValue(clientFunction);

        return new NewInstanceScript("O$._CustomValidator",
                getFormattedSummary(component),
                getFormattedDetail(component),
                new AnonymousFunction(
                        dynamicClientFunction != null ? dynamicClientFunction : ("return true;"),
                        "input", "value"));
View Full Code Here

    protected AbstractClientValidator() {
        addJavascriptLibrary(new ValidationJavascriptLibrary("validatorUtil.js", null));
    }

    public Script getClientScript(FacesContext context, final UIComponent component) {
        return new NewInstanceScript(getJsValidatorName(), getJsValidatorParametersAsString(context, component));
    }
View Full Code Here

        Styles.renderStyleClasses(context, messageComponent);
    }

    private Script getClientScript(FacesContext context, UIComponent messageComponent, String css) {
        String messageClientId = messageComponent.getClientId(context);
        return new ScriptBuilder().functionCall("O$.addMessagesRenderer", new NewInstanceScript("O$._MessagesRenderer",
                messageClientId,
                getTitle(messageComponent),
                isTooltip(messageComponent),
                isShowSummary(messageComponent),
                isShowDetail(messageComponent),
View Full Code Here

                !fim.isNoStyle() ? fim.getStyle() : null, DEFAULT_CLASS,
                !fim.isNoStyle() ? fim.getStyleClass() : null);
        JSONObject events = Rendering.getEventsParam(fim, "onclick", "ondblclick", "onmousedown", "onmouseover", "onmousemove", "onmouseout", "onmouseup");

        ScriptBuilder clientValidationScript = new ScriptBuilder().functionCall("O$.addClientMessageRenderer",
                new NewInstanceScript("O$._FloatingIconMessageRenderer",
                        fim,
                        forComponentClientId,
                        getImageUrl(fim),
                        getOffsetTop(fim),
                        getOffsetLeft(fim),
View Full Code Here

            throw new NullPointerException("forComponentClientId");
        }

        ScriptBuilder resultString = new ScriptBuilder();
        resultString.functionCall("O$.addClientMessageRenderer",
                new NewInstanceScript("O$._MessageRenderer",
                        messageClientId,
                        forComponentClientId,
                        getTitle(messageComponent),
                        isTooltip(messageComponent),
                        isShowSummary(messageComponent),
View Full Code Here

TOP

Related Classes of org.openfaces.util.NewInstanceScript

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.