on 05-21-2007 12:36 PM
Hi all,
I am using Model nodes for getting data and sending data back to BAPI. But if i perform search, i get results and once i come back and perform another search its showing previous results. I am invalidating Context and eventhen it shows previous results. i read in a book i need to create an element. As it is a model node i can't create. Can any one solove my problem. ?
In Controller:
wdDoInit()
{
__Arch__Arm_Project_Search_Input search = new __Arch__Arm_Project_Search_Input();
wdContext.node__Arch__Arm_Project_Search_Input().bind(search);
}
DoSearch()
try
{
wdContext.current__Arch__Arm_Project_Search_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}catch(Exception ex)
{
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(ex.toString());
ex.printStackTrace();
}
in View:
wdContext.node__Arch__Arm_Project_Search_InputElement().invalidate();
I can not understand where i am doing mistake!
Can any one tell me is there any issue cardinality causes Context clearing problem? if yes give some suggistions.
Thanks
Ravi Golla
try to put
__Arch__Arm_Project_Search_Input search = new __Arch__Arm_Project_Search_Input();
wdContext.node__Arch__Arm_Project_Search_Input().bind(search);
inside the Method itself
AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Ravi,
will you please give me the model node structure so that i can send exact code.
With Regards
Naidu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In CustomController
wdDoInit()
{
__Arch__Arm_Project_Search_Input search = new __Arch__Arm_Project_Search_Input();
wdContext.node__Arch__Arm_Project_Search_Input().bind(search);
}
public void DoSearch( )
{
//@@begin DoSearch()
try
{
wdContext.current__Arch__Arm_Project_Search_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}catch(Exception ex)
{
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(ex.toString());
ex.printStackTrace();
}
//@@end
}
In View
wdDoInit()
{
wdThis.wdGetArchCompController().DoSearch();
}
Please send me code as soon as possible. Do you undestand my problem?
My problem is getting previous results when i am running search second time.
Thanks and Regards
Ravi Golla
Hi ,
Use this line after invalidate
__Arch__Arm_Project_Search_Input search = new __Arch__Arm_Project_Search_Input();
wdContext.node__Arch__Arm_Project_Search_Input().bind(search);
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharathwaj,
Can you suggest me where can i put this invalidate() and instance of model.
Presenly i am keeping this code in wdDoExit() and InBoundPlug().
i do not undestand why my view shows previous results even i invalidated()?
Can you give me briefe information about using this code.
Thanks and Regards
Ravi Golla
Hi ,
Invalidate in case of Adaptive RFC based model nodes is useless , because the supply function for the model node will reload the values from the model every time you invalidate.
To avoid this , instead of invalidate you can bind it with an empty value. (which is wat i have suggested.. ). The
invalidate()
is not needed.
Doing it in a inbound plug to the initial view would be a proper option.
Regards
Bharathwaj
Hi ,
Copy the current value node structure(copyNode1) .. and use it (copyNode1) for binding it with UI elements
Transfer values from the mapped value node to the newly created value node using
WDCopyService.copyCorresponding(mapped value node , copyNode1);
Then whenever u want values , copy frm the mapped node.. if you dont want them.. use invalidate on the newly created node[copyNode1].
Since the new node just copies from the mapped value node.. invalidate would work.. !
Regards
Bharathwaj
Message was edited by:
Bharathwaj
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.