on 09-28-2007 4:09 PM
All,
<b>This is my requirement:</b> I have a dropdown (By Index), By default I wanted to have blank as selected value.
If user selected any of the value, it has to be seleted value.
<b>What i did so far is:</b>
I set selection of node to 0..1, cardinality as 0;n and set initializeLeadSelection to false
<b>The problem:</b> I have is, by default im getting the blank space in dropdown, no issue here.
but when user selects any value from drop down, it always showing the space. not the selected value.
Thanks ...
BM
Hi Bharathi
Clear one doubt, you said " when user selects any value from drop down, it always showing the space. not the selected value."
1)is it changing the selection to blank in dropdown ?
2) is it stroing a blank value to the backend?
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
THis is how im populating the Dropdown:
IPublicMYAppl.IRNode modelNode = wdContext.nodeR();
int size = modelNode.size();
for (int i = 0; i < size; i++)
{
IPublicMYAppl.IRElement modelElement = modelNode.getRElementAt(i);
String reqID = modelElement.getRid();
IWDNodeElement newElement = node.createElement();
newElement.setAttributeValue("rD", rID);
newElement.setAttributeValue(
"org",
this.getOrgUnitName(modelElement.getOrgunitid()));
node.addElement(newElement);
}
BM
Hi Bharti,
Where are you executing your BAPI. Just write this code immediately after executing your BAPI and if you want this list to be populated only once then keep it under condition if(firtTime)in wdDoModifyView() method but your output model node should be populated either in the wdDoInit() of the view controller or the component controller.
Warm Regards,
Murtuza
You might try this:
Create a context value node "Items", cardinality 0:N, selection 0:1 with a supply function "supplyItems".
In the supply function, create the node elements that should appear in the dropdown-list.
void supplyItems(IItemsNode node, ...)
{
for (int i = 0; i < wdContext.nodeR().size(); ++i)
{
IRElement e = wdContext.nodeR().getRElementAt(i);
IItemsElement item = node.createItemsElement();
node.addElement(item);
item.setRD(e.getRid());
item.setOrg(getOrgUnitName(e.getOrgunitid()));
}
node.setLeadSelection(IWDNode.NO_SELECTION);
}
At the event handler that calls the BAPI and changes the model node content, just call wdContext.nodeItems().invalidate() to trigger the supply function and will the items with the updated values from the model.
(You might also give your context nodes and attributes more useful names)
Armin
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.