I'm stuck on somethin I feel should be pretty straightforward, but I can't quite figure out how to get around it. I can't share my exact code right now as it's inaccessible at the moment, but it is basically based off of what is given here: http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2010/01/28/how-to-create-a-web-part-with-a-contextual-tab.aspx.
So, I have a webpart. When I click on the heading for this webpart, my contextual tab and its contained buttons appear. Inside this tab I have a splitbutton whose menu is dynamically populated by results from a REST service. Each of these menu items is a FlyoutAnchor which in turn should have its menu items gotten dynamically from the same service. In order to do this, I need to be able to pass back the ID of the parent item(FlyoutAnchor) in order to get its accompanying children (items in the FlyoutAnchor's menu). I can't figure out a way to do that with my current setup based on the instructions at the link above, however, as there does not appear to be a way to pass back arguments to a PopulateQueryCommand. I was thinking I could even just tack on the ID name to the command name, however, due to the setup of the PageComponent, it does not seem like this is possible.
Does anybody have any idea of how I could possibly pass an argument to a SharePoint Ribbon Command (or achieve the same effect)? Any insight would be greatly appreciated, as I am relatively new to working with the SharePoint Ribbon.