on 10-09-2006 4:02 PM
Hi,
For the dropdown by Index in the table, there are two scenarios. in one scenario, i shouldnt defalt the dropdown value, in another case I should. So I want to set the properties initializeLeadSelection, and Selection properties dynamically in this following code:
int batchNodeSize = wdContext.nodeT_Inv_Batches().size();
ITable1_ResbElement row =wdContext.nodeTable1_Resb().getTable1_ResbElementAt(i);
for(int j=0;j<batchNodeSize;j++){
IBatchElement e = row.nodeBatch().createBatchElement(); e.setCharg(wdContext.nodeT_Inv_Batches()
.getT_Inv_BatchesElementAt(j).getCharg());
row.nodeBatch().addElement(e); }
Batch is the node for dropdown, to which I need to set the properties dynamically.
Thanks for help,
Raj.
Raj,
It will be quite problematic.
Actually, you have to create node Batch dynamically and specify its initializeLeadSelection property at this time. Next, you have to bind UI controls to it dynamically (in wdDoModifyView). Finally, you may access its elements only in generic way (no typed interface).
When you need to change its initializeLeadSelection property you must first call wdContext.getContext().reset() then re-create node again. Then populate it again and (probably) re-bind UI controls.
Unfortunately, it's impossible to easly switch initializeLeadSelection property
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Valery,
Thanks for prompt help. Let me ask you the question the other way, I want to display the dropdown with defalut value if batch field has a value(single record). If its null, I m executing RFC, and shouldnt display default value. In this case I need to let users select the value.
If I add blank value in one of drop-down by index table, will it solve my problem?. Do you have any other ideas. I appreciate your help.
Thanks,
Raj.
Raj,
Not sure I understand your question correctly (or completely but anyway...
1. Create DropDownByIndex that is bound to node (either model or value node) with initializeLeadSelection set to false.
2. Afterwards, execute RFC call. If you are using value node, copy returned entries. If single entry is returned, execute wdContext.node<NodeName>().setLeadSelection(0); If there are more then one entry, execute wdContext.node<NodeName>().setLeadSelection(IWDNode.NO_SELECTION).
Should work
Valery Silaev
SaM Solutions
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.