cancel
Showing results for 
Search instead for 
Did you mean: 

how to navigate from 2 DropDown Menus Lists to other views

Former Member
0 Kudos

hai all,

in my applicatin i have viewset with top, left,right panes.in my left pane i have hyperlinks which navigate to right pane. In my right pane i have 2 drop down lists

in my first dropdown i have 6-7 items. if i select anyone item from that and click on submit button i have to display a table info. like this i have to display for all items using submit in the right pane. From second DropDown with same items i have to display Forms after hitting the 2nd dropdown submit button in the right pane.

please guide me

Thanks in advance

shravan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sravan,

What I understand from your query is that you have to perform actions depending on selection in dropdown boxes.

You can very well do that. One good way is to create enumerated data type in dictionary for all your items in dropdown list.

You can use Dropdown by index UI element.

Create a context attribute with type as enumerated simple type as created in dictionary.

In the click event you can recognise the selection using following code.

if wdContext.currentContextElement.get<context>.equals(<value of item specified in enum list>){
<code for table/form display>
}

Instead of using Submit button you can also use OnSelect event of dropdown by key UI element.

Cheers,

NEx

Former Member
0 Kudos

hi,NetWeaver Expert

hai i created enumeration datatype in simpletypes and **** what u have told to. now i need to display the info regarding each and every dropdown item in a table.

i want to show that in a single table instead of displaying each table for every one selection. i mean table should be common but the data inside the table should be changed.

thanks in advance

shravan

Former Member
0 Kudos

Hi

Is the table structure same for all items in the dropdown. What i mean is if you select say "Item1" from dropdown then it displays values in column names say "Col1" and "Col2".

If you now select "Item2" from the dropdown is it possible that you could get a different number of columns for example "Col1" , "Col2" and "Col3".

If that is your scenario then you will have to do some dynamic programming.

But if your columns remain same and only the values change depending on the dropdown then its simple.

you can get the selected element from the dropdown using getLeadSelection() and then pass this value (Item number in your case). Based on this value the table would be bound to some structure that is returned from the backend R/3.

Hope that helps you.

regards

ravi

Former Member
0 Kudos

hai ravi,could you be more precise

my table structure is same i.e. fixed rows n cols

choose is my enumeration type

from my first view(source) which is having a dropdown list choose

my table is declared in samp view(target view)

if i select any item from n items in my list it has to show the same table in samp but with different data related to the one i select

this is the code i have written in on ActionGo of my first view

String str=wdContext.currentContextElement().getChoose();

if (str.equalsIgnoreCase("SAP R/3"))

{

wdThis.wdFirePlugTosamp();

}

if (str.equalsIgnoreCase("SAP CRM"))

{

wdThis.wdFirePlugTosamp();

}

in my samp view(table) i wrote the following code in wdModify

could you suggest what changes are to be made for my problem

IPrivateSample.IDataElement obj=wdContext.nodeData().createDataElement();

obj.setUsername("shravan");

obj.setDepartment("SAP R/3");

obj.setGroup("R/3");

obj.setRole("R/3");

obj.setContactInfo("SitaCorp");

obj.setEmailid("sravan.vennamalla@sitacorp.com");

wdContext.nodeData().addElement(obj);

Former Member
0 Kudos

Hi

So is your Nodedata the value node bound to the table ui element. Well btw avoid writing too much logic in doModifyView(). Until and unless you want to reference the ui element in the view or want to create some dynamic ui elements.

Your code seems fine. Associate an action with the onSelect event of the dropdown. On select action just say

wdContext.currentContextElement().getVaDropDownValue();

This should give you the selected value in the dropdown.

Then do the necessary action to create the node "NodeData" in your case and set the values accordingly.

That should solve your problem.

regards

ravi