blob: 30324a5f25e215b918e879dede20fc24fe61418e [file] [log] [blame]
<span jwcid="$content$">
<span jwcid="@Border">
<h2>File Uploads</h2>
<p>The Upload component is used as a form element and allows files to be uploaded to Tapestry. It can
be freely mixed with other components in a form.</p>
<p>The following form allows you to upload a file and see a hexadecimal dump of it.</p>
<form jwcid="valid@Form">
<input jwcid="inputEnabled"/> Enable Client Side Validation
</form>
<span jwcid="@form/ShowError" delegate="bean:delegate"/>
<form jwcid="@Form" success="listener:doSubmit" delegate="bean:delegate" clientValidationEnabled="ognl:clientValidationEnabled">
<table class="form">
<tr>
<th><span jwcid="@FieldLabel" field="component:inputFile"/>:</th>
<td><input jwcid="inputFile@Upload" file="ognl:file" size="30"
displayName="File" validators="validators:required"/></td>
</tr>
<tr>
<th>Options:</th>
<td>
<table class="form">
<tr>
<th><input jwcid="@Checkbox" value="ognl:showAscii"/></th>
<td>Display ASCII</td>
</tr>
<tr>
<th><select jwcid="inputWidth"/></th>
<td>bytes per line</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
<td><input jwcid="@ImageSubmit" image="asset:continue"/></td>
</tr>
</table>
</form>
</span>
</span>