on 08-26-2004 11:03 AM
Hi all,
I've a of MyElements and bind it to MyNode. Now I want to iterator over all bounded elements. Is it possible and when how?
Jürgen
I got it:
int anzahlIstzahlen = wdContext.nodeIstzahl().size();
for (int i = 0; i < anzahlIstzahlen; i++) {
IPrivateMonatsabschlussView.IIstzahlElement istzahl = wdContext.nodeIstzahl().getIstzahlElementAt(i);
istzahl.setAbzurechnen(true);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jürgen,
please have a look at the IWDNode API:
/**
* Returns the element at the given index.
* @param index the index of the element
* @return the element at the given index
* @throws IndexOutOfBoundsException if the node does not have such an element.
*/
IWDNodeElement getElementAt(int index);
/**
* Returns the size of the element list.
* @return the size of the element list
*/
int size();
/* so you can do something like: */
for (int ix = 0; ix < wdContext.node<NodeName>().size(); ix++) {
// For a view controller
IPrivate<ViewName>.I<NodeName>Element el = wdContext.node<NodeName>.get<NodeName>ElementAt(ix);
// For non view controller
IPublic<CtrlName>.I<NodeName>Element el = wdContext.node<NodeName>.get<NodeName>ElementAt(ix);
}
Hope that helps.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.