BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Hi
Thomas,
this works fine,
Tank you.
Mike
On Wed 01/04/09 08:57 , Thomas Markus [email protected] sent:
Hi,
sure you can. Set a special http-header. fi:
Content-Disposition: attachment; filename=MyFileName.csv
use attachment to force 'save as...' dialog or inline for default
browser integration. filename has a special encoding. see
http://www.ietf.org/rfc/rfc2231.txt and
http://www.ietf.org/rfc/rfc2184.txt [1]
regards
thomas
[email protected] [2] schrieb:
> Hello,
>
> in my application if a page, where a search can be performed and
the
> result is shown on the same page in form of a list.
>
> On the page, the user has a button (action widget) that returns
him
> the search result as a csv file. That's not a problem, this works.
The
> problem I have is the filename. The file is named as the current
page
> is. Somesing crypted with continuation id and .continue at die
end.
> Can I set the name of the file, the csv is serialized to the user?
>
> Here my current code:
>
> flowscript:
>
> list() {
>
> //some code
>
>
> var form = new Form("pages/form/list_model.xml");
> form.createBinding("pages/form/list_binding.xml");
>
> while(true) {
> form.load(to);
> form.showForm("list.form", {
> itemList:itemList
> });
> form.save(to);
>
> var action = form.submitId;
> if ("search".equals(action)) {
> itemList =
> BridgeFactory.getInstance().getDummyBridge().search(context, to);
> } else if ("resetButton".equals(action)) {
> to = new SearchTO();
> itemList = null;
> } else if ("csv".equals(action)) {
> cocoon.sendPage("list.csv",
{itemList:itemList});
> break;
> }
> }
> }
>
> sitemap:
>
>
> src="org.apache.cocoon.serialization.TextSerializer">
> ISO-8859-1
> yes
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thanks,
>
> Mike
--
Thomas Markus
====================================================
proventis GmbH | Zimmerstr. 79-81 | D-10117 Berlin |
Tel +49 (0)30 2936399-22 | Fax -50 | [email protected] [3]
-----------------------------------------------------------------
Geschäftsführer: Norman Frischmuth | Sitz: Berlin
Handelsregister: AG Berlin-Charlottenburg, HR 82917
-----------------------------------------------------------------
Blue Ant-webbasiertes Projektmanagement - aktuelle Termine 2008:
http://www.proventis.net/website/live/blueant/veranstaltungen.html
====================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] [4]
For additional commands, e-mail: [email protected] [5]
Links:
------
[1] http://www.ietf.org/rfc/rfc2184.txt
[2] mailto:[email protected]
[3] mailto:[email protected]
[4] mailto:[email protected]
[5] mailto:[email protected]