Examples of IForm


Examples of org.apache.tapestry.IForm

     * @see org.apache.tapestry.AbstractComponent#renderComponent(org.apache.tapestry.IMarkupWriter,
     *      org.apache.tapestry.IRequestCycle)
     */
    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        IForm form = TapestryUtils.getForm(cycle, this);

        setForm(form);
       
        if (form.wasPrerendered(writer, this))
            return;
       
        IValidationDelegate delegate = form.getDelegate();
       
        delegate.setFormComponent(this);
       
        setName(form);
       
        if (form.isRewinding())
        {
            if (!isDisabled())
            {
                rewindFormComponent(writer, cycle);
            }
           
            // This is for the benefit of the couple of components (LinkSubmit) that allow a body.
            // The body should render when the component rewinds.
           
            if (getRenderBodyOnRewind())
                renderBody(writer, cycle);
        }
        else if (!cycle.isRewinding())
        {
            if (!NullWriter.class.isInstance(writer))
                form.setFormFieldUpdating(true);
           
            renderFormComponent(writer, cycle);

            if (getCanTakeFocus() && !isDisabled())
            {
View Full Code Here

Examples of org.apache.tapestry.IForm

        IFormComponent
{

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        IForm form = TapestryUtils.getForm(cycle, this);

        boolean cycleRewinding = cycle.isRewinding();

        // If the cycle is rewinding, but not this particular form,
        // then do nothing (don't even render the body).

        if (cycleRewinding && !form.isRewinding()) return;

        String name = form.getElementId(this);

        boolean condition = getCondition(cycle, form, name);

        getListenerInvoker().invokeListener(getListener(), this, cycle);
View Full Code Here

Examples of org.apache.tapestry.IForm

     *             if the component is not wrapped by a {@link org.apache.tapestry.wml.Go}.
     */

    public IForm getForm(IRequestCycle cycle)
    {
        IForm result = Go.get(cycle);

        if (result == null)
            throw new ApplicationRuntimeException(Tapestry
                    .getMessage("Postfield.must-be-contained-by-go"), this, null, null);

View Full Code Here

Examples of org.apache.tapestry.IForm

     * @see org.apache.tapestry.AbstractComponent#renderComponent(IMarkupWriter, IRequestCycle)
     */

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        IForm form = getForm(cycle);

        if (form.wasPrerendered(writer, this))
            return;

        boolean rewinding = form.isRewinding();

        if (!rewinding && cycle.isRewinding())
            return;

        String name = form.getElementId(this);

        if (rewinding)
        {
            rewind(cycle);
            return;
View Full Code Here

Examples of org.apache.tapestry.IForm

     * {@link IPropertySelectionModel model}.
     */

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        IForm form = getForm(cycle);

        if (form.wasPrerendered(writer, this))
            return;

        boolean rewinding = form.isRewinding();

        String name = form.getElementId(this);

        List selectedList = (List) getBinding("selectedList").getObject(List.class);

        if (selectedList == null)
            throw Tapestry.createRequiredParameterException(this, "selectedList");
View Full Code Here

Examples of org.apache.tapestry.IForm

public abstract class FormConditional extends AbstractFormComponent
{

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        IForm form = getForm(cycle);

        boolean cycleRewinding = cycle.isRewinding();

        // If the cycle is rewinding, but not this particular form,
        // then do nothing (don't even render the body).

        if (cycleRewinding && !form.isRewinding())
            return;

        String name = form.getElementId(this);

        boolean condition = getCondition(cycle, form, name);

        getListenerInvoker().invokeListener(getListener(), this, cycle);
View Full Code Here

Examples of org.apache.tapestry.IForm

    }

    public IForm getForm()
    {
        Checkbox checkbox = (Checkbox) getComponent("checkbox");
        IForm form = checkbox.getForm();
        return form;
    }
View Full Code Here

Examples of org.apache.tapestry.IForm

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        // Next few lines of code is similar to AbstractFormComponent (which, alas, extends from
        // AbstractComponent, not from BaseComponent).
        IForm form = TapestryUtils.getForm(cycle, this);

        setForm(form);

        if (form.wasPrerendered(writer, this))
            return;

        IValidationDelegate delegate = form.getDelegate();

        delegate.setFormComponent(this);

        form.getElementId(this);

        if (form.isRewinding())
        {
            if (!isDisabled())
            {
                rewindFormComponent(writer, cycle);
            }
View Full Code Here

Examples of org.apache.tapestry.IForm

     */

    protected void processValidatorScript(String scriptPath, IRequestCycle cycle,
            IFormComponent field, Map symbols)
    {
        IForm form = field.getForm();
       
        Map finalSymbols = (symbols == null) ? new HashMap() : symbols;
       
        finalSymbols.put(FIELD_SYMBOL, field);
        finalSymbols.put(FORM_SYMBOL, form);
View Full Code Here

Examples of org.apache.tapestry.IForm

    public abstract void setForm(IForm form);

    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
    {
        IForm form = TapestryUtils.getForm(cycle, this);

        if (form.wasPrerendered(writer, this))
            return;

        setForm(form);

        IValidationDelegate delegate = form.getDelegate();

        delegate.setFormComponent(this);

        setName(form.getElementId(this));

        if (form.isRewinding())
            handleSubmission(cycle);

        // Don't do any additional work if rewinding
        // (some other action or form on the page).

        if (!cycle.isRewinding())
        {
            // Lots of work to produce JavaScript and HTML for this sucker.

            _symbols = new HashMap(MAP_SIZE);

            runScript(cycle);

            // Output symbol 'formSubmitFunctionName' is the name
            // of a JavaScript function to execute when the form
            // is submitted. This is also key to the operation
            // of the PropertySelection.

            form.addEventHandler(FormEventType.SUBMIT, (String) _symbols
                    .get("formSubmitFunctionName"));

            constructColumns();
        }
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.