Package org.apache.myfaces.extensions.validator.crossval.storage

Examples of org.apache.myfaces.extensions.validator.crossval.storage.CrossValidationStorageEntry


        if (compareStrategy.isViolation(
                crossValidationStorageEntry.getConvertedObject(),
                targetInformationEntry.getConvertedValue(),
                crossValidationStorageEntry.getMetaDataEntry().getValue(Annotation.class)))
        {
            CrossValidationStorageEntry tmpCrossValidationStorageEntry = new CrossValidationStorageEntry();
            tmpCrossValidationStorageEntry.setComponent(crossValidationStorageEntry.getComponent());
            tmpCrossValidationStorageEntry.setClientId(targetInformationEntry.getClientId());
            tmpCrossValidationStorageEntry.setConvertedObject(targetInformationEntry.getConvertedValue());
            tmpCrossValidationStorageEntry.setValidationStrategy(compareStrategy);

            //process after violation
            //just add messages
            if(crossValidationStorageEntry.getComponent() != null)
            {
View Full Code Here


    private static void processTargetAfterCrossComponentValidation(
            AbstractCompareStrategy compareStrategy,
            CrossValidationStorageEntry sourceCrossValidationStorageEntry,
            ProcessedInformationStorageEntry validationTargetEntry)
    {
        CrossValidationStorageEntry targetCrossValidationStorageEntry = new CrossValidationStorageEntry();

        if (compareStrategy.useTargetComponentToDisplayErrorMsg(sourceCrossValidationStorageEntry))
        {
            targetCrossValidationStorageEntry.setComponent(validationTargetEntry.getComponent());
            targetCrossValidationStorageEntry.setClientId(validationTargetEntry.getClientId());
        }
        else
        {
            targetCrossValidationStorageEntry.setComponent(sourceCrossValidationStorageEntry.getComponent());
            targetCrossValidationStorageEntry.setClientId(sourceCrossValidationStorageEntry.getClientId());
        }

        targetCrossValidationStorageEntry.setConvertedObject(validationTargetEntry.getConvertedValue());
        targetCrossValidationStorageEntry.setValidationStrategy(compareStrategy);

        //add message
        compareStrategy.processTargetComponentAfterViolation(
                sourceCrossValidationStorageEntry, targetCrossValidationStorageEntry);
    }
View Full Code Here

{
    //init cross-validation
    public void processValidation(FacesContext facesContext,
            UIComponent uiComponent, MetaDataEntry metaDataEntry, Object convertedObject) throws ValidatorException
    {
        CrossValidationStorageEntry entry =
            getCrossValidationStorageEntry(facesContext, uiComponent, metaDataEntry, convertedObject);

        CrossValidationUtils.getOrInitCrossValidationStorage().add(entry);
    }
View Full Code Here

    public CrossValidationStorageEntry getCrossValidationStorageEntry(
            FacesContext facesContext, UIComponent uiComponent,
            MetaDataEntry metaDataEntry, Object convertedObject)
    {
        CrossValidationStorageEntry entry = new CrossValidationStorageEntry();

        entry.setMetaDataEntry(metaDataEntry);
        entry.setComponent(uiComponent);
        entry.setClientId(uiComponent.getClientId(facesContext));
        entry.setConvertedObject(convertedObject);
        entry.setValidationStrategy(this);

        return entry;
    }
View Full Code Here

{
    //init cross-validation
    public void processValidation(FacesContext facesContext,
            UIComponent uiComponent, MetaDataEntry metaDataEntry, Object convertedObject) throws ValidatorException
    {
        CrossValidationStorageEntry entry =
            getCrossValidationStorageEntry(facesContext, uiComponent, metaDataEntry, convertedObject);

        CrossValidationUtils.getOrInitCrossValidationStorage().add(entry);
    }
View Full Code Here

    public CrossValidationStorageEntry getCrossValidationStorageEntry(
            FacesContext facesContext, UIComponent uiComponent,
            MetaDataEntry metaDataEntry, Object convertedObject)
    {
        CrossValidationStorageEntry entry = new CrossValidationStorageEntry();

        entry.setMetaDataEntry(metaDataEntry);
        entry.setComponent(uiComponent);
        entry.setClientId(uiComponent.getClientId(facesContext));
        entry.setConvertedObject(convertedObject);
        entry.setValidationStrategy(this);

        return entry;
    }
View Full Code Here

        if (compareStrategy.isViolation(
                crossValidationStorageEntry.getConvertedObject(),
                targetInformationEntry.getConvertedValue(),
                crossValidationStorageEntry.getMetaDataEntry().getValue(Annotation.class)))
        {
            CrossValidationStorageEntry tmpCrossValidationStorageEntry = new CrossValidationStorageEntry();
            tmpCrossValidationStorageEntry.setComponent(crossValidationStorageEntry.getComponent());
            tmpCrossValidationStorageEntry.setClientId(targetInformationEntry.getClientId());
            tmpCrossValidationStorageEntry.setConvertedObject(targetInformationEntry.getConvertedValue());
            tmpCrossValidationStorageEntry.setValidationStrategy(compareStrategy);

            //process after violation
            //just add messages
            if(crossValidationStorageEntry.getComponent() != null)
            {
View Full Code Here

    private static void processTargetAfterCrossComponentValidation(
            AbstractCompareStrategy compareStrategy,
            CrossValidationStorageEntry sourceCrossValidationStorageEntry,
            ProcessedInformationStorageEntry validationTargetEntry)
    {
        CrossValidationStorageEntry targetCrossValidationStorageEntry = new CrossValidationStorageEntry();

        if (compareStrategy.useTargetComponentToDisplayErrorMsg(sourceCrossValidationStorageEntry))
        {
            targetCrossValidationStorageEntry.setComponent(validationTargetEntry.getComponent());
            targetCrossValidationStorageEntry.setClientId(validationTargetEntry.getClientId());
        }
        else
        {
            targetCrossValidationStorageEntry.setComponent(sourceCrossValidationStorageEntry.getComponent());
            targetCrossValidationStorageEntry.setClientId(sourceCrossValidationStorageEntry.getClientId());
        }

        targetCrossValidationStorageEntry.setConvertedObject(validationTargetEntry.getConvertedValue());
        targetCrossValidationStorageEntry.setValidationStrategy(compareStrategy);

        //add message
        compareStrategy.processTargetComponentAfterViolation(
                sourceCrossValidationStorageEntry, targetCrossValidationStorageEntry);
    }
View Full Code Here

{
    //init cross-validation
    public void processValidation(FacesContext facesContext,
            UIComponent uiComponent, MetaDataEntry metaDataEntry, Object convertedObject) throws ValidatorException
    {
        CrossValidationStorageEntry entry =
            getCrossValidationStorageEntry(facesContext, uiComponent, metaDataEntry, convertedObject);

        CrossValidationUtils.getOrInitCrossValidationStorage().add(entry);
    }
View Full Code Here

    public CrossValidationStorageEntry getCrossValidationStorageEntry(
            FacesContext facesContext, UIComponent uiComponent,
            MetaDataEntry metaDataEntry, Object convertedObject)
    {
        CrossValidationStorageEntry entry = new CrossValidationStorageEntry();

        entry.setMetaDataEntry(metaDataEntry);
        entry.setComponent(uiComponent);
        entry.setClientId(uiComponent.getClientId(facesContext));
        entry.setConvertedObject(convertedObject);
        entry.setValidationStrategy(this);

        return entry;
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.validator.crossval.storage.CrossValidationStorageEntry

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.