Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » ITableRidget - nested properties
ITableRidget - nested properties [message #14302] Wed, 15 October 2008 17:09 Go to next message
Stefan Leopold is currently offline Stefan LeopoldFriend
Messages: 6
Registered: July 2009
Junior Member
Having a Person object with a String("name") and a reference to another
Person object("mother"), is there currently a way to customize the Label for
the "mother" column - other then overriding toString() - for the Person
object?

I'm missing a way to "customize" the LabelProvider for a solution like it's
done in JFace-Databinding (e.g. see Snippet017TableViewerWithDerivedColumns)
or even better the possibility to provide columnPropertyNames like
"mother.name" - but that's a JFace thing :-)

Thx
Re: ITableRidget - nested properties [message #15162 is a reply to message #14302] Thu, 16 October 2008 06:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evolanakis.innoopract.com

Hi Stefan,

interesting idea. Our use case for the TableRidget is quite
straightforward and there is no special API to handle what you describe.

The only other way to do this without overriding toString() is to
implement something like getMothersName() { return mother.name } on the
Person class.

My gut feeling (I might be wrong) is that a generic solution from our
side would either be too limited to satisfy everybody or to difficult to
implement.

However, it should be simple to provide API that would allow you to
supply your own LabelProvider for specific columns. If you think that
approach would be useful for you, please file a bug so we can keep track
of this topic.

Kind regards,
Elias.

Stefan Leopold wrote:
> Having a Person object with a String("name") and a reference to another
> Person object("mother"), is there currently a way to customize the Label for
> the "mother" column - other then overriding toString() - for the Person
> object?
>
> I'm missing a way to "customize" the LabelProvider for a solution like it's
> done in JFace-Databinding (e.g. see Snippet017TableViewerWithDerivedColumns)
> or even better the possibility to provide columnPropertyNames like
> "mother.name" - but that's a JFace thing :-)
>
> Thx
>
>

--
---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
Re: ITableRidget - nested properties [message #15229 is a reply to message #15162] Thu, 16 October 2008 09:18 Go to previous message
Stefan Leopold is currently offline Stefan LeopoldFriend
Messages: 6
Registered: July 2009
Junior Member
bug reported, thx

"Elias Volanakis" <evolanakis@innoopract.com> schrieb im Newsbeitrag
news:gd6n17$88n$1@build.eclipse.org...
> Hi Stefan,
>
> interesting idea. Our use case for the TableRidget is quite
> straightforward and there is no special API to handle what you describe.
>
> The only other way to do this without overriding toString() is to
> implement something like getMothersName() { return mother.name } on the
> Person class.
>
> My gut feeling (I might be wrong) is that a generic solution from our side
> would either be too limited to satisfy everybody or to difficult to
> implement.
>
> However, it should be simple to provide API that would allow you to supply
> your own LabelProvider for specific columns. If you think that approach
> would be useful for you, please file a bug so we can keep track of this
> topic.
>
> Kind regards,
> Elias.
>
> Stefan Leopold wrote:
>> Having a Person object with a String("name") and a reference to another
>> Person object("mother"), is there currently a way to customize the Label
>> for
>> the "mother" column - other then overriding toString() - for the Person
>> object?
>>
>> I'm missing a way to "customize" the LabelProvider for a solution like
>> it's
>> done in JFace-Databinding (e.g. see
>> Snippet017TableViewerWithDerivedColumns)
>> or even better the possibility to provide columnPropertyNames like
>> "mother.name" - but that's a JFace thing :-)
>>
>> Thx
>>
>>
>
> --
> ---
> Elias Volanakis
> Innoopract, Inc.
> http://www.innoopract.com
Re: ITableRidget - nested properties [message #576329 is a reply to message #14302] Thu, 16 October 2008 06:29 Go to previous message
Elias Volanakis is currently offline Elias VolanakisFriend
Messages: 43
Registered: July 2009
Member
Hi Stefan,

interesting idea. Our use case for the TableRidget is quite
straightforward and there is no special API to handle what you describe.

The only other way to do this without overriding toString() is to
implement something like getMothersName() { return mother.name } on the
Person class.

My gut feeling (I might be wrong) is that a generic solution from our
side would either be too limited to satisfy everybody or to difficult to
implement.

However, it should be simple to provide API that would allow you to
supply your own LabelProvider for specific columns. If you think that
approach would be useful for you, please file a bug so we can keep track
of this topic.

Kind regards,
Elias.

Stefan Leopold wrote:
> Having a Person object with a String("name") and a reference to another
> Person object("mother"), is there currently a way to customize the Label for
> the "mother" column - other then overriding toString() - for the Person
> object?
>
> I'm missing a way to "customize" the LabelProvider for a solution like it's
> done in JFace-Databinding (e.g. see Snippet017TableViewerWithDerivedColumns)
> or even better the possibility to provide columnPropertyNames like
> "mother.name" - but that's a JFace thing :-)
>
> Thx
>
>

--
---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
Re: ITableRidget - nested properties [message #576364 is a reply to message #15162] Thu, 16 October 2008 09:18 Go to previous message
Stefan Leopold is currently offline Stefan LeopoldFriend
Messages: 6
Registered: July 2009
Junior Member
bug reported, thx

"Elias Volanakis" <evolanakis@innoopract.com> schrieb im Newsbeitrag
news:gd6n17$88n$1@build.eclipse.org...
> Hi Stefan,
>
> interesting idea. Our use case for the TableRidget is quite
> straightforward and there is no special API to handle what you describe.
>
> The only other way to do this without overriding toString() is to
> implement something like getMothersName() { return mother.name } on the
> Person class.
>
> My gut feeling (I might be wrong) is that a generic solution from our side
> would either be too limited to satisfy everybody or to difficult to
> implement.
>
> However, it should be simple to provide API that would allow you to supply
> your own LabelProvider for specific columns. If you think that approach
> would be useful for you, please file a bug so we can keep track of this
> topic.
>
> Kind regards,
> Elias.
>
> Stefan Leopold wrote:
>> Having a Person object with a String("name") and a reference to another
>> Person object("mother"), is there currently a way to customize the Label
>> for
>> the "mother" column - other then overriding toString() - for the Person
>> object?
>>
>> I'm missing a way to "customize" the LabelProvider for a solution like
>> it's
>> done in JFace-Databinding (e.g. see
>> Snippet017TableViewerWithDerivedColumns)
>> or even better the possibility to provide columnPropertyNames like
>> "mother.name" - but that's a JFace thing :-)
>>
>> Thx
>>
>>
>
> --
> ---
> Elias Volanakis
> Innoopract, Inc.
> http://www.innoopract.com
Previous Topic:ITableRidget - nested properties
Next Topic:UI Validation
Goto Forum:
  


Current Time: Tue Mar 19 02:12:13 GMT 2024

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

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

Back to the top