Hi,
Thanks for the quick feedback! This is not working for me, since I only
have one submit button outside of the loop.
So I'm still stuck with the problem that first the encoder (cEncoder) is
converting all client values, and afterwards the setters on the text
area (setTextareaValue) are called. If the zone around the text are is
not there, encoder and setter are alternating.
Any ideas appreciated!
Alex
On 25.05.2011 18:28, Taha Hafeez wrote:
Sorry, defer = false, default is true
regards
Taha
On Wed, May 25, 2011 at 9:57 PM, Taha Hafeez<tawus.tapes...@gmail.com>wrote:
Hi
Try setting defer = true
Check out the defer attribute of submit component.
There is a good explaination by Josh here
http://tapestry.1045711.n5.nabble.com/submit-context-in-loop-td4398848.html#a4401092
<http://tapestry.1045711.n5.nabble.com/submit-context-in-loop-td4398848.html#a4401092>
regards
Taha
On Wed, May 25, 2011 at 9:48 PM, Alexander Rosemann<
alexander.rosem...@gmail.com> wrote:
Hi,
since I am relatively new to zones and all the great stuff that can be
done with them I am stuck with a rather (imho) simple problem.
I render textareas (using a loop) where each of them comes with some
actionlinks. The actionlinks are rendered, again, in a loop. When a user
clicks an action link the related textarea (wrapped in a zone) gets updated
(see the code sample below). So far so good.
<t:form>
<t:loop t:id="criteria" value="currentCriteria" source="criteria"
encoder="cEncoder">
<t:loop t:id="links" value="link" source="links">
<t:actionlink t:id="linkId" zone="prop:uniqueZoneId">some
text</t:actionlink>
</t:loop>
<t:zone t:id="textareaZone" id="prop:uniqueZoneId">
<t:textarea value="textareaValue" />
</t:zone>
</t:loop>
<t:submit value="Save" t:id="save"/>
</t:form>
At the bottom of the page I have a save button which, once clicked, should
save all the data entered/altered in the textareas. The odd thing is that my
encoder for the loop gets called n times before the setter of my
currentCriteria field gets called n times.
Removing the zone brings back the normal behaviour of calling first the
encoder and second, the setter of the corresponding field. Could somebody
shed some light on how to force Tapestry to call the encoder and setter
alternating when the component is in a zone?
I am using Tapestry 5.2.5.
Many thanks,
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org