Examples of ViolationSeverityInterpreter


Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

    }

    public static void tryToThrowValidatorExceptionForComponent(
            UIComponent uiComponent, FacesMessage facesMessage, Throwable throwable)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (interpreter.severityCausesValidatorException(facesContext, uiComponent, facesMessage.getSeverity()))
        {
            if (throwable == null)
            {
                throw new ValidatorException(facesMessage);
            }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

    }

    @ToDo(value = Priority.MEDIUM, description = "required for test frameworks - goal: remove it")
    private static void tryToAddViolationMessageForTestClientId(String clientId, FacesMessage facesMessage)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (interpreter.severityCausesViolationMessage(facesContext, null, facesMessage.getSeverity()))
        {
            addFacesMessage(clientId, facesMessage);
        }
        tryToBlocksNavigationForComponent(null, facesMessage);
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

        tryToBlocksNavigationForComponent(null, facesMessage);
    }

    public static void tryToAddViolationMessageForComponent(UIComponent uiComponent, FacesMessage facesMessage)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (interpreter.severityCausesViolationMessage(facesContext, uiComponent, facesMessage.getSeverity()))
        {
            if (uiComponent != null)
            {
                addFacesMessage(uiComponent.getClientId(facesContext), facesMessage);
            }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

        tryToBlocksNavigationForComponent(targetComponent, facesMessage);
    }

    public static void tryToBlocksNavigationForComponent(UIComponent uiComponent, FacesMessage facesMessage)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (interpreter.severityBlocksNavigation(facesContext, uiComponent, facesMessage.getSeverity()))
        {
            facesContext.renderResponse();
        }
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

        }
    }

    public static boolean severityBlocksSubmitForComponentId(String clientId, FacesMessage facesMessage)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();
        UIComponent targetComponent = findComponent(clientId);

        return interpreter.severityBlocksSubmit(facesContext, targetComponent, facesMessage.getSeverity());
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

    }

    //available for add-ons - not used internally due to performance reasons
    public static boolean severityShowsIndicationForComponentId(String clientId, FacesMessage facesMessage)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();
        UIComponent targetComponent = findComponent(clientId);

        return interpreter.severityShowsIndication(facesContext, targetComponent, facesMessage.getSeverity());
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

        }
    }

    public ViolationSeverityInterpreter getViolationSeverityInterpreter()
    {
        ViolationSeverityInterpreter requestScopedInterpreter = this.contextHelper
                .getRequestScopedViolationSeverityInterpreter();

        if(requestScopedInterpreter != null)
        {
            return requestScopedInterpreter;
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

        }
    }

    public ViolationSeverityInterpreter getViolationSeverityInterpreter()
    {
        ViolationSeverityInterpreter requestScopedInterpreter = this.contextHelper
                .getRequestScopedViolationSeverityInterpreter();

        if(requestScopedInterpreter != null)
        {
            return requestScopedInterpreter;
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

    }

    public static void tryToThrowValidatorExceptionForComponent(
            UIComponent uiComponent, FacesMessage facesMessage, Throwable throwable)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (interpreter.severityCausesValidatorException(facesContext, uiComponent, facesMessage.getSeverity()))
        {
            if (throwable == null)
            {
                throw new ValidatorException(facesMessage);
            }
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.validation.parameter.ViolationSeverityInterpreter

    }

    @ToDo(value = Priority.MEDIUM, description = "required for test frameworks - goal: remove it")
    private static void tryToAddViolationMessageForTestClientId(String clientId, FacesMessage facesMessage)
    {
        ViolationSeverityInterpreter interpreter =
                ExtValContext.getContext().getViolationSeverityInterpreter();

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (interpreter.severityCausesViolationMessage(facesContext, null, facesMessage.getSeverity()))
        {
            addFacesMessage(clientId, facesMessage);
        }
        tryToBlocksNavigationForComponent(null, facesMessage);
    }
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.