|
|
|
Re: Switching between table pages [message #1062747 is a reply to message #1062151] |
Mon, 10 June 2013 15:23 |
Eclipse User |
|
|
|
Hi Shweta
Thank you for the request. I assume you are trying to activate a certain tablepage from a menu or similar. To do so have a look at the Bookmark API.
As an example:
Bookmark bm = new Bookmark();
// outline
bm.setOutlineClassName(StandardOutline.class.getName());
// invisible root node page !!the class name must be inserted as a string with Kepler!!
NodePageState invisibleRootNodeState = new NodePageState();
invisibleRootNodeState.setPageClassName("org.eclipse.scout.rt.client.ui.desktop.outline.AbstractOutline$InvisibleRootPage");
invisibleRootNodeState.setExpanded(true);
bm.addPathElement(invisibleRootNodeState);
// a node page
NodePageState childNodePageState = new NodePageState();
childNodePageState.setPageClassName(ChildNodePage.class.getName());
childNodePageState.setExpanded(true);
bm.addPathElement(childNodePageState);
// a table page with a selected value !! ensure to mark the column as primary key !!!
TablePageState personsTablePageState = new TablePageState();
personsTablePageState.setExpanded(true);
personsTablePageState.setPageClassName(PersonsTablePage.class.getName());
personsTablePageState.setExpandedChildPrimaryKey(new CompositeObject(2l));
personsTablePageState.setSelectedChildrenPrimaryKeys(Arrays.asList(new CompositeObject[]{new CompositeObject(2l)}));
bm.addPathElement(personsTablePageState);
// a sub node of the persons table page
NodePageState companyNodePage = new NodePageState();
companyNodePage.setExpanded(true);
companyNodePage.setPageClassName(ChildNodePage.class.getName());
bm.addPathElement(companyNodePage);
// a table page under the
TablePageState companiesTablePageState = new TablePageState();
companiesTablePageState.setExpanded(true);
companiesTablePageState.setPageClassName(CompaniesTablePage.class.getName());
bm.addPathElement(companiesTablePageState);
// activation of the bookmark
ClientSession.get().getDesktop().activateBookmark(bm, true);
Hope that helps
Andreas
|
|
|
|
Powered by
FUDForum. Page generated in 0.03572 seconds