function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vijay NagarathinamVijay Nagarathinam 

Issue in ActionSupport


I am using session year and session values in the visualforce page. Based on the year the session values will change dynamically using a custom setting, In some cases, if the year is not matched with custom setting then I need to show standard dependency values for the year.

While changing the year I am getting required error. I tried to use action region tag, still, I am getting an error.

User-added image

<apex:actionRegion immediate="true">
                            <apex:pageBlockSection columns="1">   
                                <apex:inputField value="{!appInstance.Session_Year__c}" required="true">
                                    <apex:actionSupport event="onchange" action="{!sessionValues}" rerender="sessionId,stdSessionId" status="refreshStatus87">
                                        <apex:actionStatus id="refreshStatus87">
                                            <apex:facet name="start" >
                                                <apex:image style="padding-left:20px" url="/img/support/servicedesk/barloading.gif" />                       
                                            <apex:facet name="stop" >
                        <!-- Application Session Information -->
                            <apex:pageblocksection id="sessionId" columns="1" >
                                <apex:selectList value="{!appInstance.Session__c}" multiselect="false" size="1" label="Session/Semester Start" rendered="{!sessionValuesList.size > 0}" required="true" >
                                    <div class="requiredInput">
                                        <div class="requiredBlock">                                   
                                            <apex:selectOptions value="{!sessionValuesList}" />                           
                                <apex:inputField value="{!appInstance.Session__c}" rendered="{!sessionValuesList.size == 0}" required="{!sessionValuesList.size == 0}" />

Please let me know how to resolve the issue.