on 07-31-2007 8:52 AM
Hi,
We have a requirement to display the current element is chanegd or not. IF it is changed we need to display the message. I have the node structure as
ABC - Parent node
->def - Chil node1
->name1 - Attribute1
->name2 - Attribute2
->fgi - Child node2
->name1 - Attribute1
->name2 - Attribute2
->abcname1 - Attribute1
->abcname2 - Attribute2
For the parent node I am able to display the message. Here is the code for the parent node
wdContext.nodeABC().currentABCElement ().isChangedByClient().
My question is how to get the message for the child node is it changed or not?
Regards
Suresh
Hi,
Can you iterate the child node with code like this?
boolean tf = false;
for (int i = 0; i < wdContext.nodeChild().size(); i++) {
tf = tf || wdContext.nodeChild().getChildElementAt(i).getChanged();
}
tf will be the end result if this child node has been changed.
yung siu wai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your quick response, I have already done like your code. That is ok for parent node but how to get is child node is changed or not?
My context structure is like
Parent node ABC
Attributes for Parent node ABC --> attr1, attr2
Child nodes for ABC are -> chld1 and chld2
Attributes for child1 -> child1attr1, child1attr2
Attributes for child2 -> child2attr1, child2attr2
You probably want to know if some attributes of some element of some child node are changed.
So, iterate all elements of your ABC node
nABC = wdContext.nodeABC();
for ( int i = 0; i < nABC.size(); i++ )
{
elABC = nABC.getABCElementAt( i );
// iterate all elements of this subnode
nChld1 = elABC.nodeChld1();
for ( int i1 = 0; i1 < nChld1.size(); i1++ )
{
elChld1 = nChld1.getElementAt( i1 );
// check if it is changed
}
nChld2 = elABC.nodeChld2();
for ( int i2 = 0; i2 < nChld2.size(); i2++ )
{
elChld2 = nChld2.getElementAt( i2 );
// check if it is changed
}
}
I have the collection of records displayed in tableview, I can edit the records in tableview. For that I have used childnode for dropdown UI element, I have changed my current record when I navigate to next record without save the message has to displayed in the dialog box. I am able to do with the parent node, but for child node I am facing the problem.
I want to know the status of the child node is changed or not. I want to display the message if the value is changed.
Regards
Suresh
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.