on 02-20-2008 10:12 AM
Hi,
Which function is used to to populate the values in Dropdown box dynamically by using Webdynpro for java?
Thanks & regards,
Mastanvali Shaik
Hi,
To populate drop down by key
ISimpleTypeModifiable modifiable = wdContext.getNodeInfo().getAttribute("Your Attribute").getModifiableSimpleType();
if( modifiable.hasSVService() )
{
ISimpleValueServices simpleValueServices = modifiable.getSVServices();
IModifiableSimpleValueSet simpleValueSet = simpleValueServices.getModifiableSimpleValueSet();
for(int x=0; x<10;x++)
{
simpleValueSet.put(String.valueOf(x), String.valueOf(x));
}
}
Drop Down By Value
//create a node lets say orders, if you dont need a empty row set the selection cardinality to 1..1
for(int x=0; x< 10; x++)
{
IOrdersElement element = wdContext.nodeOrders().createAndAddOrdersElement();
element.setOrderType(String.valueOf(x));
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mastan,
Create a context attribute. Bind this to Dropdown box value property.
IWDNodeInfo info = wdContext.getNodeInfo();
IWDAttributeInfo aidInfo = info.getAttribute("+name+");
ISimpleTypeModifiable aidType =
aidInfo.getModifiableSimpleType();
ISimpleValueServices aidServices = aidType.getSVServices();
IModifiableSimpleValueSet aidVset =
aidServices.getModifiableSimpleValueSet();
for(// loop...)
{
//fill the value set
aidVset.put(+key+, +value+);
}
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
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.