Reputation: 20019
I want user to be able to easily upload screenshots into my application. (preferably without to many js/ajax trickery)
Is there a standard way in Wicket to allow an image to be pasted in some FormComponent
(textarea
? div
with contenteditable
?) and used as a regular input, so that when the form is posted, I get a byte[]
/stream in the Java code?
Upvotes: 0
Views: 213
Reputation: 17513
You have to use <input type="file">
in the markup and FileUpload
component at the Java/server code.
If you need fancier ways than Upload
button than you will need to use some Javascript library.
Here is the plain Wicket example
If you use Bootstrap then you may use Wicket-Bootstrap integrations like FileInput or DropZone
Upvotes: 2