Friday, May 25, 2012

Chatter Follow Multiple Items:

Chatter Follow Multiple Items:
This post related to chatter follow on multiple records at a time .The visualforce looks like this 






<apex:page standardcontroller="Position__c" recordsetvar="positions" >
  <apex:sectionHeader title="Chatter" subtitle="Follow Positions"/>
  <apex:form >
  <apex:pageBlock >    
      <apex:pageBlockButtons >
          <apex:commandButton value="Previous" action="{!previous}"/>
          <apex:commandButton value="Next" action="{!next}"/>
          <apex:commandButton value="Cancel" action="{!cancel}"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection columns="1">
          <apex:pageBlockTable value="{!positions}" var="p">
              <!-- TODO: Add a column with the header "Follow / Unfollow" that allows the user to follow the position -->
              <apex:column headerValue="Follow / Unfollow">
                  <chatter:follow entityId="{!p.id}"/>
              </apex:column>
              <apex:column headerValue="{!$ObjectType.Position__c.fields.name.label}">
                  <apex:outputLink value="/{!p.id}">
                      {!p.name}
                  </apex:outputLink>
              </apex:column>
              <apex:column value="{!p.Department__c}"/>
              <apex:column value="{!p.Hiring_Manager__c}"/>
              <apex:column value="{!p.Status__c}"/>
              <apex:column value="{!p.Sub_Status__c}"/>
          </apex:pageBlockTable>
      </apex:pageBlockSection>
  </apex:pageBlock>
  </apex:form>
</apex:page>

No comments:

Post a Comment