Im using Wicket 1.5 and I need to build a component with a FileUploadField to load an image.
I need an Ajax behaviour to make a preview of image after selected it (without submiting the entire form).
Searching on Google, I found this Event that match when I select the file:
AjaxEventBehavior choose = new AjaxEventBehavior("onChange"){
private static final long serialVersionUID = 1L;
@Override
protected void onEvent(AjaxRequestTarget target) {
Request request = RequestCycle.get().getRequest();
}
};
What I need is the stream of image to put in a little panel that required:
byte[] imgBytes
And obviously I need the same stream to fill a PropertyModel for DB storing.
Thanks