Problem with contextual tabs

Jul 20, 2013 at 11:51 AM
 Hi! I am using your great library to create custom contextual tab in my project.
And I faced some troubles.

When the page is loaded, contextual group is not visible. becomes visible after clicking on web part. Is that normal? Is there a way to keep contextual group visible all the time?

And second trouble: Buttons in tabs have postback in command. And after command is done, contextual group become duplicated. And i have 4 tabs instead of 2 in my group.
Could you please suggest reason for that?
   public override ContextualGroupDefinition GetContextualGroupDefinition()
        {
            return new ContextualGroupDefinition()
            {
                Id = "TestContextualGroup",
                Title = "Contextual actions",
                Tabs = new TabDefinition[]
            {
                new TabDefinition()
                {
                    Id = "TestTab",
                    Title = "My tab",
                    Groups = new GroupDefinition[]
                    {
                        new GroupDefinition()
                        {
                            Id = "TestControlGroup",
                            Title = "Buttons group",
                            Template = GroupTemplateLibrary.SimpleTemplate,
                            Controls = new ControlDefinition[]
                            {
                                new ButtonDefinition()
                                {
                                    Id = "TestButton",
                                    Title = "Test alert",
                                    Image = new ImageDefinition() { Url32 = "/_layouts/images/erroricon.png" },
                                    CommandJavaScript = "__doPostBack('delete', '');"
                                }
                            }

                        }
                    }
                }
            }
            };

        }