Discussion:
when Checkbox is unchecked wc generate exception
(too old to reply)
Jaweed Ali jaweed
2006-11-30 21:31:14 UTC
Permalink
Hi everyone
I am running Websphere commerce 6 and i am calling controller commands by submiting form. in form i have some fields and checkbox when i do not check the checkbox the system generates exception as follows

User CMN3101E The system is unavailable due to "CMN0409E".
System The following error has occurred during processing: {0}.

even if i do not put values in the fields it works fine

Thanks
geo
2006-12-01 14:26:47 UTC
Permalink
This is not even beginning to be enough information to help you.
Post by Jaweed Ali jaweed
Hi everyone
I am running Websphere commerce 6 and i am calling controller commands by
submiting form. in form i have some fields and checkbox when i do not
check the checkbox the system generates exception as follows
User CMN3101E The system is unavailable due to "CMN0409E".
System The following error has occurred during processing: {0}.
even if i do not put values in the fields it works fine
Thanks
Jaweed Ali jaweed
2006-12-01 16:06:19 UTC
Permalink
Hi geo
Thanks for reply. Let me tell you the story so you will better know the problem. Actuall i have a form say abc.jsp in this i have two text fileds say field1 and field2 and one checkbox say checkbox1 this form is submited to a command say MyCommand in MyCommand i have access mtehods (getter setter) for all three form elements. so when i submit the form(abc.jsp) by entering values in field1,field2 and checked the checkbox1 this all works fine even if i enter value in field1 and field2 is empty and chebox1 is checked so it also works fine but when i donot check the checkbox wether field1 and field2 is empty or not its generates an error which is as follows(i am not validating any parameter in MyCommand )

User CMN3101E The system is unavailable due to "CMN0409E".
Post by Jaweed Ali jaweed
System The following error has occurred during processing: {0}.
Thanks
j***@gmail.com
2006-12-20 09:37:08 UTC
Permalink
Hi

please try this for getting the value of the checkbox in
controllercommand.
1.use one hiden variable
<input type="checkbox" name="holidayFlag1" value="Y" />
<input type="hidden" name = "holidayFlag1Val" />
2. in some javascript assign a value to the hidden variable according
to the checkebox value(if is checked than assign a value , else
assign other value)
if(document.all.holidayFlag1.checked){
document.forms[0].holidayFlag1Val.value = 'Y';
}
else
{
document.forms[0].holidayFlag1Val.value = 'N';
}
3.in controller command try to get the value of the hidden value
instead of the checkbox.
requestProperties.getString("holidayFlag1Val")

please try this...

hope this will work
jessi
Post by geo
This is not even beginning to be enough information to help you.
Post by Jaweed Ali jaweed
Hi everyone
I am running Websphere commerce 6 and i am calling controller commands by
submiting form. in form i have some fields and checkbox when i do not
check the checkbox the system generates exception as follows
User CMN3101E The system is unavailable due to "CMN0409E".
System The following error has occurred during processing: {0}.
even if i do not put values in the fields it works fine
Thanks
Loading...