Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [Databinding] How to observe sub-element of an ObservableList(Databinding ObservableList)
[Databinding] How to observe sub-element of an ObservableList [message #559172] Wed, 15 September 2010 20:18 Go to next message
chengdong is currently offline chengdongFriend
Messages: 17
Registered: July 2009
Junior Member
Hi, all:

This may be a simple problem, but I could not figure out how to solve it. Can anyone shed some light on? Thanks.


Problem:
Given the olist below, I want to observe the 3rd P's name changes, how can I do that?

class P {
  String name;
  public P(String name){
    this.name=name;
  }
}

List<P> plist=new ArrayList<P>(10);
for(int i=0;i<10;i++){
  plist.add(new P("p"+i));
}

ObservableList olist=new WritableList(plist,P.class);



I understand by using Properties.observeEach(), I could observe each P's name change. But here I only need observe 3rd P.
Re: [Databinding] How to observe sub-element of an ObservableList [message #559179 is a reply to message #559172] Wed, 15 September 2010 20:42 Go to previous message
chengdong is currently offline chengdongFriend
Messages: 17
Registered: July 2009
Junior Member
found similar request from https://bugs.eclipse.org/bugs/show_bug.cgi?id=323799
Previous Topic:Preference dialog lazy page loading
Next Topic:JFace Text editor for a file without extension
Goto Forum:
  


Current Time: Thu Mar 28 21:03:15 GMT 2024

Powered by FUDForum. Page generated in 0.03423 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top