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 > > ------------------------------------------------------------------------------ > Are you an open source citizen? Join us for the Open Source Bridge > conference! > Portland, OR, June 17-19. Two days of sessions, one day of unconference: > $250. > Need another reason to go? 24-hour hacker lounge. Register today! > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > > -- View this message in context: http://old.nabble.com/Stripes-tag---disabled%3D%22true%22-will-bind-a-null-value--tp24160598p26714556.html Sent from the stripes-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ 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
