i wouldnt even use a form to submit it. i would have the iframe submit
to a servlet which would then receive the file and store it on disk in
a well known location. the wicket component can then provide a file
pointing to that location as its model.

-igor

On Mon, Jun 22, 2009 at 7:09 AM, Arie Fishler<[email protected]> wrote:
> ok...thanks. this is the way to define the preview display. However I am not
> sure you referred to the issue of submitting the preview which is the bigger
> problem here.
>
> Is it supposed to work when the uploaded file has its own for within the
> main form? nested forms? Since I could not get the ajax-iframe thing to work
> this way.
>
> If not....I need a way to only submit the uploaded file for preview while
> the rest of the form is not changed. it is not the most convenient or
> elegant to have this as a totally separate form. If I want to make it a
> panel for example I want it to include the whole functionality.
>
> On Mon, Jun 22, 2009 at 4:44 PM, Igor Vaynberg <[email protected]>wrote:
>
>> when your inline frame is done getting the file it can send some
>> javascript to the browser to change an src of a hidden img tag to the
>> url of the uploaded file. thats one way to do this. another way is to
>> treat the hidden frame as an actual component and place it where you
>> want the preview to be, that way after the upload it can write out an
>> img tag.
>>
>> -igor
>>
>> On Mon, Jun 22, 2009 at 2:14 AM, Arie Fishler<[email protected]> wrote:
>> > Hi,
>> >
>> > I know this was handled many times here in a way but this is not exactly
>> the
>> > regular kind of "ajax submit for an upload field".
>> >
>> > I have implemented the ajax submit using the inline frame solution.
>> > However...I want to have a preview of an uploaded file (image for
>> example)
>> > BEFORE submitting the form.
>> >
>> > I have several fields in a form one of which is an uploaded file field.
>> > Clicking an upload link near the uploaded file field  should load the
>> file
>> > and not submit the form.
>> > When the user sees the file, fills all the other fields he would like to
>> > submit the form.
>> >
>> > This is pretty common use case I guess.
>> >
>> > Nested forms does not work here (inner form has only an upload field with
>> > ajax submit method) so only separate form go....which is not good for me.
>> >
>> > Is there a descent way to implement this?
>> >
>> > Thanks,
>> > Arie
>> >
>>
>> ---------------------------------------------------------------------
>> 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]

Reply via email to