on 09-12-2008 2:52 AM
Hi guys,
I've created a dropdown list (dropdownbyindex) that has 2 values - yes, no. I've created an event for onSelect where it will check what is the value in the dropdown list that was selected by the user, but not sure how to go about coding it. Anyone noes how to do this? Thanks!
Hi,
In onSelect action u write this code.
String ss=wdContext.currentContextElement().getObject();
wdContext.currentContextElement().setText(ss);
getObject() is drop down name.
I am displaying this value in text filed
wdContext.currentContextElement().setText(ss);
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi.
create action on select event.
n give this code for d selected value in dropdown..
wdContext.current<valueNode>Element().set<value attribute>(wdContext.current<BAPI value Node>Element().get<BAPI Value attribute>);
hpe it hlps
Regards
Khushboo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zhenmin wang,
Suppose in the Context You have taken the Node name as " DDIndex" and Attribute Name as "Value" then in the Event onSelect you write the below code to access Current DropDownbyIndex Value
Syn :- wdContext.current<Node Name>Element().get<Attribute Name>();
here it will be
wdContext.currentDDIndexElement().getValue();
If you have any more Doubts Reply them Back.
Otherwise Please Close this Thread.
With Regards,
Roop Kumar.
Edited by: Roop kumar Annavarapu on Sep 12, 2008 10:52 AM
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 oN select action
the code
wdcontext.currentcontextelement.atrributevalue
atrribute value the value that u have bound to the drop down
will always giv u the selected value.
Regards
Edited by: Nikhil Tapkir on Sep 12, 2008 11:00 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wang,
Try this code,
Create a node and a value attribute named "Key".and write the following code in wdoinit.
IWDAttributeInfo attr_Info = wdContext.getContext().getRootNodeInfo().getAttribute("key");
ISimpleTypeModifiable isim_Mod = attr_Info.getModifiableSimpleType();
IModifiableSimpleValueSet isval_Svs = isim_Mod.getSVServices().getModifiableSimpleValueSet();
isval_Svs.put("YES","YES");
isval_Svs.put("NO","NO");
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
use this to get the selected element,
wdContext.node<NODE>().get<NODE>ElementAt(wdContext.node<NODE>().getLeadSelection()).get<Attribute>();
example is like this
wdContext.nodeDDI().getDDIElementAt(wdContext.nodeDDI().getLeadSelection()).getValue();
regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi zhenmin wang ,
Since you are using you can use the following code sample
wdcontext.currentcontext<node>element.get<attributename>
the current will alwys give you the selected value by user.
or you can do this
wdcontext.node<nodename>.getelemenetat(wdcontext.node<name>.getleadselectoion).get<atributename(;
We can get the current selection lead selection since it ddi , and using that we can find which element belongs to that number.
Sorry for the Typo i have typed in directly without seeing NWDS.
Regards
Pankaj Prasoon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.