cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger event in the Flash Island from the WDA?

frank_stdle
Participant
0 Kudos

On selection in a dropdown in the WDA I want to trigger an event in the Flex component (in the flash island) based on the selected value.

Is it possible to trigger an event in the Flex component from the WDA? Or must this be achieved using data binding somehow?

Thanks!

Edited by: Frank Stødle on Nov 5, 2010 8:29 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Frank,

There's a ton of information on the Web Dynpro Flash Islands wiki Link: https://wiki.sdn.sap.com/wiki/display/EmTech/SAPRichIslandsforAdobe+Flash

Especially the Tutorial - Bi-Direction Data Transfer and Simple Events may be useful to you Link: https://wiki.sdn.sap.com/wiki/display/EmTech/IslandsWDATutorial2

Cheers, Roel

frank_stdle
Participant
0 Kudos

Thanks for taking the time, but you did not actually answer the question. I can assure you that I google and search SDN before posting a question here.

I have already tried several of the tutorials, also the one you linked to. As far as I can tell the latter only demonstrates eventing from Flex to the WDA, but I still don't know hos to pass an event from the WDA to the Flex component. It might be an oversight or misunderstanding on my behalf, but anyway I'd appreciate if anyone can help me out here

Also I find it a little odd that there is no actual documentation of the different FlahIsland methods, or have I just missed it?

Former Member
0 Kudos

Ah sorry, I didn't see you needed the eventing in the opposite direction. Since the flash island is refreshed everytime a roundtrip is made you can make a bindable variable EVENT in the Flash Island and bind it to the context of your component. When ever you want to trigger the event you put content in the EVENT attribute and you handle it in the Flash Island.

For instance with a switch statement:

switch (event) {

case 'rightvalueselected':

execute_function1( ) ;

break;

case 'otherevent':

execute_function2( ) ;

break;

}

I guess that's what you meant in your first post. To my knowledge you can't trigger events from outside the Flash Island but I'm not a Flex expert.

Hope this helps you.

Cheers, Roel

frank_stdle
Participant
0 Kudos

Thanks Roel, that certainly addresses my question -- I think I can achieve my goal using the scheme you suggest. Anyway, there is an addEventListener method for the FlashIsland, so I am still curious whether you can explitely trigger an event from the WDA to the Flex -- maybe someone else can clarify that? Thomas?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Anyway, there is an addEventListener method for the FlashIsland, so I am still curious whether you can explitely trigger an event from the WDA to the Flex -- maybe someone else can clarify that?

No. That addEventListener method is for attaching to Flex events. You can't register WD Events with Flex. WD Events are designed to only be processed on the Server Side. The approach suggested of using data bindings to pass events (particularly with GETTER/SETTER bindings) is the recommended approach.

Answers (0)