Skip to Content
avatar image
Former Member

dropdownby index intailly blank

HI Everyone,

I have a problem in dropdownbyindex UI element in my application.I have table in my application and below that table

i have NEW and EDIT buttons are there.

when i click on NEW button dropdown will appear and intailly dropdown current element is showing blank.

Now i when click on NEW button and then click then back and click on EDIT and then again click on NEW then dropdown showing current element as element which is in the dropdown list but i need blank when ever i click on NEW button.

Can any one give suggesions on this issue.

Regards,

Suresh

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    Aug 27, 2009 at 06:04 PM

    hi Suresh,

    Please check selection cardinality for the context node.

    I t should be 0..1 or 0..n.

    If it is 1..1 or 1..n leadselection gets automatically initialized.

    also check if initializeLeadSelection= false set for the context node.

    Hope this helps!

    Monalisa

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI Monalisa,,

      Now i set to intializeleadselection to false for that context node and its working fine.

      Thanks a lot....

      Regards,

      Suresh.

  • Aug 26, 2009 at 08:57 AM

    Hi

    In the wdDoInit() method of view write the following code:

    wdcontext.node<nodename>.setleadselection(-1);//Node name is the context node to which drop down is mapped.

    Thanks

    Susmita

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI Armin,

      I had created one valuenode in custom controller in custcontroller.I had used this valunode in both the views using contest mapping.

      After i had binded the valueattribute to dropdown from that value node.

      In the first screen i have table with onlead selection and in second screen i.e click on NEW and onleadselection in the table that is the second screen both screens are same.

      Now i wrote entire logic in fireplugfromfirstscreen action,so when i click on NEW and onlead in table then the entire logic will implement.

      Intally when i entered into firstscreen and directly clicking on NEW button then dropdown showing blank but when i click on

      leadselection and nothing doing and click on another back button and again NEW button,here the dropdown is not showing blank.Here its showing first elemnt in dropdown

      I am unble to find error.

      I had set valuenode to -1 (wdcontext.valuenode().setleadselection(-1)) in NEW button and fireplugfromfirstscreen and onaction BACK but its not working.

      Regards,

      suresh

  • avatar image
    Former Member
    Aug 26, 2009 at 07:29 AM

    Hi Suresh

    Set intialLeadSelection = false for the table node

    and selection cardinality to 1:1

    hope it will work

    Thanks

    Tulasi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 26, 2009 at 08:16 AM

    Your question is unclear to me. Say you have the following context structure:

    Rows (node, c=0:n)
    + Items (node, c=0:n, s=0:1, singleton=false)
       + text (string)
    

    Node "Rows" represents the table rows, "Items" represents the items in the drop-down lists in each row.

    To clear the selection of the drop-down list at row #i you need to clear the lead-selection of the corresponding "Items" node:

    IRowsElement row = wdContext.nodeRows().getRowsElementAt(i);
    row.nodeItems().setLeadSelection(IWDNode.NO_SELECTION);
    

    Armin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 27, 2009 at 07:20 AM

    Hi,

    If you want to keep blank vlaues in drop drop down when you click new action you can do this.

    Whichever node you have maped to dropdownbyindex make that node as invalidate();

    eg

    wdcontext.nodedropdown().invalidate();

    keep this line in onactionNew();

    Regards,

    H.V.Swathi

    Add comment
    10|10000 characters needed characters exceeded