Examples of registerForFocus()


Examples of org.apache.tapestry.IForm.registerForFocus()

    {
        IForm form = component.getForm();

        if (component.isRequired())
        {
            form.registerForFocus(component, ValidationConstants.REQUIRED_FIELD);

            if (form.isClientValidationEnabled())
            {
                String function = "require(event, document." + form.getName() + "."
                        + component.getName() + ",'" + buildRequiredMessage(component) + "')";
View Full Code Here

Examples of org.apache.tapestry.form.FormComponentContributorContext.registerForFocus()

        FormComponentContributorContext context = (FormComponentContributorContext) contextc
                .getMock();

        IFormComponent field = newField("Fred");

        context.registerForFocus(ValidationConstants.REQUIRED_FIELD);
       
        context.getFieldDOM();
        contextc.setReturnValue("document.fred.barney");

        trainFormatMessage(
View Full Code Here

Examples of org.apache.tapestry.form.FormComponentContributorContext.registerForFocus()

        FormComponentContributorContext context = (FormComponentContributorContext) contextc
                .getMock();

        IFormComponent field = newField("Fred");

        context.registerForFocus(ValidationConstants.REQUIRED_FIELD);

        context.getFieldDOM();
        contextc.setReturnValue("document.fred.barney");

        trainFormatMessage(
View Full Code Here

Examples of org.apache.tapestry.form.FormComponentContributorContext.registerForFocus()

       
        FormComponentContributorContext context = newMock(FormComponentContributorContext.class);
       
        IFormComponent field = newField("Fred", "fred", false);
       
        context.registerForFocus(ValidationConstants.REQUIRED_FIELD);
       
        expect(context.getProfile()).andReturn(json);
       
        trainFormatMessage(
                context,
View Full Code Here

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

            }
        }
        else if (!cycle.isRewinding())
        {
            if (!isDisabled())
                delegate.registerForFocus(this, ValidationConstants.NORMAL_FIELD);

            renderFormComponent(writer, cycle);

            if (delegate.isInError())
                delegate.registerForFocus(this, ValidationConstants.ERROR_FIELD);
View Full Code Here

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

                delegate.registerForFocus(this, ValidationConstants.NORMAL_FIELD);

            renderFormComponent(writer, cycle);

            if (delegate.isInError())
                delegate.registerForFocus(this, ValidationConstants.ERROR_FIELD);
        }

        super.renderComponent(writer, cycle);
    }
View Full Code Here

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

           
            renderFormComponent(writer, cycle);

            if (getCanTakeFocus() && !isDisabled())
            {
                delegate.registerForFocus(
                        this,
                        delegate.isInError() ? ValidationConstants.ERROR_FIELD
                                : ValidationConstants.NORMAL_FIELD);
            }
View Full Code Here

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

            }
        }
        else if (!cycle.isRewinding())
        {
            if (!isDisabled())
                delegate.registerForFocus(this, ValidationConstants.NORMAL_FIELD);

            renderFormComponent(writer, cycle);

            if (delegate.isInError())
                delegate.registerForFocus(this, ValidationConstants.ERROR_FIELD);
View Full Code Here

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

                delegate.registerForFocus(this, ValidationConstants.NORMAL_FIELD);

            renderFormComponent(writer, cycle);

            if (delegate.isInError())
                delegate.registerForFocus(this, ValidationConstants.ERROR_FIELD);
        }

        super.renderComponent(writer, cycle);
    }
View Full Code Here

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

           
            renderFormComponent(writer, cycle);
           
            if (getCanTakeFocus() && !isDisabled())
            {
                delegate.registerForFocus(
                        this,
                        delegate.isInError() ? ValidationConstants.ERROR_FIELD
                                : ValidationConstants.NORMAL_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.