Behavior (wicket 1.5): http://pastebin.com/WUHsiRL2
instance.js (to initialize uploadify): http://pastebin.com/jGSwzHMN

Mount it in Application.init() with:

// Allow uploads through uploadify
mount( new UploadifyBehavior.Uploader( "/uploadify" ) );

Use it like this:

component.add( new UploadifyBehavior()
            {

                @Override
protected void onUpload( UploadInfo info, AjaxRequestTarget target )
                {
// Handle upload any way you like, and replace stuff in this ajax request
                }

            } );

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 16-10-2012 19:09, schreef heapifyman:
Thanks.
Would you mind sharing the mounted resource's code? I'm not completely sure
how to implement that.


2012/10/16 Bas Gooren <b...@iswd.nl>

Hi!

We use a different uploader (uploadify), but the basics are the same.

What we've built for this is a behavior which renders the UI for the
uploader, and handles ajax callbacks.

The uploader uploads to a mounted resource (e.g. at /uploadify), which has
an internal cache (UUID => FileInfo).
After a successful upload, the upload resource returns the UUID;
The javascript onComplete handler then calls the ajax behavior with the
UUID parameter, which allows other components in the page to respond to the
upload.

To prevent overflow in the uploader cache we use a map with a maximum size
which evicts old entries on overflow.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 16-10-2012 12:59, schreef heapifyman:

  Not sure if I understand.
As far as I got it, the upload plugin requires some "web service" that
accepts POST and DELETE requests to add/remove uploaded files.
Doing that is no problem, I guess.
But how to I link this with the current user's wicket session so that I
know which files the users uploaded when finally the form is submitted?
I'm not sure if I'm using the right wording here. Hope you get the idea...


2012/10/16 Martin Grigorov <mgrigo...@apache.org>

  Hi,
Is it an option to upload to a IResource and store the uploaded data
the same way as if you'd do in the page ?

On Tue, Oct 16, 2012 at 12:49 PM, heapifyman <heapify...@gmail.com>
wrote:

Hello,

has anyone tried yet to integrate blueimp's jQuery File Upload
http://blueimp.github.com/**jQuery-File-Upload/<http://blueimp.github.com/jQuery-File-Upload/>with
 Wicket FileUpload?
Especially in combination with additional input fields <input
type=text">
I'm kind of stuck because I'm not really sure where to point the jquery
file upload's url param to and how to store the uploaded files in the
wicket page for saving them when the complete form is submitted.

Any help would be appreciated.
Thanks


--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

------------------------------**------------------------------**
---------
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
For additional commands, e-mail: users-h...@wicket.apache.org




Reply via email to