You need to sign in to do that
Don't have an account?
Arnold Joseph Todas
PageblockTable row clickable on AccountName and show related Contacts
How can i make PageblockTable row clickable. Once i click Account Name it will show all the related Contacts for account?
I very very appreciate if you could help me with my code :
Thanks!
AJ
I very very appreciate if you could help me with my code :
<apex:page sidebar="false" standardController="Account" recordSetVar="accounts" tabstyle="account"> <img src="{!$Resource.OnePiece}" /> <apex:pageBlock title="Pirate Account"> <apex:form > <apex:pageBlockTable value="{!accounts}" var="a" id="list"> <apex:column headerValue="Account Name"> <apex:outputLink value="{!a.name}">{!a.name}</apex:outputLink> </apex:column> <apex:column value="{!a.type}" /> <apex:column value="{!a.billingstreet}"/> <apex:column value="{!a.billingCity}" /> <apex:column value="{!a.billingCountry}" /> <apex:column value="{!a.billingPostalCode}"/> <apex:column value="{!a.createdById}"/> </apex:pageBlockTable> <center><apex:commandButton value="Show Contacts"/><apex:commandButton value="Hide Contacts"/></center> </apex:form> </apex:pageBlock> </apex:page>
Thanks!
AJ
You can acheive this with the help of wrapper class.
In that page contains the list of account are displayed once you click the checkbox and press button the selected contacts are displayed in the new pageblock.
Apex Controller : This controller to get the Account id from the page block table when user click it and it will display the list of contacts associated with that particular contact
Visualforce : Visualforce page to display all the acocunt record and its contact record. For the partical page refresh we used rerender concept in the visualforce page