Almost Perfect. I use now

{{velocity}}
#if($request.getParameter("onsong"))
 #set($content=$request.getParameter("onsong"))
 $response.setContentType("text/plain");
 $response.setCharacterEncoding('UTF-8')
 $response.setHeader("Content-Disposition", "attachment;
filename=onsong.txt");
 $response.writer.print($content.replace("/Newline/", "\n"))
 $context.setFinished(true);
#end
{{/velocity}}

{{html}}
<form><button title="Download OnSong" type="submit" name="onsong"
value="First Line/Newline/Second Line/Newline/Third Line">
<../../../resources/icons/silk/link_add.png> </button></form>
{{/html}}

Do you know how i can breakline the string for the writer? \n does not work.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Create-a-Download-Button-which-returns-a-rendered-file-tp7588312p7588336.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to