You can try something like this:
FileUploadField fileUpload = new FileUploadField("fileUpload",new
Model<FileUpload>());
form.add(fileUpload);
...
AjaxButton submit = new AjaxButton("submit") {
//onError
@Override
protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form<?> form) {
user1.setConsultantApproval("");
user1.setPhoto(fileUpload.getFileUpload().getBytes());
user1Dao.save(user1);
ajaxRequestTarget.add(wrapper);
}
};
Can you show an example using with (user1, "photo")....because i want to wrap
my pojo class(User1.java) information with FileUploadField
Thank you again your answer :)
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/how-to-use-PropertyModel-for-saving-image-to-database-tp4667580p4667583.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]