On Wed, 14 May 2014 04:08:38 -0300, Erich Gormann <e.gorm...@gormann.de> wrote:

Hi,

Hi!

I have put a loop renedering form filelds inside a zone. The zone is
enclosed by the form component.
Inside the loop a zone update is triggered afer a valueChanged event.

Alle values entered in the form elements at tis time are lost after zone
update.

It's lost because you're rendering them in a second request, the whole page one being the first, and Tapestry doesn't persist field values between requests by default (nor it should).

What is the recommended way to avoid this? Do I have to nest the form insde the zone instead of enclosing the zone by the form? The intention of my
construction was to avoid a complete page reload like triggered by a form
submit, but now form values are not stored.

The easiest is to annotated the edited fields with @Persist. Another one is to wait for a Tapestry release in which the Select component has a context parameter so you can repopulate the edited fields inside onValueChanged().

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to