You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Justin Walsh <yo...@gmail.com> on 2008/03/17 16:53:38 UTC

T4: Rewind of Form nested within a For loop

Hi,

I have a page containing items which the user can edit individually
using asynchronous posts.  The basic structure of the page is as
follows:


<span jwcid="@For"
         source="ognl:items"
         converter="ognl:itemConverter"
	 value="ognl:item"
         renderTag="false">

    <form jwcid="@Form"
            success="listener:onCityEvent"
	    async="ognl:true"
	    updateComponents="errorMessage, itemList"
            delegate="bean:validationDelegate"
	    clientValidationEnabled="ognl:true">

    ... form fields, for example
    <span jwcid="@Hidden" value="ognl:item.id" />

    </form>

</span>


The problem is of course that when the form is rewound, it is done
outside the context of the for loop and the value expression of the
For loop (value="ognl:item") is not set.  This presents a problem when
evaluating expressions within the form during rewind.

This _must_ be a common issue these days with rich AJAX type pages
where only part of the page is rewound.  Does anyone have a solution
to this problem?

Thanks,
Justin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4: Rewind of Form nested within a For loop

Posted by Alejandro Scandroli <al...@gmail.com>.
Hi all

I'm also interested in a good solution to this.
I've encountered this problem several times and I couldn't find a
proper solution, my lame workaround was (always) to try to avoid this
situation.


--
Alejandro Scandroli - http://weblog.amneris.es/
Amneris: We build process-driven web applications.
http://www.amneris.es



On Mon, Mar 17, 2008 at 4:53 PM, Justin Walsh <yo...@gmail.com> wrote:
> Hi,
>
>  I have a page containing items which the user can edit individually
>  using asynchronous posts.  The basic structure of the page is as
>  follows:
>
>
>  <span jwcid="@For"
>          source="ognl:items"
>          converter="ognl:itemConverter"
>          value="ognl:item"
>          renderTag="false">
>
>     <form jwcid="@Form"
>             success="listener:onCityEvent"
>             async="ognl:true"
>             updateComponents="errorMessage, itemList"
>             delegate="bean:validationDelegate"
>             clientValidationEnabled="ognl:true">
>
>     ... form fields, for example
>     <span jwcid="@Hidden" value="ognl:item.id" />
>
>     </form>
>
>  </span>
>
>
>  The problem is of course that when the form is rewound, it is done
>  outside the context of the for loop and the value expression of the
>  For loop (value="ognl:item") is not set.  This presents a problem when
>  evaluating expressions within the form during rewind.
>
>  This _must_ be a common issue these days with rich AJAX type pages
>  where only part of the page is rewound.  Does anyone have a solution
>  to this problem?
>
>  Thanks,
>  Justin
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org