Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » ReferenceValue target object property in EL
ReferenceValue target object property in EL [message #1031133] Mon, 01 April 2013 04:21 Go to next message
bibi too is currently offline bibi too
Messages: 1
Registered: April 2013
Junior Member
May I use expression on label to access ReferenceValue target object property?
Like SqlSchemaEditor example, ForeignKey has a ReferencedTable:
    // *** ReferencedTable ***
    
    @Reference( target = Table.class )
    @Service( impl = TableReferenceService.class )
    @Required
    @PossibleValues( property = "/Tables/Name" )
    @XmlBinding( path = "referenced-table" )

    ValueProperty PROP_REFERENCED_TABLE = new ValueProperty( TYPE, "ReferencedTable" );

    ReferenceValue<String, Table> getReferencedTable();
    void setReferencedTable( String value );


In property view I wan't to see the reference table property like that:
<label>${referencedTable.target.otherTableProperty}</label>

Any help will be greatly appreciated!
Re: ReferenceValue target object property in EL [message #1032155 is a reply to message #1031133] Tue, 02 April 2013 12:30 Go to previous message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 934
Registered: July 2009
Senior Member
There is no existing facility to do this. Please open an enhancement request. In the meantime, you should be able to write a custom EL function to accomplish this. See ItemImageFunction in the samples for an example on how to write a function. Note that you will need to listen on ReferenceService in your function to detect when reference target changes.

- Konstantin
Previous Topic:Recursive Node Factory
Next Topic:ValueProperty bind to XML text
Goto Forum:
  


Current Time: Tue Jul 22 03:24:27 EDT 2014

Powered by FUDForum. Page generated in 0.03407 seconds