2 Replies Latest reply on Feb 25, 2010 11:23 PM by Tschaedi

    Flyout Button - action executed twice

    Tschaedi

      Hello there

       

      In my plugin I add a button with a flyout to my custom toolbar. The structure of my flyout button is as follows:

       

      The button that contains the flyout with the label <Please select a Category>. In the flyout I have Category1, Category2, Category3.

       

      Now I click on the litte arrow on the right of <Please select a Category> and the flyout menu appears. Then I select Category2. The command behind Category2 is then executed twice, let's say a dialog is shown, so this dialog appears twice. After these executions the label <Please select a Category> is replaced with Category2. And now it is possible to click on that button an the Category2_command is executed (only once).

       

      So, my guess is that the Category2_command is executed twice because it is also moved to the top to replace <Please select a Category>. Now my question is how to suppress one of the executions when a new category is selected. Is this a postback that can be catched somehow? Or is there any other way to distinguish the two calls? I mean by this to distinguish the action from moving the button up top (to replace <Please select a Category>) and actually pressing the button.

       

      I hope this was more or less clear...

       

      Thanks for your help.