on 12-19-2006 11:02 PM
Hello All,
The issue that i am facing is that i have a dropdownbyindex in one of my table columns. now when i try to select an entry from the dropdown, the next dropdown opens up. no matter where i click on the table UI, the dropdown opens up.
is this due to some coding error or something to do with correct properties and config. please do let me know. i am trying to figure this out from quite some time now.
Thanks a lot!
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.
Can you please describe exactly what you want to achieve?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rubin,
As I under stood from your post,
In a table a particular colum is a drop down.
when you select a value from say 1st row, the dropdown value of 2nd row is changed, and vice versa.
If this is the case, your getting the coulmn value from a particular node.
which means all the row's dropdowns refer to the same node. obviously this problem arises..
Am I right, in your case,
Try changing the singleton property to "True"
Regards,
Sai.k.k
Message was edited by:
Konchada Sai Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fahad, you are right, I have some code in the WdDoModify:
Node structure is
V_UI_MISCLIST (node)
-
V_UI_MISCSERVICES (node with singleton = false, used for the dropdown)
-
attrib1
-
attrib2
-attirb a
-attrib b
.
.
public static void wdDoModifyView(IPrivateMisc_View wdThis, IPrivateMisc_View.IContextNode wdContext,
com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
if (firstTime) {
IWDDropDownByIndex l_dropDown =
(IWDDropDownByIndex) view.getElement("DrpDown_ServiceType");
l_dropDown.mappingOfOnSelect().addSourceMapping("index", "p_Index");
}
if ((!firstTime)
&& (!(wdContext
.currentV_UI_Plug_FiredElement()
.getV_UI_Plug_Misc()
.equalsIgnoreCase("X")))) {
wdThis.compute_TotalCost();
}
//@@end
}
__________________________________________________________________
public void compute_TotalCost( )
{
//@@begin compute_TotalCost()
int node_size = wdContext.nodeV_UI_MiscList().size();
double qty, unit_cost, total_cost = 0.0, net_value = 0.0;
int len_mkup;
for (int i = 0; i < node_size; i++) {
total_cost = 0.0;
wdContext.nodeV_UI_MiscList().moveTo(i);
if ((!(wdContext
.currentV_UI_MiscServicesElement()
.getV_UI_ServiceType()
== null))
&& (!(wdContext
.currentV_UI_MiscServicesElement()
.getV_UI_ServiceType()
.equalsIgnoreCase("--- Select a service ---")))) {
// SOME PROCESSING
}
}
int miscSize = wdContext.nodeV_UI_MiscList().size();
if(miscSize>0){
if(wdContext.currentContextElement().getIndex_Lead_Selection()>=miscSize)
{
wdContext.nodeV_UI_MiscList().moveLast();
}
else {
wdContext.nodeV_UI_MiscList().moveTo(wdContext.currentContextElement().getIndex_Lead_Selection());
}
}
//@@end
}
_______________________________________________________________
THIS ACTION IS ATTACHED TO TABLE OnLeadSelection EVENT
public void onActionsetLeadSelection(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionsetLeadSelection(ServerEvent)
wdContext.currentContextElement().setIndex_Lead_Selection(
wdContext.currentV_UI_MiscListElement().index());
//@@end
}
_________________________________________________________________
ON SELECT ACTION FOR DROPDOWN
public void onActionselectService(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int p_Index )
{
//@@begin onActionselectService(ServerEvent)
wdContext.nodeV_UI_MiscServices().setLeadSelection(p_Index);
//@@end
}
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.