on 06-26-2007 10:44 PM
Hi All,
Can u help its urgent..
Actually,I am getting a set of values from an rfc and have it in a context attribute within a node which itself is within a node.Now, I need to display these values residing inside the atrribute in a drop down by index list which is already created.
Points ll be awarded for the solution.
Regards,
Udit
Hi,
For eg. node structure is like this,
node(Value)
|
|____attribute
Bind this attribute to dropdownbox then use following coding....
WdDoInit()
{
int size=wdContext.nodebapiNode().size();
List list1=new ArrayList();
for(int i = 0; i<size; i++)
{
IPrivateView.IValuenodeelement ele =wdcontext.nodevalue.createvalueelement();
ele.setattribute(wdcontext.nodevalue.getelementAt(i).getAttributeasText("element name"));
list1.add(ele);
}
wdContext.nodevalue.bind(list1);
}
Regards,
Suresh.T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Just map the model attribute to view controller and bind it to the view DD list
Now you can only display the value in DDList of this model attribute if it is type list.
I would suggest that a better solution is to use a DDByKey and populate the attributes enumeration.
Now following is the code to do that:
IModifiableValueSet valset = wdThis.wdGetAbcController().wdGetContext().getContext().getModifiableTypeOf("Abc.Acc_Mgnt.Bukrs").getSVServices().getModifiableSimpleValueSet();
// This will give you a value set.
valset.put("key","value");
Values put in the above code :Value refer to the displayed values at runtime.
Keys : Stored in the attribute at runtime.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Udit,
Simple binding should work in your case.
Did you bind the "Texts" propertry of the DropdownIndex to the valueAttribute ??
Thanks,Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
In wdDoModify,I got the object for the dropdown list, and used
dropList.bindTexts(myAttributeInfo);
But the thing is,all the dropdownlist values are coming only in 1st row dropdown itself.The other dropdown list values are also comin only in 1st dropdown list.Others are empty..
I am actuaaly using SUPPLY function to fill the dropdown list..And it is actually getting called the no. of rows I have in table.So SUPPLY fn is working fine I suppose..
Regards,
Udit
Hi Anil,
My context Structure is:
NodeA
-
NodeB
-
Attr
NodeA gives me the no. of rows in table and NodeB gives no. of items in Drop Down List.NodeA is binded to table structure.
Here, In supply fn for NodeB,
I have to write code....
Like each row has drop down list with say 2 options..
So whatver no. of rows are there, each row's dropdown list must show list of items inside it...
Tell me the code..I am stuck it seems..
According to my code, only 1st dropdown list is getting populated with all values i.e values of other dropdown lists also...
Regards,
Udit
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.