rohant paralikar

Greenhorn
+ Follow
since Jun 18, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by rohant paralikar

I could send the value as 1 when the checkbox is selected by using the fieldValue attribute as fieldValue="1" but one problem still remains that is, when the checkbox is not checked then the value that gets set in bean/action class is null.Can I set it to 0, if not checked, just like fieldValue="1", when it is checked?
If anyone have an idea, please respond to the query

Thanks
-Rohant
[ June 21, 2008: Message edited by: rohant paralikar ]
15 years ago
it worked
thanks!
15 years ago
I am using struts2 and jsp as development envionment.
I have a select tag on my jsp wherein i need to ,
1. Make a default selection depending on my bean/action class's property value.
if the property is 1 then i need to select Yes and if its 0 then i need to display No to the user.
2. Also when the form is submitted i need to pass the value in revese way to the bean i.e if selected is Yes pass 1 else 0.
i am able to do the 2nd one but not the first, i.e getting the default selection and displaying it.
does anybody know how to do it?

Thanks & Regards,
-Rohant
15 years ago
Hi All,
i am using struts2 and jsp for UI.
I have 3 checkboxes on one of my page,and want to set the bean varible coresponding to these checkboxes on page submit
what i am doin is

<s:checkbox name="abcVO.field1" fieldValue="abcVO.field1" theme="simple" value="abcVO.field1" />

where abcVO is a action classes'(bean's )member which is an value object (a object class )
containing different fields like field1 ,field2.... this field is a character field and values it can take are '1' and '0'
now the problem is i want to set value to 1 if the checkbox is checked else to 0
but it its not getting set in my bean class
,null is what i am getting
my question is what value is set (true/1/or something else) on checking of checkbox element
how to achieve what i am supposed to?

Thanks In advance
-Rohant
15 years ago