on 05-30-2005 9:13 PM
Hi,
In my web dynro app I have bound inputfields to node attributes. When I launch the WD app, all input fields seem to be disabled (or readonly). I even set the readonly attribute of inputfield to 'false', and still no difference.
Please let me know how to fix this.
Thanks !
Sri
Hi Srikanth,
That is because you havent created any element for the node.You must be using the default setting for cardinality that is 0:n.Change that to 1:n.
Hope this helps you
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To keep the field enabled -
1) either give the cardinality of the node as 1:1
or
2) if the cardinality is anything else
create an element of the node as
iprivate<viewname>.i<nodename>element ele= wdcontext.node<nodename>.createelement();
wdcontext.node<nodename>.bind(ele);
This would sove your problem
Nodes and attributes is cerated at design time. I tried setting the cardinality to 1:1, 0:1 etc....but still the inputfields are disabled.
Does this issue have anything to do with the node being singleton or not ?
PS - App uses BAPI models to persist data in R/3. However, the view context nodes are not yet bound to custom controller/ component controller etc.
Thanks !
Hi,
If the context nodes are not model nodes then the code I have given for creating an element should work.
If you are binding it a BAPI in the back and if you are passing values through Structures then
Let the BAPI be MYBAPI and the structure be MYSTRUCTURE then,
try the following
MYBAPI bp=new MYBAPI();
wdcontext.node<nodename>().bind(bp);
bp.set<MYSTRUCTURE>(new MYSTRUCTURE());
Hope that helps you.
If still it doesn't work, then I would require more information regarding your application
Noufal,
I do not want to create elements at runtime, and bind it to the inputfields. So, I dont see the need for adding any code to enable the inputfields. Am I right ? The nodes/attributes are all created at design time. Just want to bind the inputfields to the nodes attributes at design time, and thats when the input fields are disabled. Do let me know if you need mode information.
Noufal,
Cardinality of 1:1 seems logical to me, as I am trying to bind inputfields to the node attribute. However, does the nodes being singleton or not have anything to do with the issue I am facing ? Also, since I have about thirty inputfields to bind to different node attributes, I would prefer this be done at design time. If this is not possible at design time, then I will try the method you suggested.
Hi Srikanth,
Let me first tell you that what I'm suggesting is not any dynamic method. When you create a node at design time it is only the structure that you create i.e when the cardinality is 0:n it may have 0 or n elements within the node. It is upt you to craete an element where in you can set the values. It is some what like creating an object of a class before setting the value.
Unless you have an elemnt to place the value in you can't place the value.
When try hardcoding for eg node.set<attribute>(string); you do the same thing.
Hope you under stand my point.
It is not dynamic programming.
Hi ,
Being singleton or not has no relation to your problem. It only refers to whether multiple instances of child nodeis there for each parent node element.Like consider acustomer node having address and order nodes as child nodes.For each customer element there may be multiple order elemnts but a single address element.So we can make address non singleton and order singleton.
Hope this helps you
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Though I was able to bind all dropdown lists that had the following properties - Singleton = true, cardinality = 0:n), I have few dropdown field that are bound to nodes that have properties - Singleton = false, cardinality = 0:n). The reason I need these nodes as non-singleton is coz if not then there are some typed access methods like node<nodename> that are not available for creating the nodes using typed access methods.
Ex. the code below wont work if nodes are singleton.
IPrivateProjectManagerView.ILoadingGrpNode loadingGrpNode = plantElement.nodeLoadingGrp();
Also, if I try to bind these UI elements to non-singleton nodes, I get error while trying to launch the view.
Do let me know if there is a workaround for this.
Hi Srikanth,
I'm sorry I can't make out what your query is. I tried binding a singleton node that is
Testnode
|_____AnotherNode
|_____attrib
I bound the attribute attrib to the dropdownkey but didn't find any error.
Nor did I have any problem accessing the following code
IPrivate<view name>.IAnothernode el=wdContext.nodeAnotherNode();
May be I can help you if you could explain the scenario better
Hi Srikanth
if u have bound the Node of cardinallity 0-N or 1-N then u need to instantiatye the node by saying
wdContext.create<<Node>;
then u will find the UI Elements being enabled .
if u have bound with 1-1 Cardinallity then u need not instantiate the node UI elements are enabled then
With Wishes
Kruishna Kanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srikanth
You said you mapped the input fields to node attributes. what is the cardinality of the value node. is it 1:1 or 1:N. check that.
Kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The reason might be missing context elements. Check the binding chain of the input field (view controller to custom controller to component controller to model etc.) and verify that at runtime, there are corresponding node elements available.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.