Skip to Content
author's profile photo Former Member
Former Member

Difference between value attribute and value attribute under Node in contex

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    Posted on Nov 22, 2007 at 04:22 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 04:25 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 03:21 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 04:41 AM

    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 Element and addElement method.It must be enabled then..Please award points if helpful...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 04:11 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 04:36 PM

    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?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 05:39 AM

    Thanks all of you for your answers,i definitely award points to all of you.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 05:41 AM

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.