You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ned Collyer <ne...@gmail.com> on 2009/07/16 08:01:22 UTC

FileUploads - keep them around for multiple requests...

I'm building a wizard.  It has 3 steps.  Persistence occurs for all my
models after the completion of the 3rd step.

Each step has a number of forms.  Each form is brought in dynamically
from 3rd party jars.

This works great so far.  The exception to the rule is FileUploads -
as these are only available for the initial submission.

What would be the best way to maintain a handle on the file so that I
can read the bytes in step 3.

I am wary of the fileupload field being IClusterable, and of the bytes
themselves being transient.

Also, I do not have access to any functionality in the dynamic forms.
They are purely used for updating a model object .


Thoughts:
In the outer form when it is submitted, visit each form for "enabled"
fileuploads and write tmp files out.  I do not want them floating
around in memory.
Find the inner forms modelobject, and update it with a reference to
the file created.

Is there a better way?

Rgds

Ned

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


Re: FileUploads - keep them around for multiple requests...

Posted by Igor Vaynberg <ig...@gmail.com>.
i dont think there is a better way. i think storing the files in some
tmp location is your best bet.

-igor

On Wed, Jul 15, 2009 at 11:01 PM, Ned Collyer<ne...@gmail.com> wrote:
> I'm building a wizard.  It has 3 steps.  Persistence occurs for all my
> models after the completion of the 3rd step.
>
> Each step has a number of forms.  Each form is brought in dynamically
> from 3rd party jars.
>
> This works great so far.  The exception to the rule is FileUploads -
> as these are only available for the initial submission.
>
> What would be the best way to maintain a handle on the file so that I
> can read the bytes in step 3.
>
> I am wary of the fileupload field being IClusterable, and of the bytes
> themselves being transient.
>
> Also, I do not have access to any functionality in the dynamic forms.
> They are purely used for updating a model object .
>
>
> Thoughts:
> In the outer form when it is submitted, visit each form for "enabled"
> fileuploads and write tmp files out.  I do not want them floating
> around in memory.
> Find the inner forms modelobject, and update it with a reference to
> the file created.
>
> Is there a better way?
>
> Rgds
>
> Ned
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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