You need to sign in to do that
Don't have an account?
Amita Tatar
rerender salesforce not working
Hi all,
I have following code: Scenario is that i have two objects Account and Proposal Form with look up relationship..
I have some standard forms already stored in Proposal Form object which has service family and service category drop down.
On Account i want to rerender field from proposal form on matching of certain conditions,but it is not working. can you please help me out here.
Thanks,
Amita
I have following code: Scenario is that i have two objects Account and Proposal Form with look up relationship..
I have some standard forms already stored in Proposal Form object which has service family and service category drop down.
On Account i want to rerender field from proposal form on matching of certain conditions,but it is not working. can you please help me out here.
Class:: public with sharing class SurveyClass{ Public Account acc{get;set;} Public Proposal_Form__c pfc {get;set;} Public ID rid; private ApexPages.StandardController standardController; public SurveyClass(ApexPages.StandardController controller) { this.standardController = standardController; acc = (Account)controller.getRecord(); } public void Selected(){ //acc = [SELECT Id, Name, Proposal_Form__r.Name, Proposal_Form__r.Fields_Associated__c, Proposal_Form__r.Service_Family__c, Proposal_Form__r.Sub_Service_Category__c FROM Account ]; pfc = [SELECT Fields_Associated__c FROM Proposal_Form__c where Service_Family__c =: acc.Proposal_Form__r.Service_Family__c and Sub_Service_Category__c =: acc.Proposal_Form__r.Sub_Service_Category__c]; } } VF Page::: <apex:page standardController="Account" extensions="SurveyClass" sidebar="false" showHeader="false" tabStyle="Account"> <apex:form > <apex:pageBlock title="Client Survey Form"> <apex:pageBlockSection title="Service Requirements" > <apex:inputField value="{!acc.Proposal_Form__r.Service_Family__c}"/> <apex:inputfield value="{!acc.Proposal_Form__r.Sub_Service_Category__c}"/> </apex:pageBlockSection> <apex:outputPanel id="form"> <apex:pageblockSection title="Question Set" > <apex:inputField value="{!acc.Proposal_Form__r.Fields_Associated__c}"> <apex:actionSupport event="onchange" action="{!Selected}" oncomplete="alert('Hello');" rerender="form" rendered="true"/> </apex:inputField> </apex:pageblockSection> </apex:outputPanel> </apex:pageBlock> </apex:form> </apex:page>Please help me out here.
Thanks,
Amita
Can you use the selectoption instead of inputfields.
with the help of selectoptions you can capture the selected value and send to controller with the help of action Support.
If you want to rendered the page so create boolean variable in apex and use that on vf page for rendering.
Thanks
Shivdeep
Can you explain me through code?
Please try the below code, it's just a sample so update it with your requirement.
Thanks
Shivdeep