Hi Andrea, i have tried your saying again and solved the problem :) thank you so much...
the solution is, final FileUploadField fileUploadField = new FileUploadField("fileUpload", new IModel<List<FileUpload>>() { public List<FileUpload> getObject() { return null; } public void setObject(List<FileUpload> object) { } public void detach() { } }); form.add(fileUploadField); .... ... ..... AjaxButton submit = new AjaxButton("submit") { @Override protected void onError(AjaxRequestTarget target1, Form<?> form) { feedbackPanel.setVisible(true); super.onError(target1, form); target1.add(wrapper); } @Override protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form<?> form) { user1.setPhoto(fileUploadField.getFileUpload().getBytes()); <-----important user1Dao.save(user1); ajaxRequestTarget.add(wrapper); } }; form.add(submit); wrapper.add(form); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-use-PropertyModel-for-saving-image-to-database-tp4667580p4667612.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org