Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 24/09/2009 08:05:47
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
Hi,
I use a fixgrid with treenode, now I want to change a field in the top node, after changing the text in a childnode. I set the flush property in the field of the childnode to true, a round trip is executed, but the field in the top node doesn't get updatet. I override the get Methode of the field for the top node like this:
public String getField() {
if(topNode) {
return (MyItem)getParent.getChilds().get(index).field;
}
return field;
}
Field is the property I want to get updatet automatically in the top node, when the field gets changed in the relevant childnode (=>index)?
I tried use an ActionListener for the t:field but the method doesn't trigger for event flush?
regards
Markus
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 25/09/2009 07:29:34
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5538
Offline
|
Hi,
before digging too much into the problem:
Do you create your Tree-binding, with "changeIndexIsSUpported=true"?
(Constructor: FIXGRIDTreeBinding(FIXGRIDTreeItem rootNode,boolean changeIndexIsSupported)). If so then you need to explicitly tell the grid about changes in an item.
(The default is "false", so this is just to maker sure we are not searching into the wrong direction).
If "false": hmmm, this must (I better say: should) be somewhere inside your program. Could you build up a mini tree and reproduce with this one?
Björn
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 25/09/2009 07:59:19
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
ok, I've set this to true, my fault. I'll try without parameter
regards
Markus
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 25/09/2009 08:09:32
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5538
Offline
|
Hi.
the "true" means that the gird items are not permanently checked for update with every request round trip: in each rountrip all properties taht are referenced from the page via epxressions are scanned for updates. IN case of grids this means sbvisibleamount*columns*property-references get-access-calls.
So you can tell via the changeIndex-usage that the List-Binding is only checked in case of new items etc. - or if you explicitly tell an item, that it was updated. You do so by calling: gridItem.getChangeIndex().indicateChange().
Björn
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 25/09/2009 09:09:46
|
mreich
Power User
![[Avatar]](/forum/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 30/01/2009 08:34:23
Messages: 750
Offline
|
Great to know, this opens a new dimension for my complex grid handling
By the way I would have one or two other questions regarding methods / properties of grids, should I post separatly or add to this post?
Markus
|
|
![](/forum/templates/default/images/spacer.gif) |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 25/09/2009 09:13:00
|
CaptainCasa
Power User
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 21/11/2007 12:23:06
Messages: 5538
Offline
|
Please open up new posts - so that each post covers one separate issue. Maybe more complex for you, but then it's easier for us to check if a certain post is answered or not - Thanks!
Björn
|
Björn Müller, CaptainCasa GmbH |
|
![](/forum/templates/default/images/spacer.gif) |
|