tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago H. de Paula Figueiredo" <thiag...@gmail.com>
Subject Re: Clearing form errors problem
Date Mon, 07 Nov 2011 16:34:23 GMT
On Mon, 07 Nov 2011 12:42:42 -0200, goldenka <maja.polonska@gmail.com>  
wrote:

> I'm using tapestry 5.0 and I have a problem with clearing form errors.   
> > When
> "Download" button is pressed, and all form validation is OK I need to
> download a file. In order to do this in the onSuccess() method I get the
> HttpServletResponse object, set it's character encoding, content type  
> etc. and after that I use its PrintWriter to generate CSV file (I'm  
> using open
> CSV Library and it needs Writer object to generate csv).

Instead, return a StreamResponse wrapping the generated file. You  
shouldn't use HttpServletResponse directly in Tapestry.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Mime
View raw message