Package org.apache.tapestry.valid

Examples of org.apache.tapestry.valid.IValidationDelegate.record()


        Integer publisherId = (Integer) attributes.get("publisherId");
        String publisherName = getPublisherName();

        if (publisherId == null && HiveMind.isBlank(publisherName))
        {
            delegate.record(getPublisherNameField(), needPublisherName());
            return;
        }

        if (publisherId != null && HiveMind.isNonBlank(publisherName))
        {
View Full Code Here


            return;
        }

        if (publisherId != null && HiveMind.isNonBlank(publisherName))
        {
            delegate.record(getPublisherNameField(), leavePublisherNameEmpty());
            return;
        }

        if (isInError())
            return;
View Full Code Here

        // Note: we know password1 and password2 are not null
        // because they are required fields.

        if (!password1.equals(password2))
        {
            delegate.record(getPassword1Field(), passwordMustMatch());
            return;
        }

        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
        Login login = getLogin();
View Full Code Here

        Map attributes = getAttributes();

        if (HiveMind.isBlank(password1) != HiveMind.isBlank(password2))
        {
            delegate.record(getPassword1Field(), enterPasswordTwice());

            return;
        }

        if (HiveMind.isNonBlank(password1))
View Full Code Here

        if (HiveMind.isNonBlank(password1))
        {
            if (!password1.equals(password2))
            {
                delegate.record(getPassword1Field(), passwordMustMatch());
                return;
            }

            attributes.put("password", password1);
        }
View Full Code Here

    {
        IValidationDelegate delegate = getValidationDelegate();
        IFormComponent field = (IFormComponent) getComponent(componentId);

        delegate.setFormComponent(field);
        delegate.record(message, null);
    }

    private void clear(String componentId)
    {
        IValidationDelegate delegate = getValidationDelegate();
View Full Code Here

    {
        IFormComponent field = (IFormComponent) getComponent(componentId);

        IValidationDelegate delegate = getValidationDelegate();
        delegate.setFormComponent(field);
        delegate.record(new ValidatorException(message));
    }

    public abstract void setCallback(ICallback value);

    public abstract ICallback getCallback();
View Full Code Here

        IFormComponent component = (IFormComponent) getComponent(componentId);

        IValidationDelegate delegate = getValidationDelegate();

        delegate.setFormComponent(component);
        delegate.record(message, null);
    }

    /**
     *  Returns true if the delegate indicates an error, or the error property is not null.
     *
 
View Full Code Here

        if (HiveMind.isBlank(file.getFileName()))
        {
            IValidationDelegate delegate = (IValidationDelegate) getBeans().getBean("delegate");

            delegate.setFormComponent((IFormComponent) getComponent("inputFile"));
            delegate.record("You must specify a file to upload.", ValidationConstraint.REQUIRED);
            return;
        }

        UploadResults results = (UploadResults) cycle.getPage("UploadResults");
View Full Code Here

        if (HiveMind.isBlank(file.getFileName()))
        {
            IValidationDelegate delegate = (IValidationDelegate) getBeans().getBean("delegate");

            delegate.setFormComponent((IFormComponent) getComponent("inputFile"));
            delegate.record("You must specify a file to upload.", ValidationConstraint.REQUIRED);
            return;
        }

        UploadResults results = (UploadResults) cycle.getPage("UploadResults");
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.