MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
adrian.challinor
Post subject: Data binding  PostPosted: Dec 31, 2009 - 12:15 PM
Veteran Member
Veteran Member


Joined: Mar 25, 2005
Posts: 22

Does the data binding work in MyEclipse Matisse Builder (V8.0 installed on a Linux AMD64 using the All-In-One installer)?

I can bind to beans in NetBeans. That works fine. But in Eclipse, the binding does not work, the converters cannot be dragged on to the palette. In fact, I have to revert to writing my own action code - which seems to negate the whole purpose of the Matisse builder.

Or - is there any FAQ or support documentation on how to make this work?
 
 View user's profile Send private message  
Reply with quote Back to top
adrian.challinor
Post subject: RE: Data binding  PostPosted: Jan 12, 2010 - 07:44 AM
Veteran Member
Veteran Member


Joined: Mar 25, 2005
Posts: 22

I have managed to get basic textfield binding working, using a FORM bind to a class that contain the data (the trick is that the class containing the data must adhere strictly to being a bean).

But I am really stuck trying to get validatoes and converters linked to the form. Code that works under NetBeans does not work here. On NetBeans I would drag the validater and converters to "Other Components", but that does not work. So they can't be picked in the form. For example, a converter based on org.jdesktop.beansbinding.Converter that works on NetBeans won't work on ME 8.5M1. See below.


I am totally stuck trying to bind a combobox to an ENUM. Any clues on this?



package osiris.swing;

import org.jdesktop.beansbinding.Converter;

public class DoubleConverter extends Converter<Double, String> {
public String convertForward(Double arg) {
return String.valueOf(arg);
}

public Double convertReverse(String arg) {
Double value;
try {
value = (arg == null) ? 0 : Double.parseDouble(arg);
} catch (NumberFormatException ex) {
value = 0.0;
}
return value;
}
}
 
 View user's profile Send private message  
Reply with quote Back to top
adrian.challinor
Post subject: RE: Data binding  PostPosted: Jan 12, 2010 - 08:42 PM
Veteran Member
Veteran Member


Joined: Mar 25, 2005
Posts: 22

well, I am not sure what I did (apart from a quick reboot) but the combobox binding is working. If only I could get Validators working now!
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits