Hello ,
How can I find active pages and current page in workplace .Also I need functions to close them. My pages are both CAI & HTML pages.
Thanks.
Hello ,
How can I find active pages and current page in workplace .Also I need functions to close them. My pages are both CAI & HTML pages.
Thanks.
There is one function with IMWorkplace:
/**
* Checks if the page that is passed via the parameters is
* currently displayed inside the content area of the workplace.
* Example: when switching pages only page switches are passed
* to the workplace which happen on level of the current content
* page.
*/
public boolean checkIfPageIsCurrentContentPage(String subSessionId,
String pageName,
String modelId);
Does this help you?
For closing pages: use the endProcess() method that by default closes the subsession and removes the page from the workplace.
Bjoern
In my case I have CAI pages , pure html pages and some jsp pages…For CAI pages I can collect active pages and their subsession id’s some how.(By the way I guess there is no standard mechanizm to reach this info). But what can I do for pure html & jsp pages ? Should I always use them as subpages in a CAI page ?
Hi there. My question related to that problem is:
If I my workplace looks like this:
<?xml version="1.0" encoding="UTF-8"?>How can I close that WORKLIST page?
Somehow, since it is a page with its own subsession I cannot really close that one with the following mechanism:
public void doLogout(){
ArrayList activeGuis;
String subSessionId;
IMFWorkplace workplace = (IMFWorkplace)mContext.lookup(IMFWorkplace.IWORKPLACE_LOOKUP, false);
activeGuis = this.getUserSession().getRegisteredGUISessions();
Iterator iter = activeGuis.iterator();
//checkIfPageIsCurrentContentPage(String subSessionId, String pageName, String modelId);
//Remove all pages from workplace
while(iter.hasNext()){
subSessionId = (String)iter.next();
workplace.removePageFromWorkplace(subSessionId);
}
workplace.updateWorkplace(this);
this.getUserSession().logout();
//Refresh left function tree
this.updateFunctionTree();
this.closePage();
}
Any ideas anyone?
If you want to control your pages externally , collecting your adapter infos in their activate methods may work.
But If you just want to reset your workplace , the codes below makes thinks easier.
openPageInTarget("../MyProject/start.jsp","_top");
start.jsp (just use it to redirection)
<%
response.sendRedirect(request.getContextPath()+"/servlet/StartCISPage?PAGEURL=/MyProject/workplace.html");
%>