Upload widget

2013-04-04 Thread Peter Sparkes

Hi ,

When uploading a file with the same name as one previously uploaded a  new file is created with an  
incremented file name eg.


image.jpg
0_ image.jpg
1_ image.jpg
etc.

Please, how can I get the widget to replace the old file with the new file 
keeping the same file name

Regards

Peter

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



Upload widget cocoon-2.1.11

2012-10-14 Thread Peter Sparkes

Hi,

I want to use two upload widgets in a CForm.

Each widget will upload files to a different directory eg:

1. images/
2. pdfs/

Please how can I do it as the web.xml appears to only allow in

init-param
  param-nameupload-directory/param-name
  param-valueD:\test/param-value
 /init-param

to set one upload directory?

Also if I set

param-value../test/param-value

What's it relative to, I can't work it out?

Thanks

Peter



Re: Upload widget cocoon-2.1.11

2012-10-14 Thread Peter Sparkes

On 14/10/2012 10:18, Peter Sparkes wrote:

Hi,

I want to use two upload widgets in a CForm.

Each widget will upload files to a different directory eg:

 1. images/
 2. pdfs/

Please how can I do it as the web.xml appears to only allow in

init-param
  param-nameupload-directory/param-name
  param-valueD:\test/param-value
 /init-param

to set one upload directory?

Also if I set

param-value../test/param-value

What's it relative to, I can't work it out?


Solved;  What's it relative to - the cocoon servlet
Peter


Thanks

Peter





Upload widget in CForms

2011-12-01 Thread Patricia Déchandol
Hello,

I have a problem, which seems to be simple but I can't find the answer.

I work with Cocoon CForms.
I use dojo 0.4.3 to define widgets.

My CForm has a fd:upload widget to let the user upload a local file on the 
server.
It works fine.

I would need to get the path to the local file before being uploaded, i.e. the 
complete path of the directory containing the local file to upload.
The instructions 
widget.getValue().getUploadName() returns the name of the file
or
widget.getValue().getFile() return the path of the uploaded file, ie. a path on 
the server.

How can I retrieve the complete path of local file from the widget ?

Thank you for your help.

Patricia

Upload widget throws parsing exception with the new DOJO

2008-12-02 Thread imran
Hi,

We are using an upload widget inside an ajax enabled form. It used to
work fine with cocoon 2.2 with the old dojo ... but since we checked
out the new cocoon source with the new dojo it has started throwing
parsing error .. it only throws it when it tries to render a textarea ..


the page layout is somewhat like this:
we have a form with upload widget and a lot of fields and a textarea
.. on-value-changed handler which sibmits the form as soon as a file
is chosen.  This displays the same form with the image.. all the text
fields are rendered correctly but while rendering the textarea it
throws this exception

XML Parsing Error: no element found Location: https://PAGE_URL Line
Number 2, Column 204: span
xmlns:bu=http://apache.org/cocoon/browser-update/1.0;
id=addresstextarea title= name=address id=address:input
class=forms field active rows=4 style=width:200pxtest address

Jeremy i guess this started after u did the new dojo-rsrc build

Any help would be appreciated

Imran Pariyani


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upload widget - Storing Data Permanently

2008-08-21 Thread Peter Sparkes

Hi,

When data is uploaded using the Upload Widget it is automatically 
cleaned up when the upload widget instance object is finalized by the JVM.


Please, how can I permanently store the data (image file)?

Thanks

Peter Sparkes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upload Widget C. 2.2.0

2008-08-19 Thread JLe

Hi,

I nearly migrated my whole 2.1.10 app to 2.2.0 but i just don't get the
upload widget to work.
i made a few steps, and now I am at the point where JETTY screams:
--
System.JSON.getI18nMessage - Could not find i18n key: progress.finished
--
happens when i selected the file in the filebrowser window.

Any intentions about this?
-- 
View this message in context: 
http://www.nabble.com/Upload-Widget-C.-2.2.0-tp19044849p19044849.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upload widget

2008-03-17 Thread Peter Sparkes

Thanks Grzegorz,

Unfortunately I can't get it to work, code is:

function upload() {
  
   var form = new Form(forms/upload_model.xml);

   var k = form.showForm(upload-display-pipeline.jx);

   k.invalidate();

   var widget = form.getChild(upload);
   var uploadedContent = handleUpload(form);
   var part  = widget.getValue();
   part.copyToFile(new.pdf) ;
...


The pdf file is uploaded, but deleted at the end of the request. However 
it is not copied to new.pdf


Please, what am I doing wrong ?

Peter Sparkes


Peter Sparkes pisze:

Hi,

Following the /upload/ sample in the CForms Block Samples I am trying 
to upload files, however, the uploaded files are deleted at the end 
of a request.


Please how do I permanently save the uploaded files.


From form object get upload widget and ask it for its value which is 
Part[1] object.


You should do something like that:

  part = form.getChild(upload_widget).getValue();

Then it's easy because Part interface has handy methods for accessing 
the uploaded data.


[1] 
http://cocoon.apache.org/2.2/core-modules/core/2.2/apidocs/org/apache/cocoon/servlet/multipart/Part.html 



I hope this helps.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upload widget

2008-03-17 Thread Grzegorz Kossakowski

Peter Sparkes pisze:

Thanks Grzegorz,

Unfortunately I can't get it to work, code is:

function upload() {
 var form = new Form(forms/upload_model.xml);
   var k = form.showForm(upload-display-pipeline.jx);

   k.invalidate();

   var widget = form.getChild(upload);
   var uploadedContent = handleUpload(form);
   var part  = widget.getValue();
   part.copyToFile(new.pdf) ;
...


The pdf file is uploaded, but deleted at the end of the request. However 
it is not copied to new.pdf


Please, what am I doing wrong ?


What handleUpload() method does? Have you checked log files? Are you sure that new.pdf does not 
exist? Have you checked work-directory of servlet container?


Not sure what's the exact problem so just wild guessing here.

--
Grzegorz Kossakowski

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upload widget

2008-03-17 Thread Felix Knecht

Peter Sparkes schrieb:

Thanks Grzegorz,

Unfortunately I can't get it to work, code is:

function upload() {
 var form = new Form(forms/upload_model.xml);
   var k = form.showForm(upload-display-pipeline.jx);

   k.invalidate();

   var widget = form.getChild(upload);
   var uploadedContent = handleUpload(form);
   var part  = widget.getValue();
   part.copyToFile(new.pdf) ;


I don't think that 'part' implements a the function 'copyToFile' (at 
least I haven't found it).

I get the file path of the uploaded file by
var filePath = widget.getValue().getFile();
Then you can copy it via custom copy functions to where you want.

I disabled the k.invalidate() and keep the file also after the request 
upload.getValue( ).setDisposeWithRequest( false ); is gone (file is by 
default disposed with the request) because I copy it not within the 
request - but I must take care mayself after copying the the file gets 
deleted.


snip
var uploadWidget = form.lookupWidget( upload );
var k = form.showForm( screen );
// k.invalidate(); // do not allow return to the form
if( upload.value != null ) {
 var filePath = upload.value.file;
  upload.getValue( ).setDisposeWithRequest( false );
}
/snip

HTH
Felix



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upload widget

2008-03-17 Thread Joerg Heinicke

On 17.03.2008 10:26, Felix Knecht wrote:


   part.copyToFile(new.pdf) ;


I don't think that 'part' implements a the function 'copyToFile' (at 
least I haven't found it).


It is, but not really in a useful way:

public void copyToFile(String filename) throws IOException {
InputStream is = getInputStream();
OutputStream os = new FileOutputStream(filename);
IOUtils.copy(is, os);
is.close();
os.close();
}

So the file is created relative to the JVM's base directory which is for 
Tomcat the bin directory in CATALINA_HOME (when started via the batch 
files in that directory).


I'd rather recommend to use absolute filenames or copyToSource(Source) 
and resolve the path you want to write to beforehands.


Also the above is a rather buggy implementation, there is no guarantee 
the streams are closed.


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upload widget

2008-03-17 Thread Joerg Heinicke

On 17.03.2008 23:18, Joerg Heinicke wrote:


   part.copyToFile(new.pdf) ;


I don't think that 'part' implements a the function 'copyToFile' (at 
least I haven't found it).


It is, but not really in a useful way:

public void copyToFile(String filename) throws IOException {
InputStream is = getInputStream();
OutputStream os = new FileOutputStream(filename);
IOUtils.copy(is, os);
is.close();
os.close();
}

So the file is created relative to the JVM's base directory which is for 
Tomcat the bin directory in CATALINA_HOME (when started via the batch 
files in that directory).


I'd rather recommend to use absolute filenames or copyToSource(Source) 
and resolve the path you want to write to beforehands.


Also the above is a rather buggy implementation, there is no guarantee 
the streams are closed.


There was a second issue with PartInMemory. It was not possible to read 
the InputStream a second time except by manually calling reset() on it. 
It used to return the same ByteArrayInputStream instance and never reset 
it. Both issues (this + closing the streams) are fixed in SVN.


Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upload widget

2008-03-16 Thread Grzegorz Kossakowski

Peter Sparkes pisze:

Hi,

Following the /upload/ sample in the CForms Block Samples I am trying to 
upload files, however, the uploaded files are deleted at the end of a 
request.


Please how do I permanently save the uploaded files.


From form object get upload widget and ask it for its value which is Part[1] 
object.

You should do something like that:

  part = form.getChild(upload_widget).getValue();

Then it's easy because Part interface has handy methods for accessing the 
uploaded data.

[1] 
http://cocoon.apache.org/2.2/core-modules/core/2.2/apidocs/org/apache/cocoon/servlet/multipart/Part.html


I hope this helps.

--
Grzegorz Kossakowski

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



upload widget

2008-03-15 Thread Peter Sparkes

Hi,

Following the /upload/ sample in the CForms Block Samples I am trying to 
upload files, however, the uploaded files are deleted at the end of a 
request.


Please how do I permanently save the uploaded files.

Thanks

Peter Sparkes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upload widget

2008-03-08 Thread Peter Sparkes

Hi,

Please, using the Upload widget, how do I specify the location on the 
server I want a file uploaded to.


Thanks

Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upload Widget HTML Page does not render

2007-04-24 Thread Pieter Delmee

Steven Barrett wrote:

I have tried using the upload widget which works well in my local Cocoon
installation using 2.1.9 (windows)

However when the code is uploaded to my ISP's server also using 2.1.9
(linux) the HTML page displayed in the browser appears blank. The source
reveals that there is HTML content but it does not render correctly in the
browser.

I am using Firefox 1.5.0.11 for both my local tests (which work) and for
testing the deployed code at the ISP's server (which doesn't work).

Comparing the HTML generated from my local server to that generated by the
ISP's server the markup does have differences.

The main ones are.

The page that doesn't work has ?xml version=1.0 encoding=ISO-8859-1?
declared where as the working page does not.

I can get the non working page to render if the line.

script src=resources/forms/htmlarea/htmlarea.js type=text/javascript /

.is changed to.
 
script src=resources/forms/htmlarea/htmlarea.js type=text/javascript 

/script


I think the serializer causes the difference. The html serializer makes 
sure that script elements are written with a separate closing element. 
If you're using the xhtml serializer, then that's probably causing the 
difference.


Adding omit-xml-declarationyes/omit-xml-declaration to the 
serializer configuration will prevent the ?xml ... element, but then 
you're not outputting xhtml anymore, so it's better to switch back to html.


Do you provide the serializer configuration yourself, or is it set by 
your ISP.





There are other differences between the files, like the inclusion ordering
of some of the script tags. 


On the ISP's server I do see some log ERROR's that do not appear in my local
installation like.

19:28:42.952 EVENT  ERROR   (2007-04-21) 19:28.42:951   [sitemap.]
(/inccom/fileupload/resources/dojo/dojo.js) PoolThread-4/ErrorHandlerHelper:
Error during resolving of the input stream19:28:44.425 EVENT  ERROR
(2007-04-21) 19:28.44:423   [sitemap.]
(/inccom/fileupload/resources/forms/css/forms.css)
PoolThread-4/ErrorHandlerHelper: Resource not found.
19:28:47.116 EVENT  ERROR   (2007-04-21) 19:28.47:115   [sitemap.]
(/inccom/fileupload/resources/forms/css/forms-calendar.css)
PoolThread-4/ErrorHandlerHelper: Error during resolving of the input stream


Check that the following pipe exists in /inccom/fileupload/sitemap.xmap

map:match pattern=resources/*/**
  map:read src=resource://org/apache/cocoon/{1}/resources/{2} /
/map:match




Does anyone have any ideas and could help?

I can send through some specific code if required.

Thanks.
Steve



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upload Widget HTML Page does not render

2007-04-21 Thread Steven Barrett
I have tried using the upload widget which works well in my local Cocoon
installation using 2.1.9 (windows)

However when the code is uploaded to my ISP's server also using 2.1.9
(linux) the HTML page displayed in the browser appears blank. The source
reveals that there is HTML content but it does not render correctly in the
browser.

I am using Firefox 1.5.0.11 for both my local tests (which work) and for
testing the deployed code at the ISP's server (which doesn't work).

Comparing the HTML generated from my local server to that generated by the
ISP's server the markup does have differences.

The main ones are.

The page that doesn't work has ?xml version=1.0 encoding=ISO-8859-1?
declared where as the working page does not.

I can get the non working page to render if the line.

script src=resources/forms/htmlarea/htmlarea.js type=text/javascript /

.is changed to.
 
script src=resources/forms/htmlarea/htmlarea.js type=text/javascript 
/script

There are other differences between the files, like the inclusion ordering
of some of the script tags. 

On the ISP's server I do see some log ERROR's that do not appear in my local
installation like.

19:28:42.952 EVENT  ERROR   (2007-04-21) 19:28.42:951   [sitemap.]
(/inccom/fileupload/resources/dojo/dojo.js) PoolThread-4/ErrorHandlerHelper:
Error during resolving of the input stream19:28:44.425 EVENT  ERROR
(2007-04-21) 19:28.44:423   [sitemap.]
(/inccom/fileupload/resources/forms/css/forms.css)
PoolThread-4/ErrorHandlerHelper: Resource not found.
19:28:47.116 EVENT  ERROR   (2007-04-21) 19:28.47:115   [sitemap.]
(/inccom/fileupload/resources/forms/css/forms-calendar.css)
PoolThread-4/ErrorHandlerHelper: Error during resolving of the input stream

Does anyone have any ideas and could help?

I can send through some specific code if required.

Thanks.
Steve






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upload Widget and Ajax with IE

2007-03-28 Thread Robert Blank

johnson schrieb:
There's something strange when using ajax and upload widget, I've two 
solution.


1. using iframe combine two form, one the oridinary , the other upload 
widget.


2. add a button to set the state of upload widget to output when you are 
not using it fuction.


both method will work.

Best rgards


Hmm... that did not realy help me.
In Cocoon Sample 
(http://cocoon.zones.apache.org/demos/release/samples/blocks/forms/uploadprogress) 
it works. But when i use the form definition and the template it does 
not work with IE. IE send after form-submit an other request than FF and 
it seems that IE can not/does not do anything with the response and get 
stucked.. any ideas?


Robert,

PS: I found out (in the saples) that the sitemap changed for ajax a bit:
map:when test=true
  map:select type=request-parameter
map:parameter name=parameter-name value=dojo.transport/
map:when test=iframe
  map:transform 
src=resource://org/apache/cocoon/forms/resources/IframeTransport-bu-styling.xsl/!

  map:serialize type=xhtml/!-- this is REALLY important --
/map:when
map:otherwise
  map:serialize type=xml/
/map:otherwise
  /map:select
/map:when
But this does not helped..

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upload Widget and Ajax with IE

2007-03-28 Thread Robert Blank

Robert Blank schrieb:
In Cocoon Sample 
(http://cocoon.zones.apache.org/demos/release/samples/blocks/forms/uploadprogress) 
it works. But when i use the form definition and the template it does 
not work with IE. IE send after form-submit an other request than FF and 
it seems that IE can not/does not do anything with the response and get 
stucked.. any ideas?


Sorry... in the Samples it does not work... So it is maybe a bug?!

Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upload Widget and Ajax with IE

2007-03-23 Thread Robert Blank

Hello,

i have a Problem with an upload widget in a form in which ajax is 
activated using Internet Explorer (6 and 7). When I click the save-form 
button it gets deactivated and nothing more happens. With FF everything 
works - the form reloads and shows the correct result after the save. 
Without ajax it works with both browsers. Is this a bug or is there any 
special with IE, ajax and upload widget? Btw I'm using Cocoon 2.1.10.


Robert Blank

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upload Widget and Ajax with IE

2007-03-23 Thread johnson
There's something strange when using ajax and upload widget, I've two 
solution.


1. using iframe combine two form, one the oridinary , the other upload 
widget.


2. add a button to set the state of upload widget to output when you are 
not using it fuction.


both method will work.

Best rgards

johnson

Robert Blank 提到:

Hello,

i have a Problem with an upload widget in a form in which ajax is 
activated using Internet Explorer (6 and 7). When I click the 
save-form button it gets deactivated and nothing more happens. With FF 
everything works - the form reloads and shows the correct result after 
the save. Without ajax it works with both browsers. Is this a bug or 
is there any special with IE, ajax and upload widget? Btw I'm using 
Cocoon 2.1.10.


Robert Blank

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax bug for upload widget

2007-03-18 Thread johnson

sorry!

the bug appear when there's a upload widget with ajax enable.

johnson

johnson 提到:
 addition info:

 the error will occurs when there's a textarea field in the repeater
 before. if not it will fine.

 johnson



 johnson 提到:
   
 Hi:

 I've a form with a textarea field in it's repeater, every thing is fine
 without ajax.

 turn on ajax, load form and save form is fine too, but when a load form
 from bean and then add a row, Error happened.

 the form XML analysys error, can't find the address of eplement:
 http://...

 Because it fine without ajax, so it must be some error in ajax, I'm
 using 2.1.10


 Best regards

 johnson

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax bug for upload widget

2007-03-18 Thread johnson
I found the error come from input type=file setting in
form-field-styling.xsl, if I change the state to output, or xsl:when
test=fi:value, it's ok.

johnson

johnson 提到:
 sorry!

 the bug appear when there's a upload widget with ajax enable.

 johnson

 johnson 提到:
   
 addition info:

 the error will occurs when there's a textarea field in the repeater
 before. if not it will fine.

 johnson



 johnson 提到:
   
 
 Hi:

 I've a form with a textarea field in it's repeater, every thing is fine
 without ajax.

 turn on ajax, load form and save form is fine too, but when a load form
 from bean and then add a row, Error happened.

 the form XML analysys error, can't find the address of eplement:
 http://...

 Because it fine without ajax, so it must be some error in ajax, I'm
 using 2.1.10


 Best regards

 johnson

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
 
   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



upload widget hangs a form in IE6

2006-12-29 Thread Alberto Brosich
Is there a known issue with upload widget and internet explorer in 
cocoon 2.1.10?


I have a multipage form (2 pages) with an upload widget in page 2.

model definition:
fd:upload id=upload state=disabled required=false
/fd:upload

template definition:
ft:widget id=upload/


When I try to submit the form a dialog shows the message No response 
data found.

In cocoon 2.1.9 works all fine and in firefox too (2.1.9 and 2.1.10).
The upload sample in cform cocoon samples works fine too.

Any suggest?

Thanks in advance

Alberto





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: upload widget hangs a form in IE6

2006-12-29 Thread [EMAIL PROTECTED]

Hi Alberto

I remember similar problem in 2.1.9.
I do not have the solution, but...

when in the form template :

ft:form-template ... enctype=multipart/form-data ..

and the upload widget is disabled

fd:upload id=upload state=disabled required=false

I found  similar problem, try to remove state=disabled.

Bye, Alessandro


Alberto Brosich ha scritto:
Is there a known issue with upload widget and internet explorer in 
cocoon 2.1.10?


I have a multipage form (2 pages) with an upload widget in page 2.

model definition:
fd:upload id=upload state=disabled required=false
/fd:upload

template definition:
ft:widget id=upload/


When I try to submit the form a dialog shows the message No response 
data found.

In cocoon 2.1.9 works all fine and in firefox too (2.1.9 and 2.1.10).
The upload sample in cform cocoon samples works fine too.

Any suggest?

Thanks in advance

Alberto





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems in Upload Widget

2006-11-22 Thread Alexander Klimetschek

[EMAIL PROTECTED] schrieb:

 I've a problem with Upload Widget (i'm using Cocoon 2.1.9):

 when my upload widget is enabled, AXAJ doesn't work!


This is the normal (but annoying ;-)) behaviour, since uploads in 
browsers work via a normal POST initiated by the browser. 
Programmatically uploading files (what AJAX would be) is turned off in 
all browsers, since this is a security issue (one could upload all 
interesting files from your home directory without you knowing it).


Fortunately this was recently fixed by Jeremy Quinn in cocoon 2.2 trunk, see

http://marc.theaimsgroup.com/?l=xml-cocoon-devm=116186676730602w=2

http://ajaxian.com/archives/dojo-file-upload-progress-bar-widget

As long as 2.2 is not final you have to have a separate form for your 
uploading functionality to have the rest still work with ajax.


Alex


--
Alexander Klimetschek
http://www.mindquarry.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems in Upload Widget

2006-11-22 Thread Alexander Klimetschek

Alexander Klimetschek schrieb:
This is the normal (but annoying ;-)) behaviour, since uploads in 
browsers work via a normal POST initiated by the browser. 


I actually mean PUT, not POST ;-)

Alex

--
Alexander Klimetschek
http://www.mindquarry.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problems in Upload Widget

2006-11-21 Thread s . masoni
Hi all, 

 I've a problem with Upload Widget (i'm using Cocoon 2.1.9):

 when my upload widget is enabled, AXAJ doesn't work!

 If I set upload widget state to invisible, the form doesn't submit at 
all!

Someone could help me?

Thank you in advance.


Simone Masoni
Tel. 0571 998771 
[EMAIL PROTECTED] 
Skype me 

ComputerVar Net s.r.l.
Tel. 0571 998770 - Fax 055 340576
Firenze:Via Volturno, 10/12 - 50019 Loc. Osmannoro Sesto Fiorentino (FI) 
C/O Groma Center, Torre B Uff.1/2
Empoli: Via Giuntini, 40 50053 Empoli (FI) - C/O Gruppo Sesa
Livorno: Piazza Dante, 19/20 - 57121 Livorno
www.computervarnet.it

gifjqZAsJ1Mnz.gif
Description: GIF image


upload widget

2006-07-05 Thread Roland Bair

Hello there :)


I am new to this mailing list - so plz be patient !


I am working with cocoon 2.1.8 and i have problems with ajax and the upload
widgets...

I read in the archive that 2.1.9 may solve this problem, true/false?


is there any possibility to patch 2.1.8 to accept upload widgets with ajax?

i dont need ajax to upload the files, only to create new upload widgets on
the page!



kind regards!

Roland Bair
Research  Development
Topcall International AG
A-1230 Wien, Talpagasse 1

Mail: [EMAIL PROTECTED]
---


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mapping uploaded image to upload widget in flowscript

2006-03-20 Thread SirMike
I uploaded some images onto disk and stored their paths in a database. I 
map uploaded files to upload widget. When adding the record everything 
works fine. The problem is when I try to edit the record with the same 
binding.


java.lang.RuntimeException: The value of an upload widget must be of 
type class org.apache.cocoon.servlet.multipart.Part.


In flowscript, how can I change path from JavaBean into multipart.Part?

--
SirMike

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Ajax and upload widget

2006-02-23 Thread Christofer Dutz








Somehow questions concerning the Upload
Widget are toally ignored in this list. I asked the same question a few weeks
ago and didnt get a single answer. I think well simply have to
wait.

 









Von: Joost Kuif
[mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 22. Februar
2006 13:40
An: users@cocoon.apache.org
Betreff: Ajax and upload widget





Hi,



I read that in version 2.1.8 of cocoon its not
possible to upload with an ajax
enabled form. Searching the mailinglist I see the functionality is (being)
changed in the 2.1.9 and 2.2 development versions. I wonder when the 2.1.9
version will be released Does anyone know?



Would it (on the other hand) be possible to get the
changes into my current version via a patch?



Joost












Re: Ajax and upload widget

2006-02-23 Thread g[R]eK
Hello Joost!


 I read that in version 2.1.8 of cocoon it’s not possible to upload with an
 ajax enabled form. Searching the mailinglist I see the functionality is
 (being) changed in the 2.1.9 and 2.2 development versions. I wonder when the
 2.1.9 version will be released… Does anyone know?


I do not keep trace of this matter but this might be interesting for you:
http://issues.apache.org/jira/browse/COCOON-1780
http://thread.gmane.org/gmane.text.xml.cocoon.devel/61380


 Would it (on the other hand) be possible to get the changes into my current 
 version via a patch?

Why don't you use just recent checkout of 2.1.9-dev?

-- 
 g[R]eK


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ajax and upload widget

2006-02-22 Thread Joost Kuif








Hi,



I read that in version 2.1.8 of cocoon its not possible
to upload with an ajax
enabled form. Searching the mailinglist I see the functionality is (being) changed
in the 2.1.9 and 2.2 development versions. I wonder when the 2.1.9 version will
be released Does anyone know?



Would it (on the other hand) be possible to get the changes
into my current version via a patch?



Joost












Problem with upload widget

2006-02-20 Thread Andrew Le Quesne
Title: Problem with upload widget






Hello,

I have been having problems getting the upload widget to upload files larger than a certain size in cocoon 2.1.8.

e.g. a file of circa 100kb was ok but not one of 998kb. Is there a max file size? Sometimes having issues with pdf/zip files although the 

mime-types have been set in the definition file.

Has anyone else had similar problems?

Andrew




Re: Problem with upload widget

2006-02-20 Thread Simone Gianni

Hi Andrew,
yes, there is a max file size, and you can change it with the 
upload-max-size parameter in the web.xml file. By default it is 
commented out in the web.xml, and defaults to 10 megabytes, so i think 
this is the problem you have while uploading file near 10 megs. If you 
need larger uploads you can decomment it and place your maximum file 
size (in bytes) in the param-value.


Hope this helps,
Simone

--
Simone Gianni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cforms upload widget

2005-12-20 Thread Christofer . Dutz
Hi

Just a small question ... How is work on the ajax upload-widget support
going on?

Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



CForms: Upload Widget in 2.1.7

2005-09-12 Thread Scott Yeadon

Hi,

I've upgraded my Cocoon from 2.1.5 to 2.1.7 and there seems to be a 
problem with the Upload widgets. I have a CForm which has an upload 
widget, I select a file and value appears in the field, I then hit a 
submit-type button which executes the ActionListener code. Within this 
code under 2.1.5 the value (PartOnDisk) contained a value, now it's 
null. Has something changes that would create this behaviour - I notice 
there is now a setValue method but that's the only thing I could see 
that has really changed specific to the uplaod widget.


Scott.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CForms: Bind Onload upload widget???

2004-08-19 Thread oceatoon
Hello

I am trying to declare a Java Pacakge in the  binding javascript/onload tag 
but I can't seem to get this to work??? 
 is it possible to import Java Packages like in flow in the binding 
javascript / onload tag ?

fb:javascript id=path path=@path direction=load
fb:load-form 
 var path = jxpathContext.getValue(@path);
 var uploadFile = new java.io.File(path);
 var uploadFilePart = 
Packages.org.apache.commons.httpclient.methods.multipart.FilePart(path,uploadFile);
  widget.setValue(uploadFilePart);
  /fb:load-form
 /fb:javascript


Thanks 
TIbor

oceatoon wrote:

 Hello everyone
 
 I am faced with a pb to recover the content of my uplaod widget on bind
 load, since what I really bind onSave is the on server path(string) of my
 uploaded file.
 Therefore when I bind onLoad, the widget yiels offcourse because of
 getting a string instead of a Part type Object. So I looked for a
 constructor Part(string path) to put into the on bind load of the widget,
 but
 unfortunetly haven't found anything of the sort?  I might have missed it
 or is there some other technique ??
 
 Thanks for the help
 Tibor



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CForms: Bind Onload upload widget???

2004-08-19 Thread oceatoon
Thanks Bruno 

Indeed , the multiPart type isn't the same , This doesn't work.
well as anybody else would do in this case , I changed the idea :)
Anyhow thanks for he help
T.  
Bruno Dumon wrote:

 On Thu, 2004-08-19 at 11:54, oceatoon wrote:
 Hello
 
 I am trying to declare a Java Pacakge in the  binding javascript/onload
 tag but I can't seem to get this to work???
  is it possible to import Java Packages like in flow in the binding
 javascript / onload tag ?
 
 fb:javascript id=path path=@path direction=load
 fb:load-form
  var path = jxpathContext.getValue(@path);
  var uploadFile = new java.io.File(path);
  var uploadFilePart =

Packages.org.apache.commons.httpclient.methods.multipart.FilePart(path,uploadFile);
 
 you miss a 'new' keyword here.
 
   widget.setValue(uploadFilePart);
 
 but I don't think this will work, as the value for the upload widget
 should be a org.apache.cocoon.servlet.multipart.Part
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



CForms: Onload upload widget getPart(string)???

2004-08-17 Thread oceatoon
Hello everyone 

I am faced with a pb to recover the content of my uplaod widget on bind
load, since what I really bind onSave is the on server path(string) of my
uploaded file.
Therefore when I bind onLoad, the widget yiels offcourse because of getting
a string instead of a Part type Object. So I looked for a constructor
Part(string path) to put into the on bind load of the widget, but
unfortunetly haven't found anything of the sort?  I might have missed it or
is there some other technique ??

Thanks for the help 
Tibor 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



i18n:attr Problem -- can't translate the label of a button from an upload widget

2004-08-03 Thread Bald, Michael
Hi all,
I hope someone can help me with this...

My problem: 
I want to translate the label of buttons. I don't have any problems with the 
tanslation of normal buttons. The only exception is the button of the upload widget 
(Isn't it possible to configure the button in any way?)!!! 


I went through the Mail archives, the FAQs and the internet, but I didn't find any 
hint. :((

I hope someone can help me with this:

form2_template.xsp:
...
td valign=top
ft:widget id=upload value=search i18n:attr=value   
 fi:styling size=31 
style=BACKGROUND-COLOR: yellow/ 
   /ft:widget
/td
...

messages_en.xml
...
message key=searchSearch.../message 
...

Greetings 

Michael (from Germany)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



CForm : Upload widget ??

2004-07-30 Thread oceatoon
Hi every one 

I have an upload widget,
but I get an error right after submiting the form

org.apache.cocoon.servlet.multipart.MultipartException: Malformed stream:
No such file or directory

After a local file upload.
I dont really know what the Malformed Stream means?
I guess it is thrown by the getPart() Class method.

thanks for your help 

Tibor


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upload Widget and multiple user

2004-05-12 Thread laurent_rorive

Dear Members,

Does anyone know what happen if 2 user
simultaneously upload a file called by example : blabla.txt but with a
different content

What will happen in my flowscript ?
Can I be sure that the correct file will follow the correct user ?

Thx for the info

Laurent

Re: Upload Widget and multiple user

2004-05-12 Thread Joerg Heinicke
On 12.05.2004 15:21, [EMAIL PROTECTED] wrote:

Dear Members,

Does anyone know what happen if 2 user simultaneously upload a file called 
by example : blabla.txt but with a different content

What will happen in my flowscript ? Can I be sure that the correct file 
will follow the correct user ?
That should be not an issue of the flowscript. The flowscript must be 
threadsafe, otherwise it would not be usable in the Cocoon environment.

But it might be an issue of the upload component. I don't know in which 
way you handle the upload, but at least in theory it could be that the 
second upload overwrites the first one. Both threads executing 
flowscript would read the same file.

Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Woody + Upload Widget

2004-05-06 Thread laurent_rorive

Thx !

I worked with cocoon 2.1.3 and in this
version it fails.

I also installed 2.1.4 and effectively
the sample works

But when I couple this with my simple
woody application . Actually no way.

There is a missing doc on this !

Is there someone who has doc on it or
url

Laurent

Woody + Upload Widget

2004-05-05 Thread laurent_rorive

Dear Members, 

Is there some one who has experience
with it.

If yes , could you send me a definition
, a template , a flow and perhaps an action sample 

Thanks for your help !

Laurent



Re: Woody + Upload Widget

2004-05-05 Thread Joerg Heinicke
On 05.05.2004 10:19, [EMAIL PROTECTED] wrote:

Dear Members, 

Is there some one who has experience with it.
I have it working with Cocoon 2.1.4.

If yes , could you send me  a definition , a template , a flow and perhaps 
an action sample 
There is a working sample in the woody block samples.

Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Woody : multipage Form and File Upload Widget

2003-07-30 Thread Bruno Dumon
On Wed, 2003-07-30 at 19:55, maisonneuve nico wrote:
 hi ,
 i begin with woody form, and i would know:
 - if it's possible to create a multi-page form (like XMLForm example) ?

there's no special support in woody for that, but you can simply create
multiple separate forms.

 - is a File upload widget exist ?

No. You can of course manage the file-upload seperate from Woody.

 - how create a rule validation ?

The best way to find out is to look at existing validation rule
implementations. For each validation rule you need to write two classes:
the builder, which can create the validation rule based on an XML
configuration (DOM Element), and the validation rule class itself. Both
need to implement a specific interface. Finally you need to configure
the new validation rule in the cocoon.xconf file. Just search for the
validation-rules element over there. The name that you configure there
is the same as the tag you'll need to use the form definition.

Note that Woody is still under heavy development, and much of this could
change.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java  XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]