on 03-13-2009 4:11 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.