on 06-09-2008 5:34 AM
Hi Friends,
I am populating values using DropDownByKey using RFC FM. every things works fine but in the middle of values it's giving an empty space. I found some answers in the forum changing the cardinality from 0..1 or 1..1 should fix this issue. but I need any empty sapce as first value in the dropdownbykey bot not in middle.
Example: Say i am populating 3 values like : London, Dublin, Frankfurt
but my dropdown displying as follows: London, Dublin, < empty Space>, Frankfurt
Here the empty Space suppose to be the first value in the DropDownByKey but in between.
I want to display like here: < empty Space>, London, Dublin, Frankfurt
I am this code:
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateCountryView.IContextElement.COUNTRY);
ISimpleTypeModifiable valuesType = attributeInfo.getModifiableSimpleType();
valuesType.setFieldLabel("Country Name");
IModifiableSimpleValueSet valuesSet = valuesType.getSVServices().getModifiableSimpleValueSet();
int countryNodeSize = wdContext.nodeCountry_Help().size();
valuesSet.put("", "");
for (int i = 0; i < countryNodeSize; i++)
{
valuesSet.put("" + wdContext.nodeCountry_Help().getCountry_HelpElementAt(i).getLow(), "" + wdContext.nodeCountry_Help().getCountry_HelpElementAt(i).getText());
}
Thanks in advance.
Peter.
If you already have the drop-down list texts in context node elements you could just use a DropDownByIndex UI element and bind the "texts" property to attribute "Country_Help.text". To get an empty entry, set the selection cardinality of node "Country_Help" to 0:1.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Armin,
Many thanks, this is resolved.
Thanks.
Peter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nikhil,
Thanks for your reply.
When I add the code which you sent me is duplicating the top value and still the empty sapce in middle of the values.
I am not able to get rid of that empty sapce some how. If the empty space is on top in the DropDownByKey values that is fine for me but it's creating in middle of it.
Thanks
Peer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Prajakta,
Thanks fpr quick reply.
Values are coming fine from the backend, Every thing works perfect expcet the empy sapce in between, How to get rid of that empty space?
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please try this code
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateCountryView.IContextElement.COUNTRY);
ISimpleTypeModifiable valuesType = attributeInfo.getModifiableSimpleType();
valuesType.setFieldLabel("Country Name");
IModifiableSimpleValueSet valuesSet = valuesType.getSVServices().getModifiableSimpleValueSet();
int countryNodeSize = wdContext.nodeCountry_Help().size();
for (int i = 0; i < countryNodeSize; i++)
{
if (i ==0) valuesSet.put("", "");
else {
valuesSet.put("" + wdContext.nodeCountry_Help().getCountry_HelpElementAt(i).getLow(), "" + wdContext.nodeCountry_Help().getCountry_HelpElementAt(i).getText());
}// if (i==0)
}
nikhil
Hi,
First check that whether the values coming from backend are proper or not.Values in backend need to be separated by semicolon and not a comma.
Then for the dropdown nodes set cardinality as 0:N and selection cardinality as 0:1.
Thanks,
Prajakta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.