on 10-10-2008 10:36 AM
Dear All
I was adviced to do the follwing:
cardinality of the node with which your input field is bound. It should be 1..n or 1..1
I have changed the cardinality and now I get this message
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(IncidentRFCModelCust.__Tdag__I_Rf02_Ial_Query_Input): cannot fill a ModelNode automatically. Change the cardinality or use a supply function
Regards
sas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
http://wendtstud1.hpi.uni-potsdam.de/sysmod-seminar/SS2005/presentations/14-Web_Dynpro_dataflow.ppt
please go through this link u will find ur answer
Regards
Ruturaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi erdem,
Not twice but only once in View Controller. So, that when the view gets instantiated the input fields are also bound to the node.
Also as you said that you fields are coming from RFC and from your previous thread I could guess that you want to take input from the user for data retreival, for that try keeping the cardinality to 0..1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharma this code is existing two times in my application.
wdDoInit() CustomController
wdDoInit() View
Do I really need it twice. ?
Regards
sas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi erdem,
The code that I provided:
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
input.setDestination_From(new Bapisfldst());
input.setDestination_To( new Bapisfldst());
wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
is to be written in wdDoInIt() of your view controller
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Thank you very much but we have already more than 20 Postings
and the problem is still existing.
The mentioned coding have been already in my custom controllers
coding. This is nothing newly?
Please read my question more carefully
Edited by: erdem sas on Oct 10, 2008 2:54 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
or else just try once to do this
1) create a context attribute of Binary type
2) bind the enable property of inputfield UI element to that attribute of Binary type and
3) In WDdoInit() enable the input field UI element by setting the binarycontext attribute true..
wdContext.currentContextElement.set<<attr>>(true);
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Has this coding to be inserted into Custom Controller's wdDoInit()
or View Controller's wdDoInit() Method.
Or even into both ??????
Bye
erdem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erdem,
In a similar application like yours I had a flight list query; in it other then the normal input fields I had to take some other values also as inputs, which were coming disabled after building and deploying the application. I rectified the error by setting the cardinality of input field node as 0..1 and selection node as 1..1 in component controller which changes the cardinality of the mapped node in views also.
My nodes were Destination_From and Destination_To
In wdDoInIt of the view controller where these input elemetns have to be binded to the input UI element I provided the following code:
Bapi_Flight_Getlist_Input--- is the model class
nodeBapi_Flight_Getlist_Input -- is the node coming from RFC mapped with component and view controller
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
input.setDestination_From(new Bapisfldst());
input.setDestination_To( new Bapisfldst());
wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
Edited by: Aishwarya Sharma on Oct 10, 2008 4:08 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharma
You are saying
In wdDoInIt() of your custom controller you first need to set the values and then bind it to the node.
How can I do that. Maybe this is the problem ?
Reagrds
sas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
i think problem shud be wid ur DOInit method
chk it again
/** Hok meothod called to initialize controller. */ public void wdDoInit()
{
//@@begin wdDoInit()
// Create a new element in the Bapi_Flight_Getlist_Input node
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
// Create new elements in the Destination_From and Destination_To nodes
input.setDestination_From(new Bapisfldst());
input.setDestination_To(new Bapisfldst());
//@@end
}
it shud hlp u
Regards
Khushboo
For changing of the cardinality, I klick on the Custom Controller' Context (on the root Node)
choose Properties and change it.
This change takes automatically effect also in the Views Context Node.
Sharma
The model Node
__Tdag__I_Rf02_Ial_Query_Input
has also an Output Node. I have forget to mention.
Output -> Node
Element E_Header_Tab
Element E_Invpersons_Tab
Element E_Return_Tab
Are both your nodes I_Iepva_Selcrit and I_Incident_Selcrit input field element?
Yes. I_Iepva_Selcrit has only one attribute which is binded with my problem input field
You are saying
In wdDoInIt() of your custom controller you first need to set the values and then bind it to the node.
Which values. How can I set them. Aren' they set.
Regards
erdem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erdem,
Your Method Ial_Query_Input( ) executes the bapi...
Where does these bapi value gets stored in which node? Is it node Output?
In wdDoInIt() of your custom controller you first need to set the values and then bind it to the node.
Are both your nodes I_Iepva_Selcrit and I_Incident_Selcrit input field element?
Edited by: Aishwarya Sharma on Oct 10, 2008 1:09 PM
Edited by: Aishwarya Sharma on Oct 10, 2008 1:31 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharma the input field is binded with ialprepid . See bolow
Here some additional information
CONTEXT CUSTOMCONTROLLER
Cardinality 0 n
Root ModelName in the customController Context
__I_Rf02_Ial_Query_Input
Element 1
I_Iepva_Selcrit
- with one Attribute named ialprepid in the Element 1
Element 2
I_Incident_Selcrit
-many Attributes in this element
Additional there are two flags
Flag1
Flag2
CONTEXT VIEW
Cardinality 0 n
Root ModelName in the customController Context
__I_Rf02_Ial_Query_Input
Element 1
I_Iepva_Selcrit
- with one Attribute named ialprepid in the Element 1
Element 2
I_Incident_Selcrit
-many Attributes
//CustomController
public void wdDoInit()
{
wdContext.node__I_Rf02_Ial_Query_Input().bind(new __I_Rf02_Ial_Query_Input());
__I_Rf02_Ial_Query_Input input = new __I_Rf02_Ial_Query_Input();
wdContext.node__Tdag__I_Rf02_Ial_Query_Input().bind(input);
input.setI_Incident_Selcrit(new __Tdag__Is_Rfc_Iasel());
input.setI_Iepva_Selcrit(new Cciht_Ipeva());
input.setI_Flg_Filterinvolved(true);
input.setI_Flg_Orghierarchy(true);
}
View search Button
public void onActionSearchIncidents(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
// call function module /I_RF02_IAL_QUERY
wdThis.wdGetIncidentRFCModelCustController().Ial_Query_Input();
}
Method Ial_Query_Input is inside Custom Controller
public void Ial_Query_Input( )
{
//@@begin Ial_Query_Input()
//$$begin Service Controller(609296820)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
{
wdContext.current__I_Rf02_Ial_Query_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(WDDynamicRFCExecuteException e)
{
manager.reportException(e.getMessage(), false);
}
//$$end
//@@end
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi!
you must not add elements to a Node of cardinality 0..1 or 1..1.
thanks
vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your context Node
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi erdem,
If your input field is mandatory to fetch data from RFC keep the cardinality of you context node to 1..1 and Selection Property also to 1..1.
Edited by: Aishwarya Sharma on Oct 10, 2008 12:29 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharna
which cardinality is needed for your approach. ?
Currently I have 1.1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Insert the code in wdDoInit() of view controller.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi!
also make sure that the node you binded has some elements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sharma yes it is coming from RFC.
Where must the code be inserted. In which method of
my view Controller ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try the following code in your view controller:
yourInputModelClass input = new yourInputModelClass();
input.set<Model Attribute Mapped to Input Field>(new Bapi<type());
wdContext.nodeModelNode().bind(input);
Is your Model node coming from an RFC?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Assuming you model node is something like this
request model node
input parameter for the input field
Now, create a value attribute in your Custom Controller named input
map this to the view by providing a link between your view and controller
Bind this input attribute to your input field.
Now, when you are executing your RFC just before that set this input parmeter
<model name> model = new <model name>();
<request model node> request = new <request model node>(model);
wdContext.node<request model node>().bind(request);
request.set<attribute>(wdContext.currentContextElement().getInput());
Now execute your RFC.
Thanks
Anup
Edited by: Anup Bharti on Oct 10, 2008 12:12 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
singleton is true and this line has been also inserted
wdContext.node__I_Rf02_Ial_Query_Input().bind(new __I_Rf02_Ial_Query_Input());
Nevertheless it is not working, the input field is still disabled.
Bye
erdem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi!
please ensure your singleton property is true.
thanks
vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erdem,
You have to write the following line of code in the wdDoInIt() of the component controller
wdContext.node<yourInputNode>().bind(new <yourInputModelClass>());
I hope this may be helpful to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sas,
Try to change cardinality 1:1 only and save and restart your application, if the problem still exits then try to use supply function.
Thanks
Anup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.