Last active
August 29, 2015 13:56
-
-
Save cortix/9079660 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBean | |
User1Dao user1Dao; | |
private User1 user1 = new User1(); | |
... | |
final FileUploadField fileUpload = new FileUploadField("fileUpload",new PropertyModel(user1, "photo")); | |
form.add(fileUpload); | |
... | |
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.setConsultantApproval(""); | |
user1Dao.save(user1); | |
ajaxRequestTarget.add(wrapper); | |
} | |
}; | |
form.add(submit); | |
wrapper.add(form); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment