yet a new Eclipse Scout question from me:
In my Scout Application which is roughly based on the template "Outline Tree and Table Form" I managed to add new instances of a (search)form with a click on a node. My form's display properties are configured like this:
@Override
protected int getConfiguredDisplayHint() { return DISPLAY_HINT_VIEW; }
@Override
protected String getConfiguredDisplayViewId() { return VIEW_ID_PAGE_DETAIL; }
I'm not adding the forms to pages with the built-in methods(e.g. setDetailForm(IForm form)), but I set them as a new attribute to the pages and start them via their FormHandler. In this way I achieve that the Scout renderer tabs the forms next to each other and this is exactly what I want. Adding them as forms to the page causes the renderer to close the other forms whenever a page is activated, so only one form is displayed at one time.
My problems with this implementation are:
- Reactivation of the tabs is only possible in the RAP client. For the RAP client it is enough to call the activate() method of the form to reactivate and focus the corresponding tab.
On the other hand the SWT client (which I depend on) doesn't seem to care at all about the activate() call and therefore does not reactivate the page.
So I'm searching for a safe and easy way to persuade the SWT renderer of
- tabbing the forms next to each other preferably without the use of a Scout TabField. As described above, this is already working, but I'm not sure if this is the recommended way.
- reactivate the tabs on a NodeClick as the RAP client already does
- Receive events when clicking on the tab closing the tab (X-button in SWT, no button in RAP -.-), or whatever. I think this question is bit broader as it is a general problem in Scout to step into product-specific processes which are not part of the abstract programming model of Scout. Nevertheless, it would be nice to process those event and others out of the global client without tweaking the specific rendering products.
A screenshot of my program's UI to make things easier to follow:
In the screenshot the fifth form is activated as a view and the corresponding node in the outline tree on the left is also marked. As you see, there are multiple forms added which all belong to a node in the outline tree. When I click a node in the tree, I want the corresponding form to be activated and focuse if it hasn't been openend before. Apart from that the tabs should stay the same. I don't want to reinitialize the forms that already exist.
I'm using Scout Version 5.0