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.
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.
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.