Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Binding controls to null-valued bean properties
Binding controls to null-valued bean properties [message #723576] Thu, 08 September 2011 20:59 Go to next message
Caleb  is currently offline Caleb Friend
Messages: 22
Registered: July 2009
Junior Member
I was wondering if it is possible to bind controls to beans that have only been initialized, so that their properties are all nulls (for example, null Strings).

When I try to do it right now, I get an NPE because the JFace tries to load the data from the model to the target widget. Is there a way to make it not do that, or at least handle nulls gracefully?

This is useful to me because I have a "New Order" window, and I use the same one to edit an existing order. In the new state, I just want to pass a newly instanitated Order object (it's a Hibernate persistent class that's also a bean) to the view the same way I pass a fully instantiated one for editing.
Re: Binding controls to null-valued bean properties [message #723853 is a reply to message #723576] Fri, 09 September 2011 17:03 Go to previous message
Caleb  is currently offline Caleb Friend
Messages: 22
Registered: July 2009
Junior Member
Ignore the post please, looks like this is already possible.
Previous Topic:How to open a modal MessageDialog from a ProgressMonitorDialog?
Next Topic:Very simple binding doesn't work
Goto Forum:
  


Current Time: Tue Apr 23 16:43:09 GMT 2024

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

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

Back to the top