on 06-27-2011 3:29 PM
Hi
I have an table in webdynpro and a datagrid in flex, both getting the value from the same context node. My requirement is to make the table fields editable and when I make changes in the datagrid, it should get reflected back in the webdynpro table.
So how can I access the internal table's context node from flex ?
Can anyone help me with this.
Hi Srilatha
I am very new to WebDynpro ABAP and flex integration. I know this a silly question to ask. I have written the following code.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="100%" height="100%" initialize="initApp()">
<mx:Script>
<![CDATA[
import sap.FlashIsland;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
[Bindable]
public var dataSource:ArrayCollection;
[Bindable]
public var studentname:String;
[Bindable]
public var score:String;
public function initApp():void
{
FlashIsland.register(this);
}
public function sendSubmit():void
{
FlashIsland.fireEvent(this, "newSel");
}
]]>
Could you tell me, how should I read the datasource in my flex application.
Please go throug the above code and give me pointers for correction.
Regards
Prashant Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As you are using a datasource, i assume you have set method in flex to read the datasource(context node). What you need to do is store the reference to this datasource in a local flex variable. Have a look at the below code:
private var refreshFlexUINode:ArrayCollection;
public function set refreshFlexUI(datasource:ArrayCollection):void
{
refreshFlexUINode=datasource;
}
and say you want to edit one row of the table, get that row from ArrayCollection and assign the new value.
it would be like, if you want to save second row of the datagrid
Object obj = refreshFlexUI.getItemAt(1)
obj[<CONTEXT_ATTR_NAME>]=<new value>
Hope this helps!
Best Regards,
Srilatha
Edited by: Srilatha M on Jun 28, 2011 6:34 AM
Edited by: Srilatha M on Jun 28, 2011 6:35 AM
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 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.