Package org.apache.myfaces.extensions.validator.core.el

Examples of org.apache.myfaces.extensions.validator.core.el.ELHelper


                                  MetaDataEntry metaDataEntry,
                                  Object convertedObject) throws ValidatorException
    {
        String[] valueBindingExpressions = metaDataEntry.getValue(SkipValidation.class).value();

        ELHelper elHelper = ExtValUtils.getELHelper();
        for(String valueBindingExpression : valueBindingExpressions)
        {
            if(Boolean.TRUE.equals(elHelper.getValueOfExpression(
                facesContext, new ValueBindingExpression(valueBindingExpression))))
            {
                metaDataEntry.setProperty(PropertyInformationKeys.SKIP_VALIDATION, true);
                break;
            }
View Full Code Here


    public boolean evaluateReferenceAndValidate(
            CrossValidationStorageEntry crossValidationStorageEntry,
            CrossValidationStorage crossValidationStorage,
            String validationTarget, AbstractCompareStrategy compareStrategy)
    {
        ELHelper elHelper = ExtValUtils.getELHelper();
        if (elHelper.isELTermWellFormed(validationTarget) &&
            elHelper.isELTermValid(FacesContext.getCurrentInstance(), validationTarget))
        {
            tryToValidateValueBinding(
                    crossValidationStorageEntry,
                    new ValueBindingExpression(validationTarget), crossValidationStorage, compareStrategy);
View Full Code Here

        FacesContext facesContext = FacesContext.getCurrentInstance();
        PropertyInformation propertyInformation;
        Set<ConstraintViolation<Object>> violations;
        Class[] groupsToValidate;

        ELHelper elHelper = ExtValUtils.getELHelper();

        for (Object validationTarget : modelValidationEntry.getValidationTargets())
        {
            propertyInformation = createPropertyInformation(modelValidationEntry, validationTarget, elHelper);
View Full Code Here

        if(actionExpression == null)
        {
            return;
        }

        ELHelper elHelper = ExtValUtils.getELHelper();
        String actionString = actionExpression.getExpressionString();
        if(!elHelper.isELTermWellFormed(actionString))
        {
            return;
        }

        ValueBindingExpression valueBindingExpression = new ValueBindingExpression(actionString);
View Full Code Here

        applyCustomConfigurations();

    // This triggers already the config object. So it is possible that you
    // need to set your custom config also in the getCustomConfigObjects method.
        final ELHelper defaultElHelper = ExtValUtils.getELHelper();
        ExtValContext.getContext().getFactoryFinder()
                .getFactory(FactoryNames.EL_HELPER_FACTORY, AbstractELHelperFactory.class)
                .setCustomELHelperFactory(new AbstractELHelperFactory() {

                    protected ELHelper createELHelper()
View Full Code Here

        }
    }

    private boolean isValidationPermitted(BeanValidation beanValidation)
    {
        ELHelper elHelper = ExtValUtils.getELHelper();

        for (String condition : beanValidation.conditions())
        {
            if (elHelper.isELTermWellFormed(condition) &&
                    elHelper.isELTermValid(FacesContext.getCurrentInstance(), condition))
            {
                if (Boolean.TRUE.equals(elHelper.getValueOfExpression(
                        FacesContext.getCurrentInstance(), new ValueBindingExpression(condition))))
                {
                    return true;
                }
            }
View Full Code Here

        FacesContext facesContext = FacesContext.getCurrentInstance();
        PropertyInformation propertyInformation;
        Set<ConstraintViolation<Object>> violations;
        Class[] groupsToValidate;

        ELHelper elHelper = ExtValUtils.getELHelper();

        for (Object validationTarget : modelValidationEntry.getValidationTargets())
        {
            propertyInformation = createPropertyInformation(modelValidationEntry, validationTarget, elHelper);
View Full Code Here

    public boolean evaluateReferenceAndValidate(
            CrossValidationStorageEntry crossValidationStorageEntry,
            CrossValidationStorage crossValidationStorage,
            String validationTarget, AbstractCompareStrategy compareStrategy)
    {
        ELHelper elHelper = ExtValUtils.getELHelper();
        if (elHelper.isELTermWellFormed(validationTarget) &&
            elHelper.isELTermValid(FacesContext.getCurrentInstance(), validationTarget))
        {
            tryToValidateValueBinding(
                    crossValidationStorageEntry,
                    new ValueBindingExpression(validationTarget), crossValidationStorage, compareStrategy);
View Full Code Here

                                  MetaDataEntry metaDataEntry,
                                  Object convertedObject) throws ValidatorException
    {
        String[] valueBindingExpressions = metaDataEntry.getValue(SkipValidation.class).value();

        ELHelper elHelper = ExtValUtils.getELHelper();
        for(String valueBindingExpression : valueBindingExpressions)
        {
            if(Boolean.TRUE.equals(elHelper.getValueOfExpression(
                facesContext, new ValueBindingExpression(valueBindingExpression))))
            {
                metaDataEntry.setProperty(PropertyInformationKeys.SKIP_VALIDATION, true);
                break;
            }
View Full Code Here

    }

    @Test
    public void testDeactivateElResolverDefault()
    {
        ELHelper elHelper = new CustomDefaultELHelper();
        Assert.assertNotNull(elHelper.getPropertyDetailsOfValueBinding(uiComponent));

    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.validator.core.el.ELHelper

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.