|
|
Re: Object in property view [message #503094 is a reply to message #502952] |
Thu, 10 December 2009 20:40 |
John S. Messages: 22 Registered: October 2009 |
Junior Member |
|
|
Hello,
Thanks, your suggestion works, but I still would like to inquire that there is any other solution? Actually the JFace GUIs for the end-users only can read (not edit) the metamodels (to be precise they only give us the model), so putting an interface in the model code would not be fit for the system requirements in most of the cases.
And for the sake of clarity, this is how I bind the string and the object values so far:
UpdateValueStrategy strategy = new UpdateValueStrategy();
strategy.setConverter(new Converter(Object.class, String.class) {
public String convert(final Object arg) {
if (arg != null) return arg.toString();
return "null";
}
});
ctx.bindValue(prop.observeDelayed(400, t), mProp.observeDetail(master), strategy, strategy);
So it only displays a long text.
Regards,
John
|
|
|
Powered by
FUDForum. Page generated in 0.25834 seconds