You need to sign in to do that
Don't have an account?
cnp_naresh
How to do rerender with dynamic vissualforce bindings
HI Friends,
<apex:repeat value="{!displayFields}" var="f"> <apex:inputfield value="{!acct[f]}" rendered="cond"/> <apex:selectlist value="{!acct[f]}" rendered="cond" onchange="showstates('this.value')"> <apex:selectOptions value="{!showcountries}"> </apex:selectlist> <apex:outputpanel id="staterefresh"> <apex:selectlist value="{!acct[f]}" rendered="cond"> <apex:selectOptions value="{!showStates}"> </apex:selectlist> <apex:outputpanel> </apex:repeat>
According to the country selected, I need to refresh the State values... But this is not at all happening in visualforce page. I am able to refresh the values according to the country selected but when I submit the form to save the record, I am getting error 'Mailing State/Province: Validation Error: Value is not valid'.
Please help me.
Thanks,
Naresh B
Hi,
In your code, you have not used rerender attribute anywhere.
You are using rendered attibute.
There is a difference between these two attributes.
Thanks,
Devendra
Check this out
http://www.salesforce.com/us/developer/docs/pages/Content/pages_best_practices_accessing_id.htm
Thanks
Utsav
[Do mark this answer as solution if it works for you and give a kudos.]
HI Devendra,
Thanks for your quick reply.
I am usring rerender atrribute throgh actionfunction tag.
According to the country selected, I need to refresh the State values... But this is not at all happening in visualforce page. I am able to refresh the values according to the country selected but when I submit the form to save the record, I am getting error 'Mailing State/Province: Validation Error: Value is not valid'.
Thanks