Skip to Content
avatar image
Former Member

Drop down by key

Hi experts,

I have a drop down(DROP DOWN BY KEY) which has 2 enumaration value yes & No. My NOde name is DD_YES_NO.Attribute name is the same as NODE.I am not eble to set the value of the selected dropdown into the context attribute.

Please help me with possible code how to create a drop down and set the value of the drop down into the context attribute.

Its urgent.Please reply as early as possible.

Regards,

Aniruddha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Mar 17, 2010 at 09:27 AM

    hi

    try to change node attribute cardinality to 1.1, so that first value will be always shown by default.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 17, 2010 at 03:48 PM

    Hi Aniruddha

    Create Context node selection properties as 1:1

    Write code for populating value in context node like

    IDD_YES_NOElement ele = wdContext.createDD_YES_NOElement();

    If(<Your Criteria>)

    {

    ele.setDD_YES_NO("Yes");

    }else{

    ele.setDD_YES_NO("No");

    }

    wdContext.nodeDD_NODE().addElement(ele);

    And then bind to drop down.

    Hope it helps,

    Regards,

    Arun

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 19, 2010 at 08:42 AM

    Hi Aniruddha,

    When u use DD by Key, u have to use a context attribute and not context Node. Try the following:

    1. create a DD by UI element in the screemn.

    2. create a context attribute of type String in the context tab

    3. In the Dictionary part of the WD project, create a simple type "YesNo" of type String

    4. In the Enumeration tab, enter values for key and values as "Y / Yes" "N / No"

    5. Bind the context attribute to the simple type created.

    then the values will be visible in the DD by key

    Regards,

    Poojith MV

    Add comment
    10|10000 characters needed characters exceeded