Regarding 0.5.1 and thanks. [message #892810] |
Fri, 29 June 2012 19:41 |
John Bradley Messages: 3 Registered: June 2012 |
Junior Member |
|
|
I just wanted to convey my thanks for this project. In less than a week I was able to implement a fully functional license manager with a JSON based resource (with some rest communication). The forms worked well in every situation I used them and any functionality I wasn't able to achieve with the already created annotations, I could easily implement with various listeners/services.
For example the one that comes to mind is having a field mirror the value of another field under certain circumstances (attached by a listener on the property you would like to monitor):
private static final class ValueCloneListener extends FilteredListener<PropertyEvent> {
private ValueProperty watchedProperty;
private ValueProperty cloneToProperty;
public ValueCloneListener(ValueProperty watchedProperty, ValueProperty cloneToProperty) {
this.watchedProperty = watchedProperty;
this.cloneToProperty = cloneToProperty;
}
public void handleTypedEvent(PropertyEvent event) {
IModelElement element = event.element();
if (element != null) {
cloneWatchedProperty(element);
}
}
public void cloneWatchedProperty(IModelElement element) {
element.write(cloneToProperty, element.read(watchedProperty).getText(false));
}
}
If there is a better way of doing this I'd be interested in knowing!
Another thing that I discovered (possibly incorrectly?) is that Actuator handlers dispose of themselves after they handle whether they should be enabled or not. This led me to just using regular menu items to handle enablement dynamically.
It's possible this has been mentioned elsewhere, but Page header text seems to not execute the sapphire EL like the image does. (Easily worked around)
Amazing job, fun to work with and allowed me to finish this project quicker than I had planned.
[Updated on: Fri, 29 June 2012 19:48] Report message to a moderator
|
|
|
Re: Regarding 0.5.1 and thanks. [message #892874 is a reply to message #892810] |
Sun, 01 July 2012 01:19 |
Greg Amerson Messages: 119 Registered: March 2010 |
Senior Member |
|
|
John Bradley wrote on Fri, 29 June 2012 15:41
If there is a better way of doing this I'd be interested in knowing!
Nothing comes to my mind that would work better. Konstantin or another commiter may have a better suggestion.
John Bradley wrote on Fri, 29 June 2012 15:41
Another thing that I discovered (possibly incorrectly?) is that Actuator handlers dispose of themselves after they handle whether they should be enabled or not. This led me to just using regular menu items to handle enablement dynamically.
That sounds like a bug if the handlers are being disposed after enablement check, perhaps you should open a bug?
John Bradley wrote on Fri, 29 June 2012 15:41
It's possible this has been mentioned elsewhere, but Page header text seems to not execute the sapphire EL like the image does. (Easily worked around)
Page header text definitely should respond to EL, if it isn't in the 0.5.1 release, please open a bug.
John Bradley wrote on Fri, 29 June 2012 15:41
Amazing job, fun to work with and allowed me to finish this project quicker than I had planned.
I share your sentiments, sapphire takes the drudgery out of building Eclipse UIs
|
|
|
Re: Regarding 0.5.1 and thanks. [message #893112 is a reply to message #892810] |
Mon, 02 July 2012 16:41 |
Konstantin Komissarchik Messages: 1077 Registered: July 2009 |
Senior Member |
|
|
Quote:I just wanted to convey my thanks for this project. In less than a week I was able to implement a fully functional license manager with a JSON based resource (with some rest communication).
Thanks! Always good to hear from new adopters, especially when they have such a good experience with Sapphire. Increasing the adoption is very important for long-term health of the project, so help us spread the word where you can.
You may also want to put yourself on the Sapphire users map on Ohloh.
http://www.ohloh.net/p/sapphire
http://www.ohloh.net/p/sapphire/map
Quote:For example the one that comes to mind is having a field mirror the value of another field under certain circumstances (attached by a listener on the property you would like to monitor):
If there is a better way of doing this I'd be interested in knowing!
I'd have to have more details about your property cloning scenario to be able to tell if there is a better approach than using a listener. In broad terms, there are three approaches: (a) use a listener at model level, (b) perform cloning at resource level, or (c) use a DefaultValueService.
Note that for the listener approach, you can attach listeners declaratively to the model with @Listeners annotation. To use this annotation, you do need a listener implementation with a zero-argument constructor.
Quote:Another thing that I discovered (possibly incorrectly?) is that Actuator handlers dispose of themselves after they handle whether they should be enabled or not. This led me to just using regular menu items to handle enablement dynamically.
Could you elaborate on this?
Quote:It's possible this has been mentioned elsewhere, but Page header text seems to not execute the sapphire EL like the image does. (Easily worked around)
Yes, this field is not EL-enabled right now, but it would clearly be useful. Please open an enhancement request.
[Updated on: Mon, 02 July 2012 16:43] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08818 seconds