In my solution, I have a toolbar that actions upon a grid data.
I want to have a list within the toolbar, that will have it’s base text as “More actions…”, when the list is selected, it will have a different set of options, based on the row highlited in the grid.
How do I go about capturing an event on the base button “More actions…”, so that when it is clicked a new Array is applied ?
I tried to use onStateChange, but it’s too late and the Array is already constructed by than.
Click the down arrow in toolbar list, expect to see the B option. (not there.)
Click on the “New” label.
Click the down arrow in toolbar list, expect to see the B option. ( now it is there).
Now, I know there are ways to solve this particular example in other ways (for instance, update the toolbar item when the radio button is changed), but this is not a real scenario and is only used to demonstrate the need to have a dynamic list in the toolbar that is created when the toolbar is clicked (and before open).
Just to emphasize, in the real case, the creation of the toolbar list requires a trip to a server based on complex setup, so obviously I don’t want to do this unless there is an explicitclcik on the toolbar. Copy of 02_init_from_script.zip (869 Bytes)