on 03-04-2008 12:06 PM
How to populate data in a Dropdown list . the data to be populated in the dropdown list comes from the RFC.
And please also tell me, how i can, populate data in a table , according to the dropdown list .
Plese provide any tutorial and code samples .
Thanks in Advance ,
Upendra agrawal .
Hi
You can solve this problem by using the following
(1) attributeInfo
(2) simpleTypeModifier
(3) valueSet
Follow this program; that dynamically add values to a dropdown list
you can use the RFC outobject instead here.
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute( IPrivatePRG_PaymentView.IContextElement.ALL_YEARS);
ISimpleTypeModifiable YearType = attributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = YearType.getSVServices().getModifiableSimpleValueSet();
String yearCount = null;
for( int i = 0; i < 75; i++)
{
yearCount = "" + ( 1990+i);
valueSet.put( yearCount, yearCount);
}
Regards
- Vinod
*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks EveryBody
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The answer given by Sharanya is right. Please close the threat if your problem is resolved.
Regards
Deepak
Edited by: Deepak Tiwari on Mar 5, 2008 5:15 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai upendra ,
try this code ,it easy n it works
create a context node and an attribute under that node use ur node and attribute in this code.bine that node to the drop down by index UI element in Layout.
try
{
IPrivateKv_bus.IKvnodeNode kvlevel=wdContext.nodeKvnode();
List lis=new ArrayList();
for(int i=0;i<4;i++)
{
if(i==0)
{
IPrivateKv_bus.IKvnodeElement el11 = kvlevel.createKvnodeElement();
el11.setKvlevel("Select kvlevel");
lis.add(el11);
}
if(i!=0)
{
IPrivateKv_bus.IKvnodeElement el11 = kvlevel.createKvnodeElement();
el11.setKvlevel("kvlevel"+i);
lis.add(el11);
}
}
kvlevel.bind(lis);
}
catch(Exception e)
{
}
place this coding in init method of your view.any issues plz let me know.
Thanks n Regards
Sharanya.R
Edited by: Sharanya.R on Mar 5, 2008 9:39 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Upendra
Try this tutorial
Try these sample codes also
regards
Deepu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
if the value from rfc is less than 10, if it is more than go for SVS or OVS.
Create value node and value attribute of cardinality 0:n.
copy the values from the model node to created local node.
Bind this with the Drop Down by key or Drop Down by Index of your choice...
Regards
Chandran S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
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.