Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332695

Summary: Sapphire action-link lacks ability to use a specific action handler
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: ling.hao
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2010-12-15 17:49:55 EST
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>
Comment 1 Konstantin Komissarchik CLA 2010-12-15 19:41:17 EST
Fixed. Added this scenario to the gallery sample.
Comment 2 Ling Hao CLA 2011-01-05 17:50:37 EST
Verified with gallery-sample heterogeneous list.