public String postEdit(@Valid PhotoForm form, BindingResult result, Model model) throws Exception {
if (result.hasErrors()) {
return JSP_EDIT;
}
Photo photo;
IJpaFactory<Photo> strategy = new PhotoStrategy(new J2eeConfig());
strategy.setTransactional(true);
try {
if (form.getId() == 0) {
photo = new Photo();
} else {
photo = strategy.get(form.getId());
}
photo.setOrder(form.getOrder());
setPhotoWithThumb(form, photo, true);
setPhotoWithThumb(form, photo, false);
if (form.getId() == 0) {