On Wed, 03 Feb 2010 06:37:39 -0200, kamiseq <kami...@gmail.com> wrote:

if (form.getHasErrors() && request.isXHR()) {
       return zonaFormulario.getBody();
}
else {
       return null;
}


this doesn't matter as I dont care about errors right now. and I dont need to persist my object as all information are in the form. so on submit I will have them back.

You should care, because, when you submit a form through AJAX and there are validation errors, the last triggered event is validateForm. Thus, its return value is used to render the zone. If you return nothing (void method) or null, nothing is rendered and your zone is not updated.

You'll need to @Inject the Request.
why you think I should inject that!??

Because the suggested code above needs it.

but that doesnt explain why form sends empty values if I use ajax refresh
from the link and works fine if I refresh whole page!!!

I know, but I was warning you about the above error.
Your problem may be related to how you persist the edited object.

I have small example that can be ran to reproduce the problem if someone is interested!

Please do it.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.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