[APPFUSE_LIGHT-1] server side validation doesn't work in appfuse-light-spring-hibernate-1.8.2 when adding a new user Created: 31/May/08  Updated: 31/May/08

Status: Open
Project: appfuse-light
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Type: Bug Priority: Major
Reporter: ssteyaert Assignee: appfuse-light-issues
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 1

 Description   

server side validation doesn't work in appfuse-light-spring-hibernate-1.8.2
You can reproduce the error when you deactivate javascript in your browser when
submitting a new user.

This patch worked for me:

      • UserFormController.java 2008-05-31 19:34:43.000000000 +0200
      • ../UserFormController.java 2008-05-31 19:31:18.000000000 +0200
        ***************
      • 4,9 ****
      • 4,10 ----
        import org.apache.commons.logging.LogFactory;
        import org.appfuse.model.User;
        import org.appfuse.service.UserManager;
        + import org.springframework.beans.factory.InitializingBean;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.beans.factory.annotation.Qualifier;
        import org.springframework.beans.propertyeditors.CustomDateEditor;
        ***************
      • 24,30 ****

@Controller
@RequestMapping("/userform.*")
! public class UserFormController extends SimpleFormController {
private final Log log = LogFactory.getLog(UserFormController.class);
@Autowired
UserManager userManager;
— 25,31 ----

@Controller
@RequestMapping("/userform.*")
! public class UserFormController extends SimpleFormController implements
InitializingBean {
private final Log log = LogFactory.getLog(UserFormController.class);
@Autowired
UserManager userManager;
***************

      • 136,139 ****
      • 137,146 ----
        public String getText(String msgKey, Object[] args) { return getMessageSourceAccessor().getMessage(msgKey, args); }

        +
        + public void afterPropertiesSet() throws Exception

        Unknown macro: {+ if (validator != null) { + setValidator(validator); + }+ }

        }






Generated at Sun Apr 19 11:22:29 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.