on 01-24-2007 5:41 PM
My dropdown by key field is not beeing populated. I have the following code in my wdDoInit method of my component controller. I have binded the dropdown by the attribute OutCatname in the layout of my view.
IWDAttributeInfo info=wdContext.nodeBAMSCategoryDetails().getNodeInfo().getAttribute("OutCatname");
ISimpleTypeModifiable st=info.getModifiableSimpleType();
IModifiableSimpleValueSet valueSetCategory = st.getSVServices().getModifiableSimpleValueSet();
// Add a empty choice for default.
valueSetCategory.put(new String(""), new String(""));
// Populate the simple value set with the data from the model node.
for (int i = 0; i < this.wdContext.nodeBAMSCategoryDetails().size(); i++)
{
valueSetCategory.put(wdContext.nodeBAMSCategoryDetails().getBAMSCategoryDetailsElementAt(i).getOutCatname(),
wdContext.nodeBAMSCategoryDetails().getBAMSCategoryDetailsElementAt(i).getAttributeAsText("OutCatname"));
}
Any help will be appreciated.
Thanks
Nahman
Hi Nahman,
I am having the same requirement, My dropdown is getting populated. Now I would like to know how to set a default value from this valueSetCategory.
Points will be rewarded.
Thanks & Regards,
Raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My code was right it was that my cardinality was not set right.
Thanks for your quick response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you checked the size of model node?Does it contain data?
It may be empty i think.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't understand this code.
Can you please tell
- How the context structure looks like
- Where the key/value-pairs are stored that should be filled into the value set
- Where the attribute for the selected key is located in the context
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.