Actually, I've been doing it.  XHR doesn't.  But there's a trick you
can pull.  You set the target attribute of the form tag to a hidden
iframe on the page and DON'T do XHR.  Normal form submission.  The
effect is somewhat the same, but you don't have a client-side
javascript callback once the submission's complete.

Bill

On Wed, Aug 20, 2008 at 1:47 AM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> That's an interesting question: does XMLHttpRequest support file
> uploads?  Need to do some research.
>
> On Tue, Aug 19, 2008 at 11:35 PM, Bill Holloway <[EMAIL PROTECTED]> wrote:
>> I have a form with the zone defined.  The form has one field.
>> Everything works fine for a t:textfield text field.  The zone is
>> updated no problem.  But when the field in the form is t:upload, the
>> file is not uploaded.
>>
>> Component class snippet:
>>
>> @Inject
>> private Block _confirmBlock;
>>
>> @Property
>> private UploadedFile _uploadedFile;
>>
>> Block onSuccessFromImageUploadForm ()
>> {
>>    try
>>    {
>>        System.out.println( "_uploadedFile.getFilePath() = " +
>> _uploadedFile.getFilePath());
>>        return _confirmBlock;
>>    }
>>    catch ( Throwable e )
>>    {
>>        e.printStackTrace();
>>    }
>>    return null;
>> }
>>
>> Component template:
>>
>> <t:form t:id="imageUploadForm" zone="confirm">
>>
>>        <p>
>>            <t:upload t:id="uploadedFile" />
>>        </p>
>>
>>        <p><t:submit label="message:upload.photo" /></p>
>>
>> </t:form>
>>
>> <t:zone t:id="confirm">
>>        initial
>> </t:zone>
>>
>> <t:block t:id="confirmBlock">
>>        ${uploadedFile?.filePath}
>> </t:block>
>>
>> Any ideas?
>>
>> --
>> Bill @ PeoplePad
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Bill @ PeoplePad

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

Reply via email to