You need to sign in to do that
Don't have an account?
Dynamic Rerendering in VF page
Based on Organization chosen from dropdown Expense & Guideline should be displayed.
1)When I chose the organization the selected orgnanization is displayed and the corresponding expenses are displayed based on the organization chosen.
2) But the uncomment the following two lines:
<!-- <apex:selectList value="{!guideLineGroupId}" size="1" required="true"> <apex:selectOptions value="{!allGuidelineGroups}"/> </apex:selectList>-->
the selected orgnanization is not displayed as per the following line
<apex:dataList value="{!guideLineObj.Organization_Lookup__c}" var="c">{!c}</apex:dataList>
Please let me know the correct approach to solve this.
Regards,
KK
Code:
<apex:page standardController="Guideline__c" extensions="GuideLineActionController" tabStyle="Account" standardStylesheets="true" sidebar="false">
<apex:form >
<apex:pageBlock title="Add Organization" id="thePageBlock" mode="edit" >
<apex:actionRegion ><apex:pageBlockSection columns="1" showHeader="true">
<apex:pageBlockSectionItem id="itemSection1">
<apex:panelGrid columns="2" width="50%" styleClass="centered">
<apex:outputLabel value="Organization" style="font-weight:bold;" />
<apex:selectList value="{!guideLineObj.Organization_Lookup__c}" size="1">
<apex:actionSupport event="onchange" action="{!onChangeOrgName}" rerender="out" status="status" />
<apex:selectOptions value="{!organizations}"/>
</apex:selectList>
</apex:panelGrid>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="itemSection2" >
<apex:actionRegion immediate="true">
<apex:outputPanel id="out">
<apex:actionstatus id="status" startText="refreshing...">
<apex:facet name="stop">
<apex:outputPanel layout="block" styleClass="lineSmall">
<apex:dataList value="{!guideLineObj.Organization_Lookup__c}" var="c">{!c}</apex:dataList>
<apex:panelGrid columns="2" styleClass="centered" width="37%">
<apex:outputLabel value="Expense Type" style="font-weight:bold;" />
<apex:selectList value="{!expenseTypes}" size="1" required="true">
<apex:selectOptions value="{!allExpenseTypes}"/>
</apex:selectList>
</apex:panelGrid>
<apex:panelGrid columns="2" styleClass="centered" width="27%" columnClasses="left,right">
<apex:outputLabel value="GuideLine Group" style="font-weight:bold;" />
<!--
<apex:selectList value="{!guideLineGroupId}" size="1" required="true">
<apex:selectOptions value="{!allGuidelineGroups}"/>
</apex:selectList>
-->
</apex:panelGrid>
</apex:outputPanel>
</apex:facet>
</apex:actionstatus>
</apex:outputPanel>
</apex:actionRegion>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:actionRegion>
</apex:pageBlock>
</apex:form>