+ Start a Discussion

Rerendering pageBlockTable does not bring new content to the table

 <apex:pageBlock title="Linked Equipments"> <apex:pageBlockTable value="{!Opportunity.Opportunity_Equipments__r}" var="item"> <apex:column value="{!item.Asset__r.Name}"/> <apex:column value="{!item.Asset__r.Description}"/> <apex:column value="{!item.Asset__r.UsageEndDate}"/> <apex:column value="{!item.Asset__r.SerialNumber}"/> <apex:column value="{!item.Asset__r.PurchaseDate}"/> </apex:pageBlockTable> </apex:pageBlock>


I have a page where user can relate Assets to Opportunity. After pressing "add" commandbutton I rerender the datatable that show currently related Assets. However the above markup does not seem to work and show new related Assets after rerender. I only got it working after writing my own getter method.


But is it possible to get it working using the std controller record collection ? (Opportunity.Opportunity_Equipments__r)



Thanks for help

Best Answer chosen by Admin (Salesforce Developers) 

To Rerender your table you would need to rerender the parent of the table.

So in this instance you have to give your pageblock an id and do a rerender="idOfYourPageBlock"