Hi, has anyone got any idea about this? I'm still 'spinning my wheels' on it.
thanks for any help. On Fri, Apr 2, 2010 at 5:00 PM, Wayne Pope <waynemailingli...@googlemail.com> wrote: > Hi, > > we've got several examples in our logs of properties of the model > being set to null even though the textfield is set to required. > I have NO idea how on earth this can happen - its just doesn't make > sense - and its really frustrating me!! > > here's an example: > > Caused by: java.lang.NullPointerException > at org.apache.commons.codec.digest.DigestUtils.md5(DigestUtils.java:86) > at > org.apache.commons.codec.digest.DigestUtils.md5Hex(DigestUtils.java:108) > at > hub.app.wicket.admin.ChangePasswordPage$1.onSubmit(ChangePasswordPage.java:49) > at > org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1518) > ... > > > Form<User> form = new Form<User>("form", new > CompoundPropertyModel<User>(new HibernateEntityModel<User>(User.class, > u.getId()))) { > �...@override > protected void onSubmit() { > User u = getModelObject(); > > > u.setPassword(DigestUtils.md5Hex(u.getPassword()); > userDAO.save(u); > > setRedirect(true); > > setResponsePage(HubApplication.get().getHomePage()); > } > > }; > form.add(new Label("email")); > PasswordTextField password = new PasswordTextField("password"); > form.add(password); > PasswordTextField repeatPassword = new > PasswordTextField("repeatPassword"); > repeatPassword.setModel(password.getModel()); > form.add(repeatPassword); > > form.add(new EqualPasswordInputValidator(password, > repeatPassword)); > form.add(new SubmitLink("submitLink")); > add(form); > > > This is just one example - we see elsewhere in the logs sometimes a > textfield that is setrequired(true) ends up nullpointering somewhere > when saving the object. > > What could do this? > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org