Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Generic Form Editor Pages
Generic Form Editor Pages [message #733423] Tue, 04 October 2011 17:21 Go to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Hey all,

I was wondering if there were any plans to support generic form editor pages, in addition to the existing master/details editor pages.

I have started working on something like this, but it is very crude at the moment. I've created a model element representing the page, which contains any number of sections. This is working OK, but I suspect I will have some issues with respect to how the model is incorporated into sections, e.g.: the section applies to a model element other than the root; the section's root element is based on the current selection in another section; the required element does not exist; etc.

As a newb, I'm not sure of the best way to handle these issues. Any advice would be greatly appreciated.

Best,
Rob
Re: Generic Form Editor Pages [message #733450 is a reply to message #733423] Tue, 04 October 2011 18:47 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
> I was wondering if there were any plans to support generic form
> editor pages, in addition to the existing master/details editor pages.

It's on the broad "stuff to support in the future" list, but we have not implemented this feature as no adopter so far has come forward stating an immediate need for this. Your apparent need for this can serve as a driver for getting this feature into the framework.

Please open an enhancement request in bugzilla. It sounds like you've created at least an initial patch to implement this feature. You can attach your patch to the enhancement request and we can iterate further in bugzilla.

> the section applies to a model element other than the root

The "with" construct can be used to traverse down through ElementProperty and/or ImpliedElementProperty tree. It can appear anywhere in a form definition, such as at the root of section content.

> the section's root element is based on the current selection in another section

It's not quite the same, but the page book construct can be used for constructing micro master-detail relationships, such as a table with a form beneath it changing based on selection.

> the required element does not exist

This is either a use case for the with construct or perhaps for the section's visible-when condition.

- Konstantin
Re: Generic Form Editor Pages [message #733469 is a reply to message #733450] Tue, 04 October 2011 19:58 Go to previous messageGo to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Hey Konstantin,

Thank you for the response. It sounds like I just need to investigate the "with" constructs.

Regarding missing elements, I'm looking at adding a way to include some sort of create functionality into the form section. Something like this may already be supported through existing constructs. An example use case: a section supports editing a child element, which is optional. The section controls should be disabled or hidden if the element does not exist, but also allow for the creation of the element in that case. When the element is created, the controls should become enabled or visible.

I'll create a bugzilla entry and attach the code, once I get a little further along.

Thanks again,
Rob
Re: Generic Form Editor Pages [message #733680 is a reply to message #733469] Wed, 05 October 2011 12:14 Go to previous messageGo to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
Hi,

Quote:

The "with" construct can be used to traverse down through ElementProperty and/or ImpliedElementProperty tree. It can appear anywhere in a form definition, such as at the root of section content.


I'm using the "with" construct, too. However I was only able to use it with the "ImpliedElementProperty" annotation. Is there any hint for using it with normal ElementProperty annotations?

cheers,
Muki
Re: Generic Form Editor Pages [message #733754 is a reply to message #733680] Wed, 05 October 2011 15:01 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Quote:
Regarding missing elements, I'm looking at adding a way to include some sort of create functionality into the form section. Something like this may already be supported through existing constructs. An example use case: a section supports editing a child element, which is optional. The section controls should be disabled or hidden if the element does not exist, but also allow for the creation of the element in that case. When the element is created, the controls should become enabled or visible.


The with construct handles this scenario. When using a regular element property, it will render controls for creating/deleting the element in addition to whatever property editors you wish to show when the element is present. The controlling controls will differ depending on your element property. If it has exactly one possible element type, it will be a checkbox. If it has a few possible element types, it will be a group of radio buttons. If it has many possible element types, it will be a drop-down list.

See presentation of Assistant property in the contacts sample (ContactsDatabaseEditor.sdef).

Quote:
I'm using the "with" construct, too. However I was only able to use it with the "ImpliedElementProperty" annotation. Is there any hint for using it with normal ElementProperty annotations?


When using the with construct with regular element properties, you have to create a page for every element type that could be contained in that property. See the above referenced sample. With implied element properties, you commonly utilize the default panel. With regular element properties, the default panel is for the case when the element property holds no element.

- Konstantin

Re: Generic Form Editor Pages [message #734734 is a reply to message #733754] Sun, 09 October 2011 16:27 Go to previous messageGo to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Hey Konstantin,

I've created a BZ entry for this feature and attached a patch with the code I've been testing with. It would be great if this could get into the 0.3.1 release. Please ping me if you need anything from me.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=360362

Best,
Rob
Re: Generic Form Editor Pages [message #734737 is a reply to message #734734] Sun, 09 October 2011 17:00 Go to previous messageGo to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Just noticed that 0.3.1 has been released. What are the plans for the next release (date, version)?

Thanks,
Rob
Re: Generic Form Editor Pages [message #734738 is a reply to message #733423] Sun, 09 October 2011 17:09 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
you can find the plan here http://www.eclipse.org/projects/project.php?id=technology.sapphire
Re: Generic Form Editor Pages [message #734986 is a reply to message #734738] Mon, 10 October 2011 15:12 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Hi Rob,

Thanks for the patch. I will review it shortly. As you've discovered 0.3.1 has already been released. The next scheduled release is 0.4 in December. Does that work ok with your product plans?

- Konstantin
Re: Generic Form Editor Pages [message #734992 is a reply to message #734986] Mon, 10 October 2011 15:29 Go to previous messageGo to next message
Rob Cernich is currently offline Rob CernichFriend
Messages: 40
Registered: September 2011
Member
Hey Konstantin,

That is fine. As I moved further along, I found the new PossibleValuesService greatly simplifies some things for me, so I'm 0.4 convert. It also gives me time to refine and test the API.

Thanks!

Rob
Re: Generic Form Editor Pages [message #754332 is a reply to message #734992] Wed, 02 November 2011 08:21 Go to previous message
Greg Amerson is currently offline Greg AmersonFriend
Messages: 119
Registered: March 2010
Senior Member
Hey Konstantin,

We are expanding our use of sapphire to include several properties file editors so the ability to have a form editor page without the master-detail layout would be nice. I've added myself to CC for the enhancement request. Thanks Rob for starting this thread.

[Updated on: Wed, 02 November 2011 08:21]

Report message to a moderator

Previous Topic:Sapphire Seralization
Next Topic:Form Editor
Goto Forum:
  


Current Time: Thu Mar 28 08:50:15 GMT 2024

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

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

Back to the top