cancel
Showing results for 
Search instead for 
Did you mean: 

BusinessGraphics Category Element

Former Member
0 Kudos

I have the following node for storing data for a simple pie chart:


PieData
     |
     --- Id (string)
     |
     --- Label (string)
     |
     --- Value (double)

I have created a BusinessGraphics element (id = PIE) with one Category and one SimpleSeries:

Category:

descrition: PieData.Label

eventID: PieData.Id

id: Category1

tooltip: PieData.Value

SimpleSeries:

id: SimpleSeries1

value: PieData.Value;

I have mapped the id parameter to the action in wdDoModify:


if (firstTime) {
	IWDBusinessGraphics pieChart = (IWDBusinessGraphics) view.getElement("PIE");
	pieChart.mappingOfOnAction().addSourceMapping(IWDBusinessGraphics.IWDOnAction.ID, "id");
}

In the action I have the following:


  public void onActionSliceSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, 
     java.lang.String id )
  {
    //@@begin onActionSliceSelected(ServerEvent)
    wdComponentAPI.getMessageManager().reportSuccess(id);
    //@@end
  }

Oddly enough even though I've bound the eventID to the PieData.Id attribute, the value returned in id parameter is always the PieData.Label attribute (which is bound to description, NOT eventID).

Any ideas what's going on here?

Accepted Solutions (1)

Accepted Solutions (1)

former_member185086
Active Contributor
0 Kudos

Hi

Definition clarify that

onAction (String id)

This event is triggered when the user selects a certain area of the business graphic. The parameter is the id of the selected UI element.

and this area could be anything.

Do one exercise

1.Comment this line of code

if (firstTime) {
	IWDBusinessGraphics pieChart = (IWDBusinessGraphics) view.getElement("PIE");
	pieChart.mappingOfOnAction().addSourceMapping(IWDBusinessGraphics.IWDOnAction.ID, "id");
}

2. OnAction of BG having two parameter ID and nodeElement , Create these two parameter in your action named onActionSliceSelected, and bind it through parameter (Right click the BG UI element select parameter mappling )

3. Check it with one parameter also i.e ID only

Let see the result

Best Regards

Satish Kumar

Answers (0)