Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Databinding - How to set empty Text fields to null values inside the model?
Databinding - How to set empty Text fields to null values inside the model? [message #546014] Fri, 09 July 2010 21:32 Go to next message
Heiko Ahlig is currently offline Heiko AhligFriend
Messages: 62
Registered: July 2009
Member
Hi,
when I use are normal databinding from a text field to a model property
like a string value, all works fine when i write a value into the text
field.
If I delete the text of the text field, the databinding sets the value
of the model property to a ""-String.

Exists a possibility inside the databinding framework to set the value
of the proerty in this case to null or at emf classes to the default
value, or do I need everytime to set a converter from String to String
which converts empty strings to null values?

Thanks in advance

Heiko
Re: Databinding - How to set empty Text fields to null values inside the model? [message #546039 is a reply to message #546014] Sat, 10 July 2010 08:29 Go to previous message
budili Missing name is currently offline budili Missing nameFriend
Messages: 64
Registered: May 2010
Member
Hi,

the easiest way ist to set an own converter,
which converts the empty String in null and vice versa.
Previous Topic:Problem with JFace GraphViewer in RCP view and commands
Next Topic:Contents of ComboViewer bigger than its size
Goto Forum:
  


Current Time: Fri Sep 20 15:27:47 GMT 2024

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

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

Back to the top