I know this doesn't exactly solve the problem, but it might help in some cases. You can use @Validate(ignore=true) to prevent binding into a property.
-Ben On Wed, Dec 9, 2009 at 12:52 PM, Simon Keen <[email protected]> wrote: > > This behaviour is a real problem. I have been struggling with it for some > time. It doesn't help that I couldnt' find any mention of this behviour in > the taglib docs or the stripes book. > > Having read the ticket associated with this I am not sure why Stripes has to > bind anything when a value is ommitted from a posted form. To my small > brain it would seem better to ignore values that were on the previous page > disbaled and are not in the next request. This way no value would be bound > fopr disabled fields. Thus if any data is loaded it would be left alone > instead of being trampled on. > > For simple fields it is possible to define a read only property on the bean > that is used when it is disabled and a writable property name when it is > not. This is a pain but doable. It gets a lot harder when the property is > on a model class and you are in a foreach loop around a list of them. It is > not nice to have to corrupt the model classes for the sake of the > presentation. > > I have alreayd had to spilt forms up but have now run out of ideas for one > form I am working on. > Seems cheeky to be using opensource software and ask for a fix but it would > be most appreciated. > > Simon > > > > YEE CHUT NGEOW wrote: >> >> Hi, >> >> I have a <stripes:select disabled="true"> tag. >> I just discovered that the disabled="true" is setting null to my >> actionBean >> object. >> >> Is that the intended behavior? Is there a way to disable it? >> >> Many thanks >> Yee ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
