cancel
Showing results for 
Search instead for 
Did you mean: 

Flash Islands - transfer data only once from WDA to Flex component

Former Member
0 Kudos

Hi Experts,

I have defined some GACProperties to configure my Flex component within my WDA application. I need this data to initialize the Flex component but I'd like to somehow stop transfering this data after the initialization to avoid useless communication.

Does anyone know how to achieve this?

Regards,

Pierre

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Pierre,

This method is rather unproven and only works with applications that are either intended to do display only or on demand updaets.

You may try the FlashIsland.removeEventListner after you first data load finishes and add the event listener back again when an action is fired. This way you would cut off your flash island from listening to context changes when its not needed.

Former Member
0 Kudos

Hello Pierre,

AS you might be knowing already, the data transfer from WD to Flex happens whenever there is a change in the context nodes or when ever there is an interaction from Flex to WD(When FireEvent is called).

This we cant stop as this is the standard behavior.

In our application what we did to stop this is, we have created an attribute 'IS_UPDATE_REQUIRED' in the context of type WDY_BOOLEAN. And set this to true by default. And we created a GACProperty and bound that to the context attribute 'IS_UPDATE_REQUIRED'.

And for all the data which you are sending to Flex, you need to create setter methods instead of using public properties.

And the GACProperty for 'IS_UPDATE_REQUIRED' should be first one to be declared in the VIEW LAYOUT. In the setter method for that property, we read value and store it in a flex local variable isUpdateRequired. And in all other setter methods, check the value of that variable first. And only if its true, read the values for other properties. Otherwise dont do anything. And in the Last setter method, we need to set the context attribute IS_UPDATE_REQUIRED to false.

By doing this, whenever the data transfer happens next time, since the value of isUpdateRequired would be false, the read wont be read.

Hope am a clear!

Best Regards,

Srilatha