on 11-22-2007 4:02 PM
I have very basic question..it might be very simple but it is giving me a problem.
I have created one Node name "Input" and value attribute "Input1" under it.
I have just created one more value attribute named "in1" not under any Node.
I have created two input filed in the my view.One first I have mapped the value in properties
to variables "Input.Input1" and on another "in1".
When I deploy and run the application one Input box is coming as readonly and other is working fine .Will anybody tell me why it is so?
There is no major difference between value attribute and inside a node.
It is a separation of attributes. Usually all the attributes belongs to same purpose will create in one value node. Like, calling one BAPI - requestListBAPI - it contains all the bapi related value attributes.
For your question, one field is read only(Input.Input1), bcz that context is not created. see the context properties.....cardinality will be 0..n. Change the cardinality to 1...n (<b>or</b>) create that context element .
In your implementation create that value node like this in your init method.
wdContext.createInputElement();
It will solve your problem.
in1 - is a value attribute, which is mapped to your input element. It wont have any problem.
Regards,
Sri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all of you for your answers,i definitely award points to all of you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello..When you are using nodes set the cardinality of that node to 1..n.If u cant change that from the view probably the node is binded to some node of controller.so set the cardinality of the corresponding controller node to 1..n.again if u cant change form the controller also then probably its is binded to the model.Then u need to create an element of type of that node and add it to that node by create<node>Element and addElement method.It must be enabled then..Please award points if helpful...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi manu,
You dont have a element under the context where the data can be hold.If u set 0..n the frame work will not create any,When you set it to 1..n frame work will create one for you.So the field will be enabled.
Otherwise you need to create an element of the node using createelement method.
When using value attribute drag the attribute value from left to right,when u use value node drag the node from left to right and select the required attribute.
Regards,
karthik.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Lakshmi Narayan...
for your help .It really works,but can you give me some brief explaination about the code what exactly it is doing and why we have to do this? what 's earlier happening with the code?
I have one more question...I have one problem just "value attribute" without any node are to be mapped using data modeler by dragging from left side and dropping on right side.
When I do "value attribute " with node ,drag from left side to right side it will not take.
I really got confused when I have to drag from left to right side or when right side to left side?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Ans1: I faced same problem in this situation, there I used this alternative..
Ans2:If you are mapping a single value attribute under 'context' to component controller
you have to drag from left->right
If you are mapping a single value attribute under another "node" to component controller you have to drag from right->right
I think It only accepts ValueNodes to be binded from right->left.
Regards
LakshmiNarayana
Hi,
Attribute which you have created under the context will have a cardinality set to 1..n. This is done by the framework,
For the node you have created either set the cardinality from 0.n to 1..n.
OR else create an element for the nde.
REgards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
bind some empty value to the value attribute under <node> in Init() method
as
I<node>Element ele=wdContext.create<node>Element();
ele.set<attribute>("");
wdContext.node<node>.bind(ele);
I hope this will solve it
Regards
LakshmiNarayana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.