Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Delegated Implementation
Delegated Implementation [message #1159839] Mon, 28 October 2013 20:36 Go to next message
Paul Funyak is currently offline Paul FunyakFriend
Messages: 11
Registered: September 2013
Junior Member
Hi,

I have a simple value property defined as follows


ValueProperty PROP_FILE = new ValueProperty(TYPE, "File");

@DelegateImplementation(Functions.class)
Value<String> getFile();


Is is possible to delegate the implementation of the "getFile" method?
If I delegate this method, will Sapphire call the delegate method?

I've delegated other methods and they work well but I can't seem to delegate a getter method as expected.

Any advice would be appreciated.

Thanks,
Re: Delegated Implementation [message #1159927 is a reply to message #1159839] Mon, 28 October 2013 21:56 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
You cannot delegate implementation of property getters and setters. What are you trying to accomplish?
Re: Delegated Implementation [message #1160786 is a reply to message #1159927] Tue, 29 October 2013 10:55 Go to previous messageGo to next message
Paul Funyak is currently offline Paul FunyakFriend
Messages: 11
Registered: September 2013
Junior Member
I have a node factory that contains another node factory as a child node.
I want to access a property in the parent node factory from the child node factory.

Is this possible?

I believe one possible solution is to create a composite and include it in both factories but I not sure if this is the right way to go.
Re: Delegated Implementation [message #1161117 is a reply to message #1160786] Tue, 29 October 2013 15:42 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
You can certainly access parent properties from the context of a child element. In what context are you trying to specify a parent property? In sdef property editor? In Java code? In a Sapphire EL expression?
Re: Delegated Implementation [message #1161166 is a reply to message #1161117] Tue, 29 October 2013 16:21 Go to previous messageGo to next message
Paul Funyak is currently offline Paul FunyakFriend
Messages: 11
Registered: September 2013
Junior Member

I'm trying to do this in the sdef property editor.
Re: Delegated Implementation [message #1161173 is a reply to message #1161166] Tue, 29 October 2013 16:26 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
You can use path notation to reach properties in a parent or another ancestor element.

../../Something

[Updated on: Tue, 29 October 2013 16:29]

Report message to a moderator

Re: Delegated Implementation [message #1161222 is a reply to message #1161173] Tue, 29 October 2013 17:07 Go to previous messageGo to next message
Paul Funyak is currently offline Paul FunyakFriend
Messages: 11
Registered: September 2013
Junior Member
No Message Body
Re: Delegated Implementation [message #1161223 is a reply to message #1161222] Tue, 29 October 2013 17:08 Go to previous message
Paul Funyak is currently offline Paul FunyakFriend
Messages: 11
Registered: September 2013
Junior Member
Perfect... it worked... Thanks
Previous Topic:Questions on Drag-n-Drop in Forms
Next Topic:Issue with expression in 'visible when' of component
Goto Forum:
  


Current Time: Tue Mar 19 05:37:32 GMT 2024

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

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

Back to the top