You need to sign in to do that
Don't have an account?

Display List of chatter Topics associated with a particular member's Group
Hi all,
I have a requirement where I need to develop a visualforce page in which I should display list of chatter Topics associated with a particular member's Group. I mean the group member is a User and that user's topics need to be displayed in the page when he is logged in as current user.
Below is my VF page and class:
VF page:
Class Code:
It is displaying all the chatter topics. But I need to display current user's (Group member's) Topic in page.
Any help is appreciable. Thanks in advance
I have a requirement where I need to develop a visualforce page in which I should display list of chatter Topics associated with a particular member's Group. I mean the group member is a User and that user's topics need to be displayed in the page when he is logged in as current user.
Below is my VF page and class:
VF page:
<apex:page controller="TopicController" sidebar="false"> <script> (function(){try{var a=navigator.userAgent;if((a.indexOf('Salesforce')!=-1)&&(a.indexOf('iPhone')!=-1||a.indexOf('iPad')!=-1)&&(a.indexOf('OS/8')!=-1||a.indexOf('OS 8')!=-1||a.indexOf('OS/9')!=-1||a.indexOf('OS 9')!=-1)&&(a.indexOf('Safari')==-1)){ var s=document.createElement('style'); if(a.indexOf('OS/8')!=-1||a.indexOf('OS 8')!=-1) { s.innerHTML="html,html body{overflow: auto;-webkit-overflow-scrolling:touch;}body{position:absolute;left:0;right:0;top:0;bottom:0;}"; } else if(a.indexOf('OS/9')!=-1||a.indexOf('OS 9')!=-1) { s.innerHTML="html,html body{overflow: auto;-webkit-overflow-scrolling:auto;}body{position:absolute;left:0;right:0;top:0;bottom:0;}"; } document.getElementsByTagName('head')[0].appendChild(s);}}catch(e){}})(); </script> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <apex:stylesheet value="{!URLFOR($Resource.OneStarter,'icons.css')}"/> <!-- <apex:stylesheet value="{!URLFOR($Resource.OneStarter,'styles.css')}"/> --> <apex:stylesheet value="{!URLFOR($Resource.OneStarter,'OneStarter.css')}"/> <!-- JavaScript files --> <apex:includeScript value="{!URLFOR($Resource.jquery)}"/> <apex:includeScript value="{!URLFOR($Resource.TouchSwipe,'jquery.touchSwipe.min.js')}"/> <apex:includeScript value="{!URLFOR($Resource.OneStarter,'jquery.onestarter.js')}"/> <apex:includeScript value="/canvas/sdk/js/publisher.js"/> <style> #row1data,.colHeadr { text-align:left; padding:5px; } #bullet{padding:5px;} #row2data{margin-left:5px;} #pageblock{width:100%;} } @media screen and (min-width : 480px){ .apexp{ margin-left: -9%; margin-right: -7%; } } </style> <script> function redirect(id){ var id=document.getElementById(id) ; if( (typeof sforce != 'undefined') && sforce && (!!sforce.one) ) { sforce.one.navigateToSObject(id.value); } else { window.location.href = '/'+id.value; } } </script> <apex:pageBlock id="pb1" mode="maindetail" title="Topics"> <div id="div1" style="width=100; background-color:white; "> <apex:pageBlockTable value="{!Topics}" var="t" id="pbt1" align="top" style="border:none; border-style:none;"> <apex:column style="vertical-align:top;width:0.5em;"> <div> <apex:image value="{!$Resource.greydot}" height="1" width="1"/> </div> </apex:column> <apex:column headerValue="" style="vertical-align:top;" headerClass="colHeadr"> <input type="hidden" id="{!t.Name}" value="{!t.Id}"></input> <div id="row1data" onclick="redirect('{!t.Name}');" style="color:#16325C;font-weight: bold;">{!t.Name}</div> <div id="row2data" style="color:#16325C;"></div> </apex:column> </apex:pageBlockTable> </div> </apex:pageBlock> </apex:page>
Class Code:
public class TopicController{ public List<Topic> getTopics() { return [SELECT Name, Id FROM Topic]; } }
It is displaying all the chatter topics. But I need to display current user's (Group member's) Topic in page.
Any help is appreciable. Thanks in advance
Apex-Class:
VF-Page:
Hope it helps. Thanks.
Thank you so much for your reply and I tried the code . It is working. I have another doubt. WIill it display all group names related to a topic. I mean if a topic named as: Test topic is there and it has 2 groups associated to it. Can It display those 2 gropus in the chatter topic.