You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chuck Kring <cj...@pacbell.net> on 2010/05/03 22:07:13 UTC

Is this a bug?

Hello,

I have a form that references a zone.   When the form is linked to the 
zone (form t:zone="zone"), a file upload component fails.  When the link 
is removed the file upload works fine.

Java and tml are below.  This currently prints "Uploaded = null".  To 
get it to work remove t::zone="theForm" from the form.

Is this a bug or am I doing something wrong?   If it's a bug I'll file a 
Jira.

Thanks.

Chuck Kring
------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<body>
<div class="dialog_outer" style="width:700px">
        <t:zone t:id="theForm"/>
	<t:form t:zone="theForm">
	    <table><tbody>
		  <tr>
		      <td>Upload file</td>
		      <td><input t:type= "upload" t:id="uploaded"/></td>
		  </tr>
	       </tbody></table>
	    <t:submit t:id="apply" value="Apply"/>
        </t:form>
</div>
</body></html>

------------------------------------------------------------------------
package gateway.pages;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.upload.services.UploadedFile;

public class BugReport {
   
    @Property
    private UploadedFile uploaded;
   
    public void onSelectedFromApply()
    {
        if(uploaded == null ){
            System.out.println("Uploaded = null");
        } else {
            System.out.println("Uploaded = " + uploaded.getFileName());
        }
    }
}

Re: Is this a bug?

Posted by Chuck Kring <cj...@pacbell.net>.
Got it.  Thanks.

Thiago H. de Paula Figueiredo wrote:
> On Mon, 03 May 2010 19:43:41 -0300, Chuck Kring <cj...@pacbell.net> 
> wrote:
>
>> Tapestry360 Jira is down.  I'll file  it when it comes back up.  
>> Thanks for helping.
>
> Tapestry's JIRA is https://issues.apache.org/jira/browse/TAP5.
>

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


Re: Is this a bug?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 03 May 2010 19:43:41 -0300, Chuck Kring <cj...@pacbell.net>  
wrote:

> Tapestry360 Jira is down.  I'll file  it when it comes back up.  Thanks  
> for helping.

Tapestry's JIRA is https://issues.apache.org/jira/browse/TAP5.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Re: Is this a bug?

Posted by Chuck Kring <cj...@pacbell.net>.
Tapestry360 Jira is down.  I'll file  it when it comes back up.  Thanks 
for helping.

Chuck

Thiago H. de Paula Figueiredo wrote:
> On Mon, 03 May 2010 19:25:55 -0300, Chuck Kring <cj...@pacbell.net> 
> wrote:
>
>> Does it make sense to file a Jira?  Something like 'upload component 
>> should be enhanced to work with Ajax'?
>
> Yes. :)
>

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


Re: Is this a bug?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 03 May 2010 19:25:55 -0300, Chuck Kring <cj...@pacbell.net>  
wrote:

> Does it make sense to file a Jira?  Something like 'upload component  
> should be enhanced to work with Ajax'?

Yes. :)

-- 
Thiago H. de Paula Figueiredo
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com  
Ênfase em Java da Faculdade Pitágoras
http://www.arsmachina.com.br

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


Re: Is this a bug?

Posted by Chuck Kring <cj...@pacbell.net>.
Thanks.

Does it make sense to file a Jira?  Something like 'upload component 
should be enhanced to work with Ajax'? 

Chuck


Thiago H. de Paula Figueiredo wrote:
> On Mon, 03 May 2010 17:07:13 -0300, Chuck Kring <cj...@pacbell.net> 
> wrote:
>
>> Hello,
>
> Hi!
>
>> I have a form that references a zone.   When the form is linked to 
>> the zone (form t:zone="zone"), a file upload component fails.  When 
>> the link is removed the file upload works fine.
>
> Independently of Tapestry, AJAX doesn't support file uploads. When you 
> see something that seems to be a file submission through AJAX, it's 
> implemented by some Flash control ou using an iframe. Of course, as 
> Howard said, the Upload component could handle this options itself.
>

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


Re: Is this a bug?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 03 May 2010 17:07:13 -0300, Chuck Kring <cj...@pacbell.net>  
wrote:

> Hello,

Hi!

> I have a form that references a zone.   When the form is linked to the  
> zone (form t:zone="zone"), a file upload component fails.  When the link  
> is removed the file upload works fine.

Independently of Tapestry, AJAX doesn't support file uploads. When you see  
something that seems to be a file submission through AJAX, it's  
implemented by some Flash control ou using an iframe. Of course, as Howard  
said, the Upload component could handle this options itself.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


Re: Is this a bug?

Posted by Kalle Korhonen <ka...@gmail.com>.
On Mon, May 3, 2010 at 3:13 PM, Massimo Lusetti <ml...@gmail.com> wrote:
> On Mon, May 3, 2010 at 10:30 PM, Howard Lewis Ship <hl...@gmail.com> wrote:
>> We don't yet have Forms and Zones working; XMLHttpRequest doesn't
>> automatically handle the necessary MIME multipart/form-data content
>> type.  It possible that the Upload need to be handled specially,
>> perhaps with a Flash movie.
> I would avoid Flash as a plague.

Agree. Asynchronous file uploads don't require Flash.

Kalle

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


Re: Is this a bug?

Posted by Massimo Lusetti <ml...@gmail.com>.
On Mon, May 3, 2010 at 10:30 PM, Howard Lewis Ship <hl...@gmail.com> wrote:

> We don't yet have Forms and Zones working; XMLHttpRequest doesn't
> automatically handle the necessary MIME multipart/form-data content
> type.  It possible that the Upload need to be handled specially,
> perhaps with a Flash movie.

I would avoid Flash as a plague.

Cheers
-- 
Massimo
http://meridio.blogspot.com

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


Re: Is this a bug?

Posted by Howard Lewis Ship <hl...@gmail.com>.
We don't yet have Forms and Zones working; XMLHttpRequest doesn't
automatically handle the necessary MIME multipart/form-data content
type.  It possible that the Upload need to be handled specially,
perhaps with a Flash movie.

On Mon, May 3, 2010 at 1:07 PM, Chuck Kring <cj...@pacbell.net> wrote:
> Hello,
>
> I have a form that references a zone.   When the form is linked to the zone
> (form t:zone="zone"), a file upload component fails.  When the link is
> removed the file upload works fine.
>
> Java and tml are below.  This currently prints "Uploaded = null".  To get it
> to work remove t::zone="theForm" from the form.
>
> Is this a bug or am I doing something wrong?   If it's a bug I'll file a
> Jira.
>
> Thanks.
>
> Chuck Kring
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="utf-8"?>
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <body>
> <div class="dialog_outer" style="width:700px">
>       <t:zone t:id="theForm"/>
>        <t:form t:zone="theForm">
>            <table><tbody>
>                  <tr>
>                      <td>Upload file</td>
>                      <td><input t:type= "upload" t:id="uploaded"/></td>
>                  </tr>
>               </tbody></table>
>            <t:submit t:id="apply" value="Apply"/>
>       </t:form>
> </div>
> </body></html>
>
> ------------------------------------------------------------------------
> package gateway.pages;
> import org.apache.tapestry5.annotations.Property;
> import org.apache.tapestry5.upload.services.UploadedFile;
>
> public class BugReport {
>     @Property
>   private UploadedFile uploaded;
>     public void onSelectedFromApply()
>   {
>       if(uploaded == null ){
>           System.out.println("Uploaded = null");
>       } else {
>           System.out.println("Uploaded = " + uploaded.getFileName());
>       }
>   }
> }
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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