Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've defined custom tab with buttons in elements.xml which shows only on document libraries (RegistrationType="List", RegistrationId="101"). When I use CommandUIHandler for javascript, custom tab shows on ribbon and test commands execute fine. But when I try to move away from CommandUIHandles to Page Component, custom tab does not apear at all. I always test inPrivate, so cache is clean and there are no errors or warnings in javascript console. Using visual studio debugger I'd convinced that component script loads and initializes well. How can I determine what causes this issue?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I've found the answer. In case of using custom tab, it should be programmatically set to available in server-side code, using delegate control or web part. Here is an example: http://makarandrkulkarni.blogspot.com/2010/01/sharepoint-2010-ribbon-customization_09.html

Another thing worth mentioning. If you add Command attribute to your tab, group or something else in Elements.xml, you should handle this command in your page component to get it enabled.

share|improve this answer
    
Would you please mark your solution as answer? It is easier to find out, what's right and what's not. Thanks. –  Shegit Brahm Jul 8 '12 at 13:37

I have seen a few times when working with the ribbon that even private mode still didn't work. I had to hit F12 and run the dev tools and say clear cache for this domain.

share|improve this answer
    
I've tried to clean cache manually too, with no result :(. May be page component ignores RegistrationType and RegistrationId attributes, and in this case ribbon behavior should be programmatically defined in page code behind? –  megadrofan Apr 30 '12 at 18:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.