You need to sign in to do that
Don't have an account?
How to Refersh Repeater on the basis of value(Parent) selected in the picklist.
Scenario:
I have two objects viz:'Application' and 'Application Efforts'.'Application' is parent and 'Application Efforts' is child.Both have the lookup relationship.I want to show 'Application Efforts' records in a table on the basis of 'Application' selected in picklist.
I am using the following code and its not working.
VF Page:
=============================
<apex:page standardController="Quote__c" extensions="mycheck">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection title="Application Efforts:">
<apex:selectList value="{!selectedApplication3}" label="Select Application:" size="1" onchange="chngtxt()">
<apex:selectOptions value="{!ApplicationOptions2}">
</apex:selectOptions>
</apex:selectList>
<apex:actionFunction name="chngtxt" action="{!change6}" reRender="intxt5" id="chngtxt"/>
<apex:repeat value="{!lstAppEffort}" var="al" id="intxt5">
{!al.Application_ID__r.Name__c}
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller:
=============================
public with sharing class mycheck {
public string selectedApplication3 {get;set;}
public List<SelectOption> ApplicationOptions2 { get;set;}
public List<Application__c> LstApplication{get;set;}
public List<Application_Efforts__c> lstAppEffort{get;set;}
public mycheck(ApexPages.StandardController controller) {
ApplicationOptions2 = new List<SelectOption>();
LstApplication=[select Name__c from Application__c];
ApplicationOptions2.add(new SelectOption('Please Select','Please Select'));
for(Application__c appobj:LstApplication){
ApplicationOptions2.add(new SelectOption(appobj.Name__c,appobj.Name__c));
}
}
public void change6(){
lstAppEffort = [select id,Application_ID__r.Name__c,Effort_Level_ID__c,Effort_Duration_ID__c,Effort_Hours__c from Application_Efforts__c where
Application_ID__r.id = :selectedApplication3];
}
}
A quick help in this regard is highly appretiated.
The way i would done it is