on 12-20-2006 12:26 PM
I have a dropdown by index column in a table
The node structure is:
V_Contractor (node)
- shift
- hours
|
V_ContractorSel (node) -> dropdownbyIndex
-name
V_Contractor:- cardinality 0:n and selection 1:1 singleton true
V_ContractorSel:- cardinality 0:n and selection 1:1 singleton false
The issue is that sometimes when i select the dropdown from row 7 of the table the dropdown for row 4 gets displayed. Then whenever i click anywhere on the table this dropdown for row 4 gets displayed.
Thanks for your help
Ashwin
Check what do by code on view action/event/wdDoModify to your node.
Seem strange.
How do you access to <b>V_ContractorSel</b>?
use:
wdContext.currentV_ContractorElement.nodeV_ContractorSel()
???
Post your event/action code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in WdDomodify a function "Calculatexxx" is called
In this function I have used for loop on the main node as follows
for (int i = 0; i < node_size; i++) {
wdContext.nodeV_Contractor().moveTo(i);
if ((!(wdContext
.currentV_ContractorSelElement()
.getname()
== null)))
{
// Some code
}
}
Hence when i select any dropdown on any node the last dropdown also used to pop up because of the
last element being selected as lead selection after my for loop ends.
So to counter that situation, I created a context attribute called "LeadSelected".
In action for table "onLeadselect" I have set this as follows
wdContext.currentContextElement().setLeadSelected(
wdContext.currentV_ContractorElement().index());
And then I added the following code to the "Calculatexxx" function
for {
....
...
...
}
// added part
wdContext.nodeV_Contractor().moveTo(wdContext.currentContextElement().getLeadSelected());
Thanks for your replies Roberto,
You are right. Hence in the dropdown onSelect event I have written
wdContext.nodeVContractorSel().setLeadSelection(currentIndex);
and in wdDoModify I have written
if (firstTime) { IWDDropDownByIndex l_drpDown =
(IWDDropDownByIndex) view.getElement("DrpDown_Name");
l_drpDown.mappingOfOnSelect().addSourceMapping("index", "currentIndex");
I believe this allows me to access the Name value with
wdContext.currentV_ContractorSelElement().getName();
No:
wdContext.nodeVContractorSel().setLeadSelection(currentIndex);
but do:
wdContext.<b>currentV_ContractorElement()</b>.nodeVContractorSel().setLeadSelection(currentIndex);
this is wrong:
wdContext.currentV_ContractorSelElement().getName();
do this:
wdContext.<b>currentV_ContractorElement()</b>.currentV_ContractorSelElement().getName();
Hello Armin,
In the doModifyView i have just written a code where in for the first time, it sets the index to p_index as -
if (firstTime) {
IWDDropDownByIndex l_dropDown =
(IWDDropDownByIndex) view.getElement("DrpDown_ServiceType");
l_dropDown.mappingOfOnSelect().addSourceMapping("index", "p_Index");
"V_UI_TextStatus"));
}
Please help.
Thanks,
Ashwin
for (int i = 0; i < node_size; i++) {
wdContext.nodeV_Contractor().moveTo(i);
if ((!(wdContext<b>.currentV_ContractorElement()</b>
.currentV_ContractorSelElement()
.getname()
== null)))
{
// Some code
}
}
otherwise is NULL or not the right V_ContractorSelElement
Message was edited by:
Roberto Tagliento
I think u have binded datasource of table UI element to the subnode(whose singleton property is set to false)
Instead u bind it to the parent node.
Example:
Node A<-----Table's Data Source
---attr1
---attr2
-
Node B-(singleton false)
-
attr1<-----DropDownByIndex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Roberto,
After rigorous testin, i found the issue still persists.
Lemme give it another try
Thanks,
Samta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check th posting
https://forums.sdn.sap.com/click.jspa?searchID=483087&messageID=1313913
Regards, ANilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.