Persisting JTable changes to an event list

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Persisting JTable changes to an event list

Dave Pederson

I am using a basic event list of POJO objects to create a JTable (that has a text filterator and table format for the POJOs).  It there a way to make the resulting JTable editable so that when a row in the table is edited, the changes are persisted to the POJO that corresponds to that row?  I have been developing with the Glazed Lists 1.0 release.  Any insight into this issue is appreciated.

 

Thanks,

-Dave

--------------------------------------------------------------------------

Dave Pederson

Software Engineer

Nighthawk Radiology Services

223 N. Water St. Suite 200

Milwaukee, WI 53202

(414)-220-4295 x307 (work)

(414)-801-6707         (cell  )

[hidden email]

 

...and miles to go before I sleep...

--------------------------------------------------------------------------

 

CONFIDENTIALITY NOTICE:   This email, including any attachments, contains information from NightHawk Radiology Services, which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this email in error, please notify NightHawk Radiology Services immediately by forwarding message to [hidden email] and destroy all electronic and hard copies of the communication, including attachments.

 

Reply | Threaded
Open this post in threaded view
|

Re: Persisting JTable changes to an event list

James Lemieux
Hey Dave,
 
    If editability is what you need then you'll want to implement WritableTableFormat as opposed to just TableFormat.
 
    One other suggestion - if your POJOs can be updated in other areas of your application (i.e. outside of your JTable), then you might also want to consider adding ObservableElementList into your list pipeline. A screencast tutorial of ObservableElementList can be found here: http://www.publicobject.com/glazedlistsdeveloper
 
It basically removes a large part of the hassle of notifying your list that an element has been mutated so that views of that list can update themselves.
 
Happy Glazing,
 
James.

 
On 10/14/05, Dave Pederson <[hidden email]> wrote:

I am using a basic event list of POJO objects to create a JTable (that has a text filterator and table format for the POJOs).  It there a way to make the resulting JTable editable so that when a row in the table is edited, the changes are persisted to the POJO that corresponds to that row?  I have been developing with the Glazed Lists 1.0 release.  Any insight into this issue is appreciated.

 

Thanks,

-Dave

--------------------------------------------------------------------------

Dave Pederson

Software Engineer

Nighthawk Radiology Services

223 N. Water St. Suite 200

Milwaukee, WI 53202

(414)-220-4295 x307 (work)

(414)-801-6707         (cell  )

[hidden email]

 

...and miles to go before I sleep...

--------------------------------------------------------------------------

 

CONFIDENTIALITY NOTICE:   This email, including any attachments, contains information from NightHawk Radiology Services, which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this email in error, please notify NightHawk Radiology Services immediately by forwarding message to [hidden email] and destroy all electronic and hard copies of the communication, including attachments.