Wicket shape starting loading

I am working with Wicket trying to create a form where users select options that correspond to files, which are then combined when the form is submitted and presented to the user. Currently, the code onSubmit()

for the form looks something like this:

ResourceStreamRequestHandler mergedFileHandler = new ResourceStreamRequestHandler(new FileResourceStream(mergedFiles));
mergedFileHandler.setFileName(mergedFiles.getName());
getRequestCycle().scheduleRequestHandlerAfterCurrent(mergedFileHandler);

      

This works fine when the submit button is clicked once when the file is prompted for download, but when clicked again, the page seems to reload and the method onSubmit()

does not run. Is there a better way to do this so that the user can make changes and resubmit the form to get another load without reloading the page or re-entering their parameters?

+3


source to share


1 answer


Have you tried using AjaxSubmitLink and then make sure you are not returning file names? It seems that you reload the whole form and the filenames are cleared during reload.



0


source







All Articles