Hi Eric,

thanks for the feedback. Neil also had the same comments on the Component Reference. Do others think this would be a better format?

regards Malcolm

From: Eric Everman <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [Tapestry-developer] Upload Component Questions, Typos, & Errors
Date: Fri, 01 Nov 2002 18:23:29 -0600

Hi Everyone,

I've just gotten the Upload component to work using the example included with the Upload documentation. I found several typos and errors in the documentation, which are listed below. In general, I think it would be nice to include the entire page specification and class file in all examples, since this makes the examples full proof. This is particularly useful for the class file, since it can often take some time to hunt for the correct import statements when they are not supplied.

As a question, is it somehow possible to specify the destination directory for the uploaded files and to specify a max size before truncation?

Thanks for everyone's help,

Eric Everman


=========From the Documentation===============
The Upload docs incorrectly state "pre Tapestry 2.2 versions the form's enctype must be set to multipart/form-data". In fact, 2.2 also requires the enctype to be set (OK, the docs are half right ;-)

=========From the HTML snippet===============
<form jwcid="form"> should be <form jwcid="form" enctype="multipart/form-data">


=========From the Specification snippet===============

The following contains "/td>" instead of "<td>"
<td>Filename:</td><td><span jwcid="insertFileName"/>/td>

The following contains "listener" instead of "listeners"
<component id="form" type="Form">
<binding name="listener" expression="listener.formSubmit"/>
</component>

The following contains "UploadPage.SIZE_FORMAT" which will always fail, since static bindings assume java.lang.UploadPage unless specified. Perhaps this should not use a static field for the example, since the full class name used by the person using the demo will almost always be different then the full class name shown in the in the example.
<component id="insertFileSize" type="Insert">
<binding name="value" expression="fileSize"/>
<field-binding name="format" field-name="UploadPage.SIZE_FORMAT"/>
</component>

=========From the Code Snippet===============
The following contains "! =" instead of "!="

public String getServerPath() {
if (serverFile ! = null) {
return serverFile.getAbsolutePath();
} else {
return "";
}
}

The following contains "returnfile.getFilePath();" instead of "return file.getFilePath();"

public String getClientPath() {
if (file != null) {
returnfile.getFilePath();
} else {
return "";
}
}



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

_________________________________________________________________
Get faster connections�-- switch to�MSN Internet Access! http://resourcecenter.msn.com/access/plans/default.asp



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to