Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Page and form lifecycles
Page and form lifecycles [message #987260] Sun, 25 November 2012 09:53 Go to next message
Stathis Alexopoulos is currently offline Stathis AlexopoulosFriend
Messages: 42
Registered: September 2010
Member
Hello,

I have created a Scout project using the outline template and i added several pages.
Some of the pages are not following the paradigm of detailForm and searchForm. Instead of it i have created my own forms and adding them to the page as follows

  protected void execPageActivated() throws ProcessingException {
    itemForm = new RecomsItemTableForm();
    itemForm.startModify();

    drForm = new RecomsDoctorTableForm();
    drForm.startModify();

    hintForm = new RecomsHintTableForm();
    hintForm.startModify();


Obviously this is very simplistic, because it does not maintain a life cycle for the forms, and subsequently when the user navigates from one page to other those forms remaining open and the interface cluttering.

I would really appreciate if someone could give me a hint about the lifecycle of page and if it is possible a best practice to show and hide the forms.

Best regards

Re: Page and form lifecycles [message #987270 is a reply to message #987260] Sun, 25 November 2012 13:38 Go to previous messageGo to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi,

In your example you created and opened 3 forms in one event which might be very confusing for the user.

What I often have in my application are tablePages with data. For example a list of persons. If the user selects a particular row in the table (double click), the execRowAction method is called. In this method you then implement something like

PersonForm form = new PersonForm ();
form.setPersonNr(getTable().getIdColumn().getValue(getTable().getSelectedRow()));
form.startModify();
form.waitFor();

So in this code you 1: create the form 2: set the id of the person so the form knows which data to load 3: start the form 4: wait for the form to close.

I hope this is what you needed, if I did not understand the question let me know.

Regards Bertin




Re: Page and form lifecycles [message #987337 is a reply to message #987270] Mon, 26 November 2012 08:36 Go to previous messageGo to next message
Stathis Alexopoulos is currently offline Stathis AlexopoulosFriend
Messages: 42
Registered: September 2010
Member
Hello Bertin,

Thanks for your time, but the interface as it is, it fits perfectly for the user needs.

Ofcourse i could implement it with one form and plenty splitboxes, but then i would miss all of the RCP functionality.

So, i followed the howto Open a Form in a View and implemented exactly what the user needs. Unfortunatelly this howto deals only with RCP details for form placement. It does not deal with the reaction with different pages.

My main problem is that i dont know what are the events produced when a page is displayed and hiding and what is the subsequent proposed management for forms.

I tried to investigate the sources of AbstractPageWithTable and how is managing the m_detailForm and m_searchForm, but my knowledge for the event system of Scout is far by perfect.
Re: Page and form lifecycles [message #987382 is a reply to message #987337] Mon, 26 November 2012 11:34 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Have you tried execPageActivated() / execPageDeactivated() [=> from forum: Form in Page possible?]

We try to collect know how on this page:
http://wiki.eclipse.org/Scout/Concepts/Page_Detail_Form

Tell us if you miss something.

Does this help you, or are you trying to do something else?

.
Re: Page and form lifecycles [message #987499 is a reply to message #987382] Mon, 26 November 2012 21:22 Go to previous message
Stathis Alexopoulos is currently offline Stathis AlexopoulosFriend
Messages: 42
Registered: September 2010
Member
Hello Jeremy,

Yes, this is what i was looking for. It seems that my searching skills are very poor.

Thank you very much for one more time.
Previous Topic:Mapping the JDBC data type NUMERIC to a Java data type in Scout
Next Topic:Annotation @ConfigPropertyValue
Goto Forum:
  


Current Time: Fri Apr 19 05:20:40 GMT 2024

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

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

Back to the top