Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » opening multiple editors(opening multiple editors in one view)
opening multiple editors [message #757701] Mon, 21 November 2011 09:56 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member

I have an outline and a table page. Default behaviour is when I then want to add or modify an element from the table view, the form is opened as modal dialog.

What I try to do is instead is not to open a modal dialog but open the form in an other view. There is a tuturial about this and it works OK.

Now I like to open multiple editors. But when another element from the list is selected, nothing happens. In the console there is a Message:

!MESSAGE org.eclipse.scout.rt.ui.swt.window.desktop.view.AbstractScoutView.showForm( The view 'ID=nl.rid.grammastudio6.ui.swt.views.EditorView' is already open. The form 'Zinnen (nl.rid.grammastudio6.client.ui.forms.ZinnenForm)' can not be opened!

I know how to do this in SWT (with the help of IEditorInput): Open multiple windows in a view. (and if the user selects the same record twice the same window is opened). In fact it is the same behaviour as the editor in Eclipse.

The question is, do I have to implement this myself or is this concept supported by Scout, and if yes, how should I do this.

Regards Bertin

Re: opening multiple editors [message #757772 is a reply to message #757701] Mon, 21 November 2011 15:31 Go to previous message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 183
Registered: March 2010
Senior Member
Hi Bertin

Try setting allowMultiple at your view to true. This makes sure a secondaryViewId is generated in order to distinguish the views. This should solve your problem.

Now if you want to open/activate the same view when the same record is selected you have modify your ZinnenForm a little. You need to start your form in exclusive mode and compute an exclusive key (typically the primary key of your entity) which distinguishes the records.

public class ViewHandler extends AbstractFormHandler {

    protected void execLoad() throws ProcessingException {
      //open form code

    protected boolean getConfiguredOpenExclusive() {
      return true;

  public void startView() throws ProcessingException {
    startInternalExclusive(new DesktopForm.ViewHandler());

  public Object computeExclusiveKey() throws ProcessingException {
    return RECORD_ID;


Please notice: You need to set getConfiguredExclusive to true AND start the handler by using startInternalEXCLUSIVE.

Btw: I've added this additional information to the howto:

Have fun Smile


[Updated on: Mon, 21 November 2011 16:42]

Report message to a moderator

Previous Topic:sub-icon (with a suffix)
Next Topic:Scout @ Eclipse Con 2012
Goto Forum:

Current Time: Fri Apr 10 10:54:08 GMT 2020

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

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

Back to the top