dcsimg
Can two radio tags be used to set boolean values for a form property in struts?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Lan_Abi
Posted On:   Thursday, October 6, 2011 09:20 PM

I'm new-ish to struts and I'm particularly stuck on an area of struts code which has to do with the radio button. No matter what I do I can't get anything but a false value from the following: (CostForm) No Yes It is then initialised from this piece of code: CostForm costform = (CostForm) form; Cost cost = new Cost(); costform.populateModel(cost); and the populateModel just has: PropertyUtils.copyProperties(cost,this); The only thing I can think of is that struts doesn't allow the radio buttons to reference the same property with different values.    More>>

I'm new-ish to struts and I'm particularly stuck on an area of struts code which has to do with the radio button. No matter what I do I can't get anything but a false value from the following: (CostForm)


No
Yes


It is then initialised from this piece of code:


CostForm costform = (CostForm) form;
Cost cost = new Cost();
costform.populateModel(cost);



and the populateModel just has: PropertyUtils.copyProperties(cost,this);

The only thing I can think of is that struts doesn't allow the radio buttons to reference the same property with different values.    <<Less
About | Sitemap | Contact