New Posts New Posts RSS Feed: EntityPropertyDescriptors
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EntityPropertyDescriptors

 Post Reply Post Reply
Author
kosgia View Drop Down
Newbie
Newbie
Avatar

Joined: 13-May-2010
Location: Greece
Posts: 13
Post Options Post Options   Quote kosgia Quote  Post ReplyReply Direct Link To This Post Topic: EntityPropertyDescriptors
    Posted: 02-Jun-2010 at 3:07am

Thank you Greg.

I will do that.
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 01-Jun-2010 at 8:36pm
The EntityPropertyDescriptors never gave you more than you get via <propname>EntityProperty.Name.  If you want the string for the nested property


     Order.Customer.CompanyName


of an OrderDetail entity, you'll have to build it up, e.g:


    OrderDetail.OrderEntityProperty.Name + "." + Order.CustomerEntityProperty.Name + "." +
       Customer.CompanyNameEntityProperty.Name


Back to Top
kosgia View Drop Down
Newbie
Newbie
Avatar

Joined: 13-May-2010
Location: Greece
Posts: 13
Post Options Post Options   Quote kosgia Quote  Post ReplyReply Direct Link To This Post Posted: 31-May-2010 at 2:23am

Sorry Greg, I didn’t mean getting just the string State.Name but the whole path string like: "HomeAddress.State".

For example if we had an employee object and we wanted to bind the state of his home address with a ui control we would use "HomeAddress.State"as a binding expression. I got this from developers guide: 

Nested Properties Text book examples always show binding to simple object properties like

FirstName. What about an Employee.Address.State.Abbreviation? You don’t

see that one often – for good reason. It doesn’t work.

Oh, it works some of the time. But never in grids, and the breakdowns are difficult

to predict.

The DevForce WinClient DataBinding collections take care of this important

problem.

In such cases I think the EntityPropertyDescriptors would get the whole string path of a nested property path, not just the property name. But as I said not a big issue. I', sure you had your reasons for discontinuing these classes.

Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 28-May-2010 at 11:31am
If you want the string name of the Name property of the State entity, use

     State.NameEntityProperty.Name

Nesting doesn't enter the picture: the string name of State.Name is the same no matter what the State entity's relationship is to something else.



Back to Top
kosgia View Drop Down
Newbie
Newbie
Avatar

Joined: 13-May-2010
Location: Greece
Posts: 13
Post Options Post Options   Quote kosgia Quote  Post ReplyReply Direct Link To This Post Posted: 27-May-2010 at 8:01am
That is fine with one level nested property paths. In case of more than one level like :
 
EntityPropertyDescriptors.Employee.HomeAddress.State.Name
 
can the same be acomplished?
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 26-May-2010 at 2:31pm

 

     Customer.CompanyNameEntityProperty.Name
 
gets you the string name of the Customer.CompanyName property.


Edited by GregD - 26-May-2010 at 2:32pm
Back to Top
kosgia View Drop Down
Newbie
Newbie
Avatar

Joined: 13-May-2010
Location: Greece
Posts: 13
Post Options Post Options   Quote kosgia Quote  Post ReplyReply Direct Link To This Post Posted: 26-May-2010 at 12:16pm

Well, i would like to avoid hard coding paths like "HomeAddress.State.Name" in some cases like DataBinding as described in Developers guide. Is there an alternative for doing this, a way to get nested property paths strings? Anyway, that's not a big issue. I just thought that something might be wrong with my installation and code generation as i have installed DevForce in Windows 7(64 bit).

Thanks,
Kostas
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 26-May-2010 at 11:05am
At some point we retired them altogether in DF2009. What is it you were trying to do?
Back to Top
kosgia View Drop Down
Newbie
Newbie
Avatar

Joined: 13-May-2010
Location: Greece
Posts: 13
Post Options Post Options   Quote kosgia Quote  Post ReplyReply Direct Link To This Post Posted: 25-May-2010 at 1:08am
Hi, i am using DevForce Object Mapper V5.2.6.0
Class EntityPropertyDescriptors is not generated by the object mapper.
 
In developer's guide 2009 i read the following:

EntityPropertyDescriptors are useful in databinding associated with Winform user interfaces. Their generation is

optional in DevForce WinClient Object Mapper, and should be turned off (as unnecessary) if you are not using

Winforms in your UI.

How can i turn on or off the generation of EntityPropertyDescriptors class?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down