You need to sign in to do that
Don't have an account?
Amit Visapurkar 5
Render outpanel on command click
<apex:commandButton value="SDS Account" action="{!fetchSDSAccountDetails}" styleClass="btn btn-primary btn-sm" reRender="pbstracc,pbssdsacc" status="sdsAccButton"/>
<apex:outputPanel id="pbssdsacc">
<apex:pageBlockSection rendered="{!sdsAccount}" columns="2" >
<apex:outputText label="Customer" value="{!customerDetails.Name}"/>
<apex:outputText label="Customer Code" value="{!customerDetails.KUNNR__c}"/>
<apex:outputText label="Address" value="{!customerDetails.Street_1__c} {!customerDetails.Street_1__c} {!customerDetails.Street_2__c} {!customerDetails.Town__c} {!customerDetails.State__c} {!customerDetails.District__c} {!customerDetails.PIN_code__c}"/><br/>
<apex:input type="date" label="From Date " value="{!accountFromDate}" style="width:120px;font-size:12px" />
<apex:input type="date" label="To Date " value="{!accountToDate}" style="width:120px;font-size:12px" />
<apex:commandButton value="Generate Report" action="{!generateSDSAccountDetails}" styleClass="btn btn-primary btn-sm" reRender="pbssdsacc"/>
</apex:pageBlockSection>
<apex:outputPanel>
<apex:pageBlockSection rendered="{!sdsAccountGenerateReport}">
Customer Name
</apex:pageBlockSection>
</apex:outputPanel>
</apex:outputPanel>
Onclick of SDS Account button i want to rerender pbssdsacc which is working fine. But on click of Generate Report i want to show the pageblock section which is not displayed on click of SDS Account button but displayed on click of Generate Report button
<apex:outputPanel id="pbssdsacc">
<apex:pageBlockSection rendered="{!sdsAccount}" columns="2" >
<apex:outputText label="Customer" value="{!customerDetails.Name}"/>
<apex:outputText label="Customer Code" value="{!customerDetails.KUNNR__c}"/>
<apex:outputText label="Address" value="{!customerDetails.Street_1__c} {!customerDetails.Street_1__c} {!customerDetails.Street_2__c} {!customerDetails.Town__c} {!customerDetails.State__c} {!customerDetails.District__c} {!customerDetails.PIN_code__c}"/><br/>
<apex:input type="date" label="From Date " value="{!accountFromDate}" style="width:120px;font-size:12px" />
<apex:input type="date" label="To Date " value="{!accountToDate}" style="width:120px;font-size:12px" />
<apex:commandButton value="Generate Report" action="{!generateSDSAccountDetails}" styleClass="btn btn-primary btn-sm" reRender="pbssdsacc"/>
</apex:pageBlockSection>
<apex:outputPanel>
<apex:pageBlockSection rendered="{!sdsAccountGenerateReport}">
Customer Name
</apex:pageBlockSection>
</apex:outputPanel>
</apex:outputPanel>
Onclick of SDS Account button i want to rerender pbssdsacc which is working fine. But on click of Generate Report i want to show the pageblock section which is not displayed on click of SDS Account button but displayed on click of Generate Report button
Hi Amit,
It can only be used to update the content in <apex:outputPanel>
You cannot use the reRender attribute to update content in a table or Pageblocksection
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_ajax_partial_page_updates.htm
Let us know if it helps,
Thanks,
Balayesu
Can you please suggest any changes for this to work. Its very urgent.
Thanks