function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AKallAKall 

Ajax and pageBlockTables

I have created a visual force page that contains two tables. One of the tables is a child of the other. To be more specific the parent table is a list of Contracts, and the child table is a list of approval steps associated with that contract. I would really like to make the child table render only when a particular field is mousedover in the parent table.I haven't figured it out yet. Does anybody see where I'm going wrong?

 

 

<apex:pageBlockTable value="{!Contracts}" var="Cons" columns="4"> <apex:facet name="header"></apex:facet> <apex:column > <apex:facet name="header">Contract Name</apex:facet> <apex:outputLink value="https://cs2.salesforce.com/apex/xTPLicensingContract?id={!Cons.ID}">{!Cons.Name} <apex:actionSupport event="onmouseover" reRender="thePage:lcLinx:subTable"/> </apex:outputLink> </apex:column> <apex:column > <apex:facet name="header">Product Summary</apex:facet> <apex:outputText value="{!Cons.ProductSummary__c}"/> </apex:column> <apex:column > <apex:facet name="header">Approval Status</apex:facet> <apex:outputText value="{!Cons.CurrentApprovalStatusFull__c}"/> </apex:column> <apex:column > <apex:facet name="header">Date of Last Step Taken</apex:facet> <apex:outPutText value="{0,date,MM-dd-yyyy}"> <apex:param value="{!Cons.DateofLastStep__c}"/> </apex:outPutText> </apex:column> <apex:column breakBefore="true" colspan="4" > <apex:outputPanel id="subTable"> <apex:dataTable value="{!Cons.ApprovalSteps__r}" var="s" width="100%" border="10px"> <apex:column > <apex:outputLink value="https://cs2.salesforce.com/{!s.ID}">{!s.Step__r.Name}</apex:outputLink> </apex:column> <apex:column > {!s.Status__c} </apex:column> <apex:column > <apex:outPutText value="{0,date,MM-dd-yyyy}"> <apex:param value="{!s.Date__c}"/> </apex:outPutText> </apex:column> <apex:column > {!s.Approver__r.Name} </apex:column> </apex:dataTable> </apex:outputPanel> </apex:column>

 

 

 

TehNrdTehNrd

Here is something similar that should get you going down the right path....

 

 

Page: <apex:page controller="showTable" > <apex:form > <apex:pageBlock > <apex:pageBlockTable value="{!opps}" var="o"> <apex:column > <apex:outputField value="{!o.Name}"/> <apex:commandButton value="Show Account" reRender="sub"> <apex:param name="oppId" assignTo="{!oppId}" value="{!o.Id}"/> </apex:commandButton> </apex:column> <apex:column > <apex:outputPanel id="sub"> <apex:outputField value="{!o.Account.Name}" rendered="{!IF(oppId = o.Id ,true,false)}"/> </apex:outputPanel> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page> Controller: public class showTable { public String oppId {get; set;} List<Opportunity> opps; public List<Opportunity> getOpps() { if(opps == null){ opps = [select Id, Name, Account.Name from Opportunity limit 10]; } return opps; } }