google-code-export / jqwicket

Automatically exported from code.google.com/p/jqwicket
1 stars 0 forks source link

Uploadify and scriptData parameters #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all !

I am having some trouble passing additional data to the multipart request sent 
by uploadify (through scriptData parameter). Maybe I am doing something wrong.

What steps will reproduce the problem?

1. Add a new UploadifyWebMarkupContainer with UploadifyOptions with 
"{'login':'bob'}" as scriptData

new UploadifyWebMarkupContainer("file_upload", new 
uploadifyOptions().scriptData("{'login':'bob'}")

2. In the page handling the upload : 

HttpServletRequest r = ((ServletWebRequest) 
RequestCycle.get().getRequest()).getContainerRequest();

MultipartServletWebRequest r2 = new MultipartServletWebRequestImpl(r, "", 
Bytes.MAX, "");

r2.getRequestParameters() do not contain any parameter named 'login'.

Request parameters contain :

"0" -> "{"
"1" -> "l"
"2" -> "o"
"3" -> "g"
and so on ...

What is the expected output? What do you see instead?

The JQuery output is as such : 

$(document).ready(function(){$("#file__upload4").uploadify({scriptData:"{'login'
:'bob'}", ...)})

Shouldn't be ... .uploadify({ scriptData: {'login':'bob'}

whithout the double quotes ?

What version of the product are you using? On what operating system?

JQwicket 0.7, Wicket 1.5.3, Debian 6

Thank you so much for your help & this amazing plugin :)

Regards,

Pierre.

Original issue reported on code.google.com by broggi.p...@gmail.com on 14 Dec 2011 at 4:16

GoogleCodeExporter commented 9 years ago
will be fixed in 0.8, to produce correct output automatically.
for now you can use following quickfix:

new UploadifyOptions().scriptData(JQLiteral._raw("{'login':'bob'}")

Original comment by m...@javaforge.net on 28 Dec 2011 at 9:57

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r533.

Original comment by m...@javaforge.net on 28 Dec 2011 at 9:58