Newer Version Available

This content describes an older version of this product. View Latest

Step 3: Display the Component in a Visualforce Page

The third step is to create a Visualforce page called DoubleGroupFeed that contains two instances of the GroupFeed custom component we created in step 2.
  1. In the Developer Console, click File | New | Visualforce Page.
  2. Enter the name DoubleGroupFeed and click OK.
  3. Copy this code and paste it into the DoubleGroupFeed page, replacing the existing code:
    1swfobject.registerObject("clippy.codeblock-0", "9");<apex:page sidebar="false" >
    2     <!-- Display two GroupFeed components side by side. -->
    3     <div id="column1-wrap" style="float:left; width:50%; background-color:AliceBlue">
    4          <div id="column1"><c:GroupFeed /></div>
    5     </div>
    6     <div id="column2" style="float:right; width:50%; background-color:LightGray"><c:GroupFeed /></div>
    7</apex:page>

    The <div> HTML elements create two vertical columns on the page.

  4. Click File | Save.