on 08-26-2009 7:57 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh
Set intialLeadSelection = false for the table node
and selection cardinality to 1:1
hope it will work
Thanks
Tulasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.