Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Hierarchical structur of ChildPages(Problems with ContextMenus)
Hierarchical structur of ChildPages [message #1066395] Tue, 02 July 2013 12:22 Go to next message
Mirjam B. is currently offline Mirjam B.Friend
Messages: 8
Registered: June 2013
Junior Member
Hello,

I want to build a hierarchical structure in my Application. Therefor I have a root-FolderTablePage with a table of folders and files.
For each folder I'm adding a FolderTablePage as childPage, for each file I'm adding another Page.

Now I'm having conflicts with the context menus of the FolderTablePage. Sometimes they are displayed once, sometimes twice and sometimes there is no menue displayed at all.

Do you have any idea why this happens?

Re: Hierarchical structur of ChildPages [message #1066544 is a reply to message #1066395] Wed, 03 July 2013 06:03 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 796
Registered: October 2011
Senior Member
Can you provide more details?

Have you on your FolderTablePage some menus for the selection (like edit/delete menu) and on the empty space (like create or new menu)?
Where did you see multiple menu on the table? when a row is selected? or on the page-tree?
Re: Hierarchical structur of ChildPages [message #1066576 is a reply to message #1066544] Wed, 03 July 2013 08:57 Go to previous messageGo to next message
Mirjam B. is currently offline Mirjam B.Friend
Messages: 8
Registered: June 2013
Junior Member
Okay, I realized the problem. On my FolderTablePage I have multiple menus.


  • NewFileMenu [Single Selection and Empty Space Action]
  • NewFolderMenu [SingleSelection and Empty Space Action]


All the rest of them are Single Selection Action menus (Modify, Delete...) and don't make any problems.

The menus above are displayed twice on the page-tree because it's an empty space AND a single selection action, right? On the table they're displayed only once.

index.php/fa/15460/0/
  • Attachment: Tree.png
    (Size: 39.76KB, Downloaded 103 times)
Re: Hierarchical structur of ChildPages [message #1066579 is a reply to message #1066576] Wed, 03 July 2013 09:15 Go to previous message
Mirjam B. is currently offline Mirjam B.Friend
Messages: 8
Registered: June 2013
Junior Member
I solved the problem by adding a subclass of my FolerTablePage and overwriting the NewFile and NewFolder-Menu. Worked for me Smile

public class SubFolderTablePage extends FolderTablePage {

	public TestFolderTablePage() {
		super();
	}

	@Override
	protected String getConfiguredTitle() {
		return TEXTS.get("SubFolderTablePage");
	}

	@Order(10.0)
	public class Table extends TestTable {

		@Order(10.0)
		@Replace
		public class NewFileInFolderMenu extends NewFileMenu {

			@Override
			protected boolean getConfiguredEmptySpaceAction() {
				return false;
			}
		}

		@Order(20.0)
		@Replace
		public class NewFolderInFolderMenu extends NewFolderMenu {

			@Override
			protected boolean getConfiguredEmptySpaceAction() {
				return false;
			}
		}
	}
}
Previous Topic:Scout and GEF
Next Topic:Creating "smart" permissions
Goto Forum:
  


Current Time: Thu Nov 27 05:54:35 GMT 2014

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

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