You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jakub Kaniewski <jk...@egonet.pl> on 2005/04/07 19:56:09 UTC

FlowScript and Upload after upgrade to Cocoon 2.1.7

Recently I upgraded Cocoon from 2.1.5 to 2.1.7. Most of things works 
fine, except one FlowScript function.

I have this HTML form (hidden fields values are passed from flow) :

<form enctype="multipart/form-data" method="POST" aaction="upload.html">
<inputtype="file" name="plik">
<input type="submit" name="upload" value="Upload file" >
<input type="hidden" name="directory" value="/root/file" >
<input type="hidden" name="action" value="upload">
</form>


In FlowScript if I try to access my hidden fields

var action = cocoon.request.get("action");

I always receive null. If I remove enctype from form element it works 
well, but in this case I can't access uploaded file. In Cocoon 2.1.5, 
this code works fine with set enctype.

J.K.

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


Re: FlowScript and Upload after upgrade to Cocoon 2.1.7

Posted by Jakub Kaniewski <jk...@egonet.pl>.
SOLVED, I simply didn't enabled uploads in web.xml, this also implicated 
that simple parameters from multi part forms was not decoded.

J.K.

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


Re: FlowScript and Upload after upgrade to Cocoon 2.1.7

Posted by Antonio Gallardo <ag...@agssa.net>.
On Jue, 7 de Abril de 2005, 11:56, Jakub Kaniewski dijo:
> Recently I upgraded Cocoon from 2.1.5 to 2.1.7. Most of things works
> fine, except one FlowScript function.
>
> I have this HTML form (hidden fields values are passed from flow) :
>
> <form enctype="multipart/form-data" method="POST" aaction="upload.html">
> <inputtype="file" name="plik">
> <input type="submit" name="upload" value="Upload file" >
> <input type="hidden" name="directory" value="/root/file" >
> <input type="hidden" name="action" value="upload">
> </form>
>
>
> In FlowScript if I try to access my hidden fields
>
> var action = cocoon.request.get("action");

See the logs, I remember a change of this interface in 2.1.7:

Remove restrictions on the flowscript object model (FOM): the objects
available through the cocoon object (request, session, response, etc) now
provide the full API of the corresponding Java classes. (SW)

Perhaps you need to access the values in a diferent way.

Best Regards,

Antonio Gallardo

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