You need to sign in to do that
Don't have an account?
Mitesh Sura
apex:actionSupport does not work with immediate=true
Here is the thing, I have few required fields and country and state picklist. I would like country and state to function irrepctecive of values in required fields.
I see some posts which says to remove requires=true for the fields and move the validation in the controller. I really do not want to do that. Below is the snippet, what esle can be done?
<apex:selectList value="{!country}" size="1"> <apex:selectOptions value="{!Countries}" /> <apex:actionSupport event="onchange" rerender="states" immediate="true" /> </apex:selectList> <apex:outputPanel id="states" > <apex:selectList value="{!state}" size="1"> <apex:selectOptions value="{!States}" /> </apex:selectList> </apex:outputPanel>
Above code will work if have required=false and all required fields have a value.
Thank you for your time.
Hi ,
If you put immediate= true than you will never get any value in controller. Means When ever we use immediate =true than setter method of property and validation are not fired so our data(which are in form and form which is submited) will not post at server.
So we can use apex:actionregion for that section which should be submit and no other data will execute their validaion.
Thanks
Ashlekh
If this post help you than please mark it as a solution and give me kudo's
All Answers
Hi ,
If you put immediate= true than you will never get any value in controller. Means When ever we use immediate =true than setter method of property and validation are not fired so our data(which are in form and form which is submited) will not post at server.
So we can use apex:actionregion for that section which should be submit and no other data will execute their validaion.
Thanks
Ashlekh
If this post help you than please mark it as a solution and give me kudo's
Well the solution should be easy!
Use a actionregion along with action support, this will avoid submitting the full page and hence you will not get any error from rest part of the page
http://dattarajsfdc.wordpress.com/