on 12-20-2007 10:00 PM
A view context is mapped to custom controller context.
At the view context(mapped to table view), when i add an element to the node,
the node is added to the end and the last element is also overwritten with the new one.
The lead selection is at the last element.
-
Before add
- at = 0Daniel Bortz
- at = 1T&E Administrator
after add ++++++
- at = 0 Daniel Bortz
- at = 1 Deborah Holmes
- at = 2 Deborah Holmes
sizeApprList, leadApprList : 2, 1
-
NOTE: the sizeApprList above should be 3 NOT 2
I create a new element and add it to the existing node.
Should I have to bind this new element.
Here is the code -
Zte_Apr_Agents apprvrModel = wdContext.currentApprovers_TabElement().modelObject();
IApprovers_TabElement newEtUserElem = wdContext.nodeApprovers_Tab().createApprovers_TabElement(apprvrModel);
newEtUserElem.setAttributeValue("Agent_Name", "Deborah Holmes" ) ;
. . . . .
int sizeApprList = wdContext.nodeApprovers_Tab().size();
wdContext.nodeApprovers_Tab().addElement(sizeApprList, newEtUserElem);
-
Hi,
Just modify this line of code:
wdContext.nodeApprovers_Tab().addElement(sizeApprList, newEtUserElem);
to
wdContext.nodeApprovers_Tab().addElement(newEtUserElem);
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you are adding a row to a table on a click of a button then write this code on the event for a button.
IPrivate<viewname>.I<nodename>Element ele = wdContext.node<nodename>().create<nodename>Element();
ele.set<attribute>(<value>);
wdContext.node<nodename>().addElement(ele);
I have tried same locally on my machine and it is working fine for me.
Regards,
Murtuza
User | Count |
---|---|
93 | |
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.