on 11-24-2007 11:18 AM
Hi Experts,
I have some data fetched and stored in a context.(In a value attribute under a value node.)
Lets call this node N1 and attribute A1.
I have a table with 5 fields.
Lets call thi table T1 and fields F1, F2 , F3 , F4 , F5.
Now to one of the table field(F1) i need to bind the values fetched in context attribute(A1).
Can anyone suggest how can i do this?
Thanks for your help in advance.
Regards,
Ashish
i used input ui Element to show the data as value help. I still could not figure out a way to show three values in a drop down, i mean first column as key filed , second column as value filed and third column as Value field2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
I have used the following code.
IWDAttributeInfo attributeInfo = wdContext.nodeCtx_vn_GTINSearch().getNodeInfo().getAttribute("ZGTYP1");
ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = simpleType.getSVServices().getModifiableSimpleValueSet();
valueSet.keySet().removeAll(valueSet.keySet());
for(int j=0; j<wdContext.nodeCtx_vn_GTINType().size(); j++){
String keyGTINType = wdContext.nodeCtx_vn_GTINType().getCtx_vn_GTINTypeElementAt(j).getZGTYP();
String valueGTINType = wdContext.nodeCtx_vn_GTINType().getCtx_vn_GTINTypeElementAt(j).getZGTYPNAM();
valueSet.put(keyGTINType,valueGTINType);
}
But using this i can only see the values(valueGTINType) that i have populated.
I can not view key elements.
How can i show both values and keys together?
Regards,
Ashish Shah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashish,
I suppose you are using a Drop Down UI element to display the list of values. See you cannot show both key and value pair in a drop down.
To do this, just replace the Drop Down UI element with an Input Field UI element. This would result in creating a Value Help, where you will have both keys and values. You won't need to make any change in the coding. Just bind the same context to the Input Field which was earlier bound to the Drop Down. For understanding more on Value Helps in Web Dynpro, see the following link:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2833ce90-0201-0010-f1af-d3cfe1155b16">Value Help in Web Dynpro Applications</a>
<i>See page 6, you will see how a Value Help differs from a Drop Down.</i>
And if by any chance you wish to use a Drop Down only, then I can tell you a workaround. Replace the following line in your code:
valueSet.put(keyGTINType,valueGTINType);
by this:
valueSet.put(keyGTINType,keyGTINType+" - "+valueGTINType);
Bye
Ankur
Message was edited by:
Armin Reichert
Hi Ankur,
Thanks for the suggestion.
I have already seen this tutorial. And i could bind the data to the input field.
I also want to know if i want to show more than two fileds in the dropdown or value help , how can i do that? ( For eg: keyGTINType,valueGTINType,value2GTINType ) .
Thanks,
Ashish Shah
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.