You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alexander Landsnes Keül <Al...@visma.no> on 2008/06/11 19:30:00 UTC
FileUploadField and AjaxButton
Hi,
I'm trying to use an AjaxButton along with a FileUploadField, and that produces an unfortunate but predictable result. Whenever I call _fileUploadField.getFileUpload() it returns null. If I try to replace the button with a regular one it works just fine. Am I missing something obvious here, or is it an issue?
This is in a function called by the onSubmit() in both cases:
FileUpload upload = _fileUploadField.getFileUpload();
if( upload != null )
{
// some code
} else
{
log.error(....);
}
I always get to the error bit here. I've solved the issue another place by simply using a regular button. However that isn't really an option for me at this location. I'd appreciate it if anyone could explain why this acts as it does, or even better have a solution for me :)
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: FileUploadField and AjaxButton
Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Wed, 11 Jun 2008, Alexander Landsnes Keül wrote:
> produces an unfortunate but predictable result. Whenever I call
> _fileUploadField.getFileUpload() it returns null. If I try to replace
> the button with a regular one it works just fine. Am I missing
> something obvious here, or is it an issue?
I think that it is an obvious issue :)
* FILE UPLOADS ARE NOT SUPPORTED BY AJAX. USE GOOGLE TO LEARN MORE
* ABOUT THIS.
http://svn.apache.org/repos/asf/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/FileUploadField.java
It's a great idea to attach Wicket source code to Wicket
jars in your IDE, then you can easily surf to Wicket code
which tends to explain itself well, see the javadocs etc.
Best wishes,
Timo
--
Timo Rantalaiho
Reaktor Innovations Oy <URL: http://www.ri.fi/ >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org