[ http://issues.apache.org/jira/browse/TAPESTRY-743?page=comments#action_12368434 ]
Rory Farrell commented on TAPESTRY-743: --------------------------------------- This problem occurs because the Tapestry 4 PropertySelection does not check if the value is null before trying to call the model's translateValue method. In Tapestry 3.0.3 the code looked like this: Object value = (optionValue == null) ? null : getModel().translateValue(optionValue); In Tapestry 4.0 the code looks like: Object object = getModel().translateValue(value); Since the code in the StringPropertySelectionModel does not check to make sure that value is not null before doing the Integer.parseInt you get a NumberFormatException. > PropertySelection NumberFormatException when its model parameter using new > StringPropertySelectionModel(new String[0]) > ---------------------------------------------------------------------------------------------------------------------- > > Key: TAPESTRY-743 > URL: http://issues.apache.org/jira/browse/TAPESTRY-743 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Environment: tapestry-4.0-beta-12 > Reporter: belden > Priority: Critical > > java.lang.NumberFormatException > null > Stack Trace: > java.lang.Integer.parseInt(Integer.java:415) > java.lang.Integer.parseInt(Integer.java:497) > org.apache.tapestry.form.StringPropertySelectionModel.translateValue(StringPropertySelectionModel.java:78) > > org.apache.tapestry.form.PropertySelection.rewindFormComponent(PropertySelection.java:118) > > org.apache.tapestry.form.AbstractFormComponent.renderComponent(AbstractFormComponent.java:115) > > org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) > org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434) > org.apache.tapestry.form.FormSupportImpl.rewind(FormSupportImpl.java:542) > org.apache.tapestry.form.Form.renderComponent(Form.java:226) > org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) > org.apache.tapestry.form.Form.rewind(Form.java:327) > org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:442) > org.apache.tapestry.form.Form.trigger(Form.java:338) > org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:144) > > org.apache.tapestry.engine.DirectService.service(DirectService.java:130) > $IEngineService_10773ed8703.service($IEngineService_10773ed8703.java) > org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65) > > org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248) > org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60) > > $WebRequestServicer_10773ed86e0.service($WebRequestServicer_10773ed86e0.java) > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
