Examples of IFormComponent


Examples of org.apache.tapestry.form.IFormComponent

                break;

            }
            catch (LoginException ex)
            {
                IFormComponent field = ex.isPasswordError() ? getPasswordField() : getEmailField();

                getValidationDelegate().record(field, ex.getMessage());
                return;
            }
            catch (RemoteException ex)
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

    public void resetParameter(IRequestCycle cycle)
    {
        if (_direction == Direction.FORM && cycle.isRewinding())
        {
            IFormComponent component = (IFormComponent) _component;

            if (!component.isDisabled())
            {
                IForm form = Form.get(cycle);

                if (form != null && form.isRewinding())
                {
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        if (cycle.isRewinding())
            return;

        IFormComponent field = getField();
        String displayName = getDisplayName();

        if (displayName == null)
        {
            if (field == null)
                throw Tapestry.createRequiredParameterException(this, "field");

            displayName = field.getDisplayName();

            if (displayName == null)
            {
                String msg = Tapestry.format("FieldLabel.no-display-name", field.getExtendedId());

                throw new BindingException(msg, this, null, getBinding("field"), null);
            }
        }
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

    }

    private void setErrorField(String componentId, String message)
    {
        IValidationDelegate delegate = getValidationDelegate();
        IFormComponent field = (IFormComponent) getComponent(componentId);

        delegate.setFormComponent(field);
        delegate.record(message, null);
    }
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

    }

    private void clear(String componentId)
    {
        IValidationDelegate delegate = getValidationDelegate();
        IFormComponent component = (IFormComponent) getComponent(componentId);

        delegate.setFormComponent(component);
        delegate.recordFieldInputValue(null);
    }
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        return (IValidationDelegate) getBeans().getBean("delegate");
    }

    protected void setErrorField(String componentId, String message)
    {
        IFormComponent field = (IFormComponent) getComponent(componentId);

        IValidationDelegate delegate = getValidationDelegate();
        delegate.setFormComponent(field);
        delegate.record(new ValidatorException(message));
    }
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        return _validationDelegate;
    }

    protected void setErrorField(String componentId, String message)
    {
        IFormComponent component = (IFormComponent) getComponent(componentId);

        IValidationDelegate delegate = getValidationDelegate();

        delegate.setFormComponent(component);
        delegate.record(message, null);
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        if (cycle.isRewinding())
            return;

        IForm form = TapestryUtils.getForm(cycle, this);

        IFormComponent field = getField();

        if (field != null)
            form.prerenderField(writer, field, getLocation());

        String displayName = getDisplayName();

        if (displayName == null)
        {
            if (field == null)
                throw Tapestry.createRequiredParameterException(this, "field");

            displayName = field.getDisplayName();

            if (displayName == null)
                throw new BindingException(ValidMessages.noDisplayName(this, field), this, null,
                        getBinding("field"), null);
        }
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

    }

    private IFormComponent newField(String displayName)
    {
        MockControl control = newControl(IFormComponent.class);
        IFormComponent field = (IFormComponent) control.getMock();

        field.getDisplayName();
        control.setReturnValue(displayName);

        return field;
    }
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();

        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle(form);
        IFormComponent field = newField("MyLabel");
        Location l = newLocation();

        FieldLabel fl = (FieldLabel) _creator.newInstance(FieldLabel.class, new Object[]
        { "location", l, "field", field });
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.