Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save victorabraham/a9c1b26c93f09454d0af to your computer and use it in GitHub Desktop.
Save victorabraham/a9c1b26c93f09454d0af to your computer and use it in GitHub Desktop.
Showing how to display dynamic content in visualforce page without using controller defined action methods
<apex:page standardcontroller="Account">
<apex:pageblock title="Account Details">
<apex:pageblocksection>
<apex:pageblocksectionitem>{!account.Name}</apex:pageblocksectionitem>
</apex:pageblocksection>
</apex:pageblock>
<apex:pageblock title="Contacts">
<apex:form>
<apex:datatable border="1" cellpadding="4" value="{!account.Contacts}" var="contact">
<apex:column>
<apex:outputpanel>
<apex:actionsupport event="onmouseover" rerender="detail">
<apex:param name="cid" value="{!contact.id}">
</apex:param></apex:actionsupport>
{! contact.Name}
</apex:outputpanel>
</apex:column>
</apex:datatable>
</apex:form>
</apex:pageblock>
<apex:outputpanel id="detail">
<apex:detail relatedlist="false" subject="{!$CurrentPage.parameters.cid}" title="false">
</apex:detail>
</apex:outputpanel>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment