function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ehartyeehartye 

Adding Chatter bar to Visualforce pages

Adding the VF page as an inline object to a standard page layout is not a viable option for my implementation.

 

Does anyone know of an example of someone re-creating the Chatter bar in VF?

cloudcodercloudcoder

Check out the following blog post for a solution:

 

http://blog.sforce.com/sforce/2010/05/making-the-platform-do-the-work.html

 

HTH

 

Q

cloudcodercloudcoder

Sorry I just re-read your post. It looks like you may have already seen the blog post I referenced. Can you describe your use case a little more so I can understand why an inline Visualforce page is not a viable solution for you.

 

Q

ehartyeehartye

Thanks for the quick reply. Unfortunately, that describes how to add a VF page to a standard page layout. There is no support for variable heights, which creates multiple scroll bars :(

ehartyeehartye

My use case: I override several of my objects view/edit pages with VF pages, some of which can get very long.

 

The embed method is not viable because it doesn't support variable heights. Multiple vertical scrollbars on a page creates a pretty awful user experience.

SteveBowerSteveBower

I'm not sure this is getting to what you're after but...

 

If you imbed a VF page with variable height into a standard SF page then yes, your imbedding iframe has fixed height and when it renders it's either too small for the VF page (and you get scrollbars), or too large for the VF page and you have a lot of wasted space to scroll through.

 

One thing people have tried, which fails, is to have some Javascript reach up to the parenting page, access the Iframe, and adjust it's size.   In theory this would work if both Standard pages and VF pages were served from the same domain.  However they aren't to provide some security.

 

However... if you are *already* using a VF page at the "top", and you want to embed another VF page in it, then you should be able to do that javascript approach as they are both served from the force.com domain.

 

Does that help?  Or am I missing what you're trying to get to?   Best, Steve.

ehartyeehartye

You're correct about the domain issue preventing me from using your first suggestion. The second suggestion doesn't really help because embedding a VF page within another VF page won't get me the native Chatter functionality, which is what I'm after.

SteveBowerSteveBower

Ah... I think you have to "roll your own".  They have some recipies out there which should help.  -S

SteveBowerSteveBower

Easy... never write it yourself when someone else has written it for you.  Download the Chatter Combo Pack and look for the ChatterFeeds and ChatterMiniFeeds Components.  Just write up a VF page to call it and you're golden. (assuming one of them does what you want.... but it certainly gets you closer.

 

Best, Steve

 

p.s. and thanks to Jonathan Hersh at Salesforce who wrote it.

doubleminusdoubleminus

Looks like I will have to use homebrew as well. cloudcoder's solution does not work for me. (After completing steps, there is simply no Chatter bar...and feeds are enabled for the custom object.)

ehartyeehartye

The combo pack dances around what I need, but doesn't quite deliver. I wound up having to make my own.

stephanstephan

Just a heads up that we'll be releasing a number of Chatter components for Visualforce in the next release (Winter '11). Stay tuned!

 

kjpetersonkjpeterson

Will one of these components be the native chatter bar feature that appears at the top of objects?  We don't want to have to spend development time trying to achieve native Salesforce features that aren't provided native with visualforce.

ehartyeehartye

Thanks for the update Stephan :)

stephanstephan

Yes, it will include the native Chatter bar.

jhershjhersh

I'm curious what kind of component you needed. Is it something I can add to a future version of the combo pack?

ehartyeehartye

I need something that does exactly what the native interface chatter bar does.

 

 

  • The chatter feed component displays the feed, but doesn't allow posting to that feed or adding comments.
  • I could only get the Follow object to work for administrators in my organization. Permissions were not an issue for any other component. 
What I came up with looks like this:

 

 

The Follow/Unfollow button uses ajax to refresh the button text and list of follower pics. The "Show Feed" button launches a lightbox with the feed:

 

As you can see, you can post to the feed, as well as comment. I still need to add the ability to post URLs and Attachments. Then again, I may not since winter '11 will have what I need natively.

jhershjhersh

Hmm, are you running the latest Combo Pack? I ask because Chatter Feed definitely allows posting comments and deleting comments and posts.  And the follow button should work for everyone - make sure you grant access to the followobject class to any and all user profiles.

 

Chatter Feed is not intended to serve as a publisher, although I'd agree that a separate publisher component would be ideal. We'll see what's coming next release. :)

 

[Edit: your images didn't come through. Can you host them outside of your salesforce instance, or make sure they're enabled for external viewing?]

ehartyeehartye

No, looks like mine is still 2.18, and you're at 2.47. It was the newest available when I started. I'll have to give the new version a try when I get some time.