Skip to Content
0
Apr 13, 2012 at 06:54 AM

Problem with passing array data from Flex to WebDynpro

17 Views

Hello SDN!

We pass a simple string and an ArrayCollectoin from Flex to WD, but in WD we receive only a single string.

Our Flex part:

[Bindable]

public var characteristicsValues : ArrayCollection;

[Bindable]

public function set fCharacteristicsValues(val:ArrayCollection) : void {

this.characteristicsValues = val;

}

public function get fCharacteristicsValues() : ArrayCollection {

return this.characteristicsValues;

}

public function sendToWD() : void {

var tmp:ArrayCollection = new ArrayCollection([

{index:"IND0000010", date:"01/01/2010", value:100},

{index:"IND0000011", date:"01/01/2010", value:200},

{index:"IND0000012", date:"01/01/2010", value:500},

{index:"IND0000010", date:"01/01/2011", value:200},

{index:"IND0000011", date:"01/01/2011", value:300},

{index:"IND0000012", date:"01/01/2011", value:600}

]);

characteristicsValues = tmp;

paramString = readSlider();

FlashIsland.storeProperty(this , "fCharacteristicsValues", characteristicsValues);

FlashIsland.fireEvent(this, 'SEND_YEARS_TO_WD', null
);

}

In WD we have GACDataSource named "fCharacteristicsValues" (name of the getter and setter for data array in Flex) with two GACProperty objects named "index" and "value" (named as fields of data array in Flex). Datasource mapped to node with cardinality "0:n" and properties mapped to corresponding attributes of that node. All properties are not read-only. This node is mapped to node of ComponentController and binded to Javabean model. Type of attribute "index" is String, type of attribute "value" is decimal.

And in the WD event called when the Flex event fired we see only the value of the single string (called paramString ) passed from Flex but node is empty.

Why? What is wrong?

Regards, Lev