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

Immediate="true" on commandbutton Avoiding validation error but not capturing user input
Hello,
Below is the code for vf page:
<apex:repeat id="repeat" value="{!InnerList}" var="in"> <apex:selectList value="{!in.selectedValue1}" id="value1" required="true" multiselect="false" style="width:200px;" size="1"> <apex:selectOptions id="options" value="{!Header}"/> </apex:selectList> <apex:selectList value="{!in.selectedValue2}" id="value2" multiselect="false" required="true" style="width:200px;" size="1"> <apex:selectOptions id="options1" value="{!FieldList}"/> </apex:selectList> </apex:repeat> <apex:actionRegion > <apex:commandButton id="Next" value="SavetoObject" action="{!saveToObject}" immediate="true" /> </apex:actionRegion>
Here if i don use immediate=true,i get validation error like:
j_id0:j_id2:j_id33:repeat:0:value1: Validation Error: Value is not valid
and when i use immediate=true validation error disappears but it doesnot capture my user input.
I found a solution some where that using action region i can make it capture my user input.
Can any one explain me.
Above is the link for action region solution.
http://salesforce.stackexchange.com/questions/8574/problem-in-commandbutton-with-immediate-true
http://www.tgerm.com/2010/09/visualforce-actionregion-deep-dive.html
but i don know how to use it in my context.
Can some one please help.
Thanks.