on 05-17-2006 4:56 PM
Hello,
I have three UI components which have reference to a node of a context. I call a BAPI which I modify its data to set it up inside my context.
My problem is when I do that, nothing happen to my UI Components. It seams that my UI Components need to be refresh or something like that.
I've tried to make :
<i>IWDTable myTable = (IWDTable)view.getElement("Table");
myTable.bindDataSource("wdcats_admin");</i>
That works, but i have to be in each views to do that.
Is there a refresh method or process to bind my new data from my context to all UI Components.
Thanks
Regards,
If the UI elements are bound to the correct context node attributes and those attributes' values change, the UI elements should pick up the new values automatically. This is the advantage to having them bound to the context. Are you calling the invalidate method after the BAPI has been executed? Are the UI elements bound to the output of the BAPI or some other context attributes?
-Cindy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My UI Elements are all bounded to the same node of my context. But the output node of my BAPI is different (and of course invalidated), because I need to make some data changing on the BAPI's data. And after, I update the node of my UI elements with the new values.
By the way, I'm completely agree with you when you said it is the advantage of the context, but actually with that use it doesn't fit well.
With my debugger, I can see all my data stored in the well node, but my calendar and my tables do not seem to realize that data has been changed.
So the UI elements are bound to a context node that is populated through code by pulling data from the BAPI output? If that is the case, you may need to check on that code (or post it so we can see how you are doing it and possibly help). If you are replacing elements within the node or creating new ones (to replace the old ones), you can create a collection of the new elements and then bind them to the node. If you are just updating values within existing node elements, the UI elements should pick up the new values automatically.
Hope this helps.
-Cindy
Ok guys, let me show you :
<b>My Context :</b>
|-BAPI_OUTPUT
' +-Value_A
'
+-NODE_ROOT
+-NODE_DATA
|-Value_B
+-Value_C
<b>Node Properties :</b>
BAPI_OUTPUT => card 0..n
NODE_ROOT => card 1..n
NODE_DATA => card 1..n | singleton FALSE
<b>My code to get data from BAPI to NODE_DATA :</b>
IPublicMYPROJECT.IBAPI_OUTPUTElement bapiElem = wdContext.currentBAPIOUTPUTElement();
IPublicMYPROJECT.IBAPI_OUTPUTNode bapiElem = wdContext.nodeBAPIOUTPUT();
IPublicMYPROJECT.INODE_ROOTElement rootElem = null;
IPublicMYPROJECT.INODE_DATAElement dataElem = null;
bapiNode.moveFirst();
wdContext.nodeNODE_ROOT().moveFirst();
do{
// Set the position to the current element of the BAPI
bapiElem = wdContext.currentBAPI_NODEElement();
// Set my data
dataElem = wdContext.createNODE_DATAElement();
dataElem.setValue_B(bapiElem.getValue_A);
...
// Record my dataElem to a new node
wdContext.nodeNODE_DATA().addElement(dataElem);
// Create a new ROOT_NODE element
rootElem = wdContext.createROOT_NODEElement();
wdContext.nodeROOT_NODE().addElement(rootElem);
wdContext.nodeROOT_NODE().moveLast();
}while(wdContext.nodeNODE_DATA().moveNext() != null);
wdContext.nodeROOT_ELEM().setLeadSelection(0);
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.