You need to sign in to do that
Don't have an account?

Pass Values from VisualForce Page to Custom Controller
Hi,
I need an urgent help.
I have a input field on my visualforce page which is wrapped in an action function. The field is a checkbox. Once the user clicks on the checkbox i have method in my controller. The issue that i am facing is, the checkbox value is always false in my controller.
Can anyone please help me out and let me know why this is happening.
Thanks in advance!
Hi Avaleena,
Was this working fine before or it is recently coded?
In the controller, did you mention the by default option of the checkbox?
And can you post your code so that the community members can identify if there is any issue.
Regards,
Ashish
Hey Ashish,
It was working fine before.
Hi Aveleena,
You can give attribute ‘rendered’ in <apex:inputCheckbox rendered = “{! IF(showcheck == 1,true,false)}”> AND give the value 1 & 0 in controller wherever you want to check and uncheck the checkbox.
http://boards.developerforce.com/t5/Visualforce-Development/Setting-default-value-on-Checkbox/td-p/192707
Also see the link below for more info,
http://stackoverflow.com/questions/15041259/maintaining-checkbox-status-in-apex-controller
Regards,
Ashish
I am still not able to figure out what the problem is, if i move the checkbox field to a different pageblock it is able to pass the correct value to the controller.
Does it look like some reRender issue that i might be missing, this code was working fine few weeks back.
Hi,
Remove Action region tag
<apex:pageblock id = "abc">\
----------------
<apex:actionsupport ........................ rendeded= "abc">
-------------------
<apex:pageblock>
I had same proble,It was working some browser but not in anther.
I have tried that already, does'nt work
Hi Aveleena,
Try the rerender code in the below post if that works,
http://boards.developerforce.com/t5/Visualforce-Development/Passing-Parameters-from-Visualforce-Page-to-Controller-methods/td-p/103958
Regards,
Ashish
the link is not working.