I've just copied the example upload page from
http://www.wicket-library.com/wicket-examples/upload/single
into my application with the same result: upload works but the progess
bar is NOT updated.
So, anything else needed besides overriding 'newWebRequest()' ?
I'm using wicket, wicket-datetime and wicket-extensions, all in
version 1.4.0.
Do I need another wicket module? Maybe some kind of wicket-ajax ??
On 19.08.2009, at 12:25, Robin Sander wrote:
Hi,
are there any further requirements? I use Wicket 1.4.0, defined
'newWebRequest' in
my Application class and though I do see a progress bar and the
upload works perfectly
I do not see any progress! (the bar never changes)
Is the progress automatically reported by the server side or do I
have to implement
something or add/modify some Javascript?
Robin.
On 19.08.2009, at 09:19, Stefan Lindner wrote:
Hi Ashika,
I pointed yopu tot he documentation because I was not sure if using
UploadWebRequest has any side effects. Does not seem so.
Stefan
-----Ursprüngliche Nachricht-----
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 09:10
An: users@wicket.apache.org
Betreff: Re: Newbie question: fileupload AJAX progressbar ?
Thanks Stefan,
That solved my problem.
Since UploadProgreeBar is a component of 'wicket-extensions', i
refered
documentation at http://www.wicketframework.org/wicket-extensions/
which
is kind of updated (versoin 1.2) . I had to download documentation
for
1.4 from the maven repository.
Thanks again.
Stefan Lindner wrote:
You need
@Override
protected WebRequest newWebRequest(HttpServletRequest
servletRequest) {
return new UploadWebRequest(servletRequest);
}
In your Application's class. I think you should definitly read the
APIdoc (see UploadProgressBar)!
Stefan
-----Ursprüngliche Nachricht-----
Von: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com]
Gesendet: Mittwoch, 19. August 2009 07:17
An: users@wicket.apache.org
Betreff: Newbie question: fileupload AJAX progressbar ?
Greetings all,
I am new to Wicket and I used 'UploadProgressBar' to create an AJAX
brogressbar for fileupload.(refered example at wicket-library.org )
But when uploading a file, eventhough progreebar showed,theres no
activity nor incrementation of the bar
I have posted my code, what could be the problem?
Thanks in advance.
public class UploadPage extends WebPage {
///fileupload form
private class FileUploadForm extends Form<Void>{
private FileUploadField fileuploadField;
public FileUploadForm(String name){
super(name);
setMultiPart(true);
add(fileuploadField=new FileUploadField("fileInput"));
setMaxSize(Bytes.gigabytes(4));
}
@Override
protected void onSubmit() {
final FileUpload upload =
fileuploadField.getFileUpload();
if (upload != null)
{
File newFile = new File(getUploadFolder(),
upload.getClientFileName());
try
{
newFile.createNewFile();
upload.writeTo(newFile);
UploadPage.this.info("saved file: " +
upload.getClientFileName());
}
catch (Exception e)
{
throw new IllegalStateException("Unable to
write
file");
}
}
}
}
public UploadPage(final PageParameters parameters) {
final FeedbackPanel uploadFfeedback=new
FeedbackPanel("uploadFeedback");
add(uploadFfeedback);
final FileUploadForm fileUploadForm=new
FileUploadForm("ajaxupload");
fileUploadForm.add(new UploadProgressBar("progress",
fileUploadForm));
add(fileUploadForm);
}
private Folder getUploadFolder(){
return
((SVRWebApplication)Application.get()).getUploadFolder();
}
}
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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