on 08-15-2007 11:11 AM
Hi,
I implemented a View with RoadMap element. Then I created selectedStepId attribute (string type) in a View context and bind it with RoadMap's selectedStep property. After that I assigned an action "StepSelected" to the RoadMap.onSelect event.
In the action handler I wrote:
public void onActionStepSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionStepSelected(ServerEvent)
String stepId = wdContext.currentContextElement().getSelectedStepId();
String stepIdFromEvent = wdEvent.getString("step");
...
//@@end
}
But stepId and stepIdFromEvent always = null when this action works.
Any thoughts, friends?
Hi,
Add this code to the <i>wdDoModifyView()</i> method:
IWDRoadMap rdMap = (IWDRoadMap) view.getElement("<id of the RoadMap UI>");
rdMap.mappingOfOnSelect().addSourceMapping("step","selectedStep");
Edit the StepSelected action to add a parameter called "<i>selectedStep</i>" of type String. After this the signature for the action handler will look like:
public void onActionStepSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, String selectedStep )
Inside the action handler you can access the selected step simply as "<i>selectedStep</i>".
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great. It works by this way. Thanks!
But why this stuff doesn't work by a standard way, described in my thirst post?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.