Community
Participate
Working Groups
As part of the re-work of actions API for 0.2, the nested actions were re-formulated as multiple action handlers attached to the same action. Unfortunately, the API of action-link UI part was not accordingly updated to allow a specific action handler to be specified. This usecase comes up frequently when presenting a heterogeneous list in the content outline. The common practice is to add action links like "Add a foo", "Add a bar", etc. where "IFoo" and "IBar" are element types possible for the list. In 0.1, these action links could be defined like so: <action-link> <action-id>node:add:IFoo</action-id> <label>Add a foo</label> </action-link> <action-link> <action-id>node:add:IBar</action-id> <label>Add a bar</label> </action-link> In 0.2, the id of the add action is "Sapphire.Add" instead of "node:add", but "Sapphire.Add.IFoo" is the id of an action handler, not an action. The current behavior of the action link part when multiple handlers are present is to invoke the first one. We need to add an optional action-handler-id element to action link definition, such that the above could be expressed as follows... <action-link> <action-id>Sapphire.Add</action-id> <action-handler-id>Sapphire.Add.IFoo</action-handler-id> <label>Add a foo</label> </action-link> <action-link> <action-id>Sapphire.Add</action-id> <action-handler-id>Sapphire.Add.IBar</action-handler-id> <label>Add a bar</label> </action-link>
Fixed. Added this scenario to the gallery sample.
Verified with gallery-sample heterogeneous list.