(MFWorkplaceTreeNodeCISPage)followPageSwitches parameter

I use MFWorkplaceTreeNodeCISPage in functions tree of my workplace.The API doc says about followPageSwitches parameter :
“True means: when reinvoking the page through the tree then the user come back exactly to the page where he/she stayed. False means: the user id brought back to the starting page always.”
But it always switches to starting page even if I set it to true.

Hi Serhat,

what’s about the second boolean parameter “onlyOneInstance”. If this is “false” then the behaviour you mention is correct: we always open a new subsession with the page, in the new subsession everything starts from the scratch.

Bjoern

Hi Bjoern,
The “only one instance” parameter is also true.I’m sending some code piece.Maybe it helps to understand.
Thanks.


public MFWorkplaceInfo getWorkplaceInfo(Adapter adapter) {

		
		MFWorkplaceTopic topic; 
		MFWorkplaceTreeNodeGeneral topNode;
		TREECollection tc;
		MFWorkplaceInfo workplaceInfo = new MFWorkplaceInfo("/ADFWorkplace/empty");
		
		topic = new MFWorkplaceTopic(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","system"),  workplaceInfo);
		tc = topic.getTree();
		topNode = new MFWorkplaceTreeNode(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","sessions"), "../ADFManager/images/folderopen.gif", "../ADFManager/images/folderclose.gif") ;
		topNode.setOpened(TREECollection.ST_OPENED);
		tc.addTopNode(topNode, false);
		
		MFWorkplaceTreeNodeCISPage subnode = new MFWorkplaceTreeNodeCISPage(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","activeSessions"),"../ADFManager/images/Sessions16.gif", "/ADFManager/system.activeSessions", true, true);
		tc.addSubNode(subnode, topNode, true, false);
		workplaceInfo.addFavourite(subnode,"../ADFManager/images/Sessions16.gif");
		subnode = new MFWorkplaceTreeNodeCISPage(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","sessionsSummaryReport"), "../ADFManager/images/Report16.gif","/ADFWorkplace/empty", true, true);
		tc.addSubNode(subnode, topNode, true, false);
		subnode = new MFWorkplaceTreeNodeCISPage(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","registry"), "../ADFManager/images/Registry16.gif","/ADFManager/system.registry", true, true);
		tc.addTopNode(subnode,true);
		workplaceInfo.addFavourite(subnode,"../ADFManager/images/Registry16.gif");
		subnode = new MFWorkplaceTreeNodeCISPage(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","serviceDefinitions"),"../ADFManager/images/Service16.gif", "/ADFManager/service.serviceDefinition", true, true);
		tc.addTopNode(subnode,  false);
		subnode = new MFWorkplaceTreeNodeCISPage(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","serviceGroupDefinitions"),"../ADFManager/images/ServiceGroup16.gif", "/ADFManager/service.serviceGroupDefinition", true, true);
		tc.addTopNode(subnode,  false);
		subnode = new MFWorkplaceTreeNodeCISPage(adapter.replaceLiteralFromProject("ADFManager" ,"workplace","entityDefinitions"),"../ADFManager/images/Entity16.gif", "/ADFManager/entity.EntityList", true, true);
		tc.addTopNode(subnode,  false);

...
...
...
}

…everything looks fine.

Stupid question: do you (as user) close the page prior to re-opening it?

Bjoern

No :slight_smile: I just use the same tree node or the page link which appears under the head line to switch back