struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Graf-Waczenski <>
Subject Re: Binding multiple values to a single immutable object
Date Tue, 03 Nov 2009 11:23:10 GMT
Gareth Davis schrieb:
> The more I look at the Ognl stuff and the ParametersIntercepter the
> more I've convincing my self that this is just not possible with the
> framework, can anybody confirm this?

Others may have a deeper knowledge of the framework, but i would 
approach your issue differently. Since setters for your html form fields 
are called independently of each other and in an unpredictable order, 
you should code your action to have separate members for each of the 
getters/setters and have your Date instance created properly in your 
action method. Or you implement a weaker form of immutability that 
allows an object to shortly exist in an non-immutable state (so you can 
new it with empty members and have it being accessed directly from your 
setters) and then "petrify" the object in your action method. We in our 
project have invented such a pattern ten years ago and are using it ever 
since without looking back :-)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message