on 03-18-2009 8:57 AM
Hi May I know how do I do that? To empty the element that appears in the node because of model binding?
Because I am unable to execute the model as the model requires some of the element's attributes to be filled up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried to remove the element SA_ITEM3, but it is not being removed.. it is still there..
wdComponentAPI.getMessageManager().reportException("" + wdContext.nodeSa_Item3().size(), true);
wdContext.nodeSa_Item3().invalidate();
wdComponentAPI.getMessageManager().reportException("" + wdContext.nodeSa_Item3().size(), true);
Hi
Better solution is dont bind/take it during mapping .
what I mean is : A bapi/rfc node structure contain some hierarchy first is for request (which actually require to execute the model ) and Some response (which contain the information after execuation like data ,message etc )
It seems that u don't want message node there , so when u bind the model node to component controller --select only those node in which u want to work (request and returnNode )and leave others
Best Regards
Satish Kumar
Hi Thanks Satish,
I see. but as what I have explained previously.. the Item node MAY have element and MAYNOT have element depending on if the users delete them.. therefore I still need to have it binded am I right?
The question is how to not delete the empty element (remove the element) so that execution will be successful?
Oh.... jackson
If u remember i have given some clarification about Model Node and Value Node in some previous question.
The scenario is like this.. I have an order form with items in a table.. so lets say if there is no item, I could not execute the model with the empty element.. therefore I am trying to delete this existing element in the model node.
tell me one thing as you mentioned u r trying to delete this existing element in the model node How it possible dear.
Model node is just a representation of the stuff which is there in database, for doing some modification/operations with the help of these node .
You again welcome with questions.
Best Regards
Satish Kumar
Hi
If there are no ITEMS in the table , table will eventually be null ,
so irrespective of ITEMS present in the table or not
do one thing , after you bind the model node to the table ,
catch the size of the table .
if(tablesize==0)
{
IprivateViewname.I<ContextElementName> abc = wdcontext.node<NodeName>.createElement(new class());
wdcontext.node<NodeName>.removeElement(abc);
hope this should help you .
Hi,
Just wanted to put in my 2 cents worth as well. Maybe it will help.
When I want to remove unnecessary model context attributes that I dont want / need on the UI - I use a Faceless component in between the UI and the Model Components.
UI <------ Faceless Comp <---- Model
The model has a Public Part used inside the faceless component. All the unnecessay parameters are filled in with default / initial / garbage values inside the faceless component.
Finally, the faceless component exposes a Public Part with just the required context to the UI component.
You could also make use of "Component Usage" via the Component Interface Controller - i guess.
It''s an SAP Best Practice. And illustrated by Chris Whealy's best practices e-learning segments.
Hope the information is useful.
Thanks.
p256960.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.