cancel
Showing results for 
Search instead for 
Did you mean: 

Event Parameters in WDA from Flash

former_member425121
Participant
0 Kudos

Hi experts

I've alredy created a WDA with Flash inside in wich i send data from WDA and Flash make graphics.

Now i need to interact from Flash to WDA sending an event with values.

I found how to send event from Flash (fireEvent) and how to detect that event in WDA (adding and event) and get the values in WDA ; but that values are transfered just like the other context nodes, just with 'readOnly' property empty and in Flash these values are just public variables (not parameters in fireEvent).

I see we can add parameters in WDA Event , does somebody knows where can i search about how to manage parameters in WDA Event received from Flash (and how to send these parameters from Flash in the 'fireEvent') ?

Any help will be usefull.

Best Regards

Frank

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>does somebody knows where can i search about how to manage parameters in WDA Event received from Flash (and how to send these parameters from Flash in the 'fireEvent') ?

You can add the parameters into the fireEvent method. In this sample I have the Event name newDirections. I am adding the event parameter named dirString and the value is the variable dirS. You pass event parameters in this name/value pair format.

FlashIsland.fireEvent(this,"newDirections",{dirString:dirS});

From the ABAP side I can retrieve the event parameter from within the Event Handler method of the controller as follows:

data dir_results type string.
  dir_results =  wdevent->get_string( 'dirString' ).
  check dir_results is not initial.

former_member425121
Participant
0 Kudos

Thanks Thomas

Just to be sure, the parameter (in this case dirString) must be added to the event via rightclick with that same name 'dirString' ?

PD. I learned to implement a Flash Island inside WDA with your Demo, thanks a lot.

Best Regards

Frank

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Just to be sure, the parameter (in this case dirString) must be added to the event via rightclick with that same name 'dirString' ?

Yes. I failed to mention that part, but it is important otherwise the XBCML parsing of the return from the Island will ignore the event parameter. Here is a screen shot of that portion of the declaration in same sample:

http://www.flickr.com/photos/tjung/5857911758/in/photostream

former_member425121
Participant
0 Kudos

Thnks!.

Answers (0)