10-26-2010 2:07 PM
I'm putting a flex application over my webdynpro. I'm working with orders and orderitems.
In my webdynpro i use a supply function to get my orderitems.
Within webdynpro everything goes well when i click on a table order to get corresponding item data in another table
but in flex i can't mannage to get the corresponding item data in my table.
<mx:AdvancedDataGrid id="dbOrders" dataProvider="{Orders}" itemClick="dbOrders_itemClickHandler(event)"
x="13" y="252" width="875" height="213" editable="false" enabled="true" selectionMode="singleRow">
<mx:AdvancedDataGrid id="dbOrderitems" dataProvider="{OrderItems}" x="501" y="512" width="709"
height="213" editable="false" enabled="true" selectionMode="singleRow">
Note that i put colums and used datafield to get the data out of the context.
I already tried this:
[Bindable]
public var Orders:ArrayCollection;
protected function dbOrders_itemClickHandler(event:ListEvent):void
{
FlashIsland.setLeadSelection(this, Orders, dbOrders.selectedItem); (dbOrders is my datagrid table)
}
here it doesnt do anything
if i use a parameter to set the leadselection @ webdynpro
FlashIsland.fireEvent(this, "setLeadSelection", {myParameter:dbOrders.selectedIndex});
code at webdynpro
method ONACTIONSETLEADSELECTION .
DATA lo_nd_order TYPE REF TO if_wd_context_node.
DATA lo_el_order TYPE REF TO if_wd_context_element.
DATA ls_order TYPE wd_this->Element_order.
* navigate from <CONTEXT> to <ORDER> via lead selection
lo_nd_order = wd_context->get_child_node( name = wd_this->wdctx_order ).
DATA LV_PARAMETER type int4.
LV_PARAMETER = WDEVENT->GET_INT( NAME = 'myParameter' ).
CALL METHOD LO_ND_ORDER->SET_LEAD_SELECTION_INDEX
EXPORTING
INDEX = LV_PARAMETER .
endmethod.
i manage to set the right Orderitem in my table but flex undoes the selection itself (meaning when u click on an order it sets the data in the table and unselect the item, putting the scrollbar back up)
Regards,
Michael
Edited by: decafmeyerm on Oct 26, 2010 3:54 PM
11-04-2010 1:08 PM
Hi,
Try saving the selectedIndex before calling the event, and afterwords listen for EVENT_END_UPDATE from the island and set the correct index again. Hope this helps.
Kind regards,
Wouter Peeters
11-04-2010 1:08 PM
Hi,
Try saving the selectedIndex before calling the event, and afterwords listen for EVENT_END_UPDATE from the island and set the correct index again. Hope this helps.
Kind regards,
Wouter Peeters