cancel
Showing results for 
Search instead for 
Did you mean: 

dropdownby index intailly blank

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

monalisa_biswal
Contributor
0 Kudos

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

Former Member
0 Kudos

HI Monalisa,,

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

Thanks a lot....

Regards,

Suresh.

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

HI Swathi,

I already invalidating the node in ONACTION NEW but it was not working.

Regards,

Suresh

susmita_panigrahi
Active Participant
0 Kudos

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

Former Member
0 Kudos

HI All,

Thanks for reply,

I already set leadselection to -1 but still i am facing the same problem.

Regards,

Suresh

Former Member
0 Kudos

How does your context and data binding look like?

Armin

Former Member
0 Kudos

HI Armin,

I had created one value node and i fill all the list to that value node and finally i assign that valus to the dropdownbyindex.

Regards,

suresh

Former Member
0 Kudos

Please give more details.

Armin

Former Member
0 Kudos

HI Armin,

I table with 5 columns and below that table i ahve NEW and EXIT buttons are there.In the table i am using on leadselect,for

example if i select row in the table then the row records will appear in another screen.Here when we click on NEW button the new screen will appear and this screen is same the onlead selection screen.

When i click on NEW button some fields are displaying and dropdown is one field and its showing intial value blank.Up to here

my application working fine.

When i select row in the table the record will appear one screen,here we can edit and save.After screen appear with out doing anything clikcing on back button and then NEW button the dropdown is not showing blank.

Here i wrote entire code in onfireplugfromtable action.........

Can you please give some inputs about this issue.

Regards,

Suresh

former_member201361
Active Contributor
0 Kudos

HI,

When i select row in the table the record will appear one screen,here we can edit and save.After screen appear with out doing anything clikcing on back button and then NEW button the dropdown is not showing blank.

Try this, onAction Back, set the lead selection of ur node to -1.(here node drop is bound to drop down)

wdContext.nodeDrop().setLeadSelection(-1); so when u click new Button, the drop down will remain blank.

Thanks and Regards

Former Member
0 Kudos

HI Fazal,

I had done this already but its not working.When wdcontext.nodexxxx.invalidating is not using in code then it was working

but if i am invalidating then it was not working.With out invalidating the dropdown willnot refresh.

Can you please give your inputs.

Regards,

suresh

Former Member
0 Kudos

Without knowing the context structure and how the controllers are related it is difficult to answer what you are doing wrong.

Armin

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Suresh

Set intialLeadSelection = false for the table node

and selection cardinality to 1:1

hope it will work

Thanks

Tulasi