Thanks Lionel! I've updated the source in the repository. It seems like Stripes used to check for null values before calling TypeConverters so I didn't check before but I should have had the check in there anyway.
Aaron Lionel wrote: > Hello Aaron, > > I don't know if it is a stripes or a stripersist issue, but > EntityTypeConverter crashes when using encrypted Id in the action bean. > > > > MyActionBean: > @Validate(encrypted=true) > private Entity myEntity; > > @DefaultHandler > public Resolution init() { return "path/to/jsp";} > > > jsp: > <s:form actionbean="MyActionBean"> > <s:hidden name="myEntity"/> > <s:text name="entity.field"/> > <s:submit name="save"/> > </s:form> > > When I open the url MyActionBean.action and click on the save button with at > least one completed field, there is a null pointer in > NumberTypeConverterSupport.preProcess because input is null. > > Input is null because EntityTypeConverter.convert(value...) never checks if > value is null or not and tries to call the converter. > Only encrypted values are concerned. > > Adding : > > if(value==null) {return null;} > > at the beginning of EntityTypeConverter.convert solved the problem. > > > > ------------ > > By the way, I had another issue with EntityUtil.getId() which prevents me > from using 1.0 when using Id annotations on the fields: > > > > if accessor instanceof Field, you return : > > return ((Field) accessor).get(entity); > > but this doesn't work. > > I had to replace it with: > > return PropertyUtils.getProperty(entity, ((Field) accessor).getName()); > > > > Lionel > > > > > > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > > ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users