Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » ImpliedElementProperty vs ElementProperty
ImpliedElementProperty vs ElementProperty [message #734142] Thu, 06 October 2011 20:35 Go to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
What exactly is the difference between these two? When would I use one over the other?
Re: ImpliedElementProperty vs ElementProperty [message #734187 is a reply to message #734142] Fri, 07 October 2011 00:24 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 952
Registered: July 2009
Senior Member
Both ImpliedElementProperty and ElementProperty hold a child model element. The difference is that in the implied case, the child element is always there. It cannot be created or deleted.

Use ImpliedElementProperty if the child element's purpose is to organize related properties and no semantic meaning is attached to its existence/absence. Use ElementProperty if there is semantic meaning in child element's existence/absence.

When ImpliedElementProperty is used in UI, there is no visible indication of its presence to the user. When ElementProperty is used in UI, the user will be presented with controls to create/delete the element. Also, ElementProperty can be heterogeneous, so creation UI will allow the user to select the type of the child element to create.

See Address and Assistant properties in the contacts sample. In that sample, the assumption is that everyone has an address, so Address is an ImpliedElementProperty. Since not everyone has an assistant, Assistant is an ElementProperty. Play around with this sample and you should get pretty good idea of how the two types of element properties differ.

- Konstantin
Re: ImpliedElementProperty vs ElementProperty [message #734494 is a reply to message #734187] Sat, 08 October 2011 01:52 Go to previous message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Thanks Konstantin!
Previous Topic:Custom TableLabelService
Next Topic:Announcing Sapphire 0.3.1 Release
Goto Forum:
  


Current Time: Sat Nov 29 01:47:07 GMT 2014

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

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