The problem seems related to the HTML. I've tried to put the table
inside the form and it works. Like this:
<form wicket:id="uploadForm">
<table wicket:id="formContainer">
<tr>
<th><label>[filename]</label></th>
<th><label>[fileupload]</label></th>
<th/>
</tr>
<tr>
<td><input wicket:id="fileName" type="text"/></td>
<td><input wicket:id="fileInput" type="file"/></td>
<td><input wicket:id="submit" class="submit_button"
type="submit" value="add"/></td>
</tr>
</table>
</form>
Home.java
<http://apache-wicket.1842946.n4.nabble.com/file/n4652653/Home.java>
Home.html
<http://apache-wicket.1842946.n4.nabble.com/file/n4652653/Home.html>
@Paul: Yeah I already checked these examples.
@Andrea: You may find my page and markup attached to the post
When I run it I fill the form a first time, when I click on submit the text
field is cleared and I see in the log:
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] ajax : onSubmit
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] ajax : fileName=Test1
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] ajax :
fileInput==null?=false
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] ajax : got 9418 bytes
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] form : onSubmit
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] form : fileName=Test1
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] form :
fileInput==null?=false
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] form : Got 9418 bytes
[10:49:04] [DEBUG] [15485575@qtp-22725577-0] [Home] form : model cleaned
So it is ok....But when I fill the form another time I get:
[10:49:20] [DEBUG] [15485575@qtp-22725577-0] [Home] ajax : onSubmit
[10:49:20] [DEBUG] [15485575@qtp-22725577-0] [Home] ajax : fileName=null
[10:49:20] [DEBUG] [15485575@qtp-22725577-0] [Home] ajax :
fileInput==null?=true
[10:49:20] [ERROR] [15485575@qtp-22725577-0] [Home] ajax : fileInput is null
[10:49:20] [DEBUG] [15485575@qtp-22725577-0] [Home] form : onSubmit
[10:49:20] [DEBUG] [15485575@qtp-22725577-0] [Home] form : fileName=null
[10:49:20] [DEBUG] [15485575@qtp-22725577-0] [Home] form :
fileInput==null?=true
[10:49:20] [ERROR] [15485575@qtp-22725577-0] [Home] form : fileInput is null
[10:49:20] [DEBUG] [15485575@qtp-22725577-0] [Home] form : model cleaned
Nothing is transmitted :(
Thank you
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Reseting-a-textField-of-an-upload-form-tp4652632p4652653.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org