PanedPortletController cont = (PanedPortletController)controller;
PortletSet myPortlets = cont.getPortlets();
PortletControllerConfig conf = cont.getConfig();
Portlet portlet = null;
String paneID = null;
String paneName = rundata.getParameters().getString( JetspeedResources.PATH_PANENAME_KEY );
if (null != paneName)
{
portlet = myPortlets.getPortletByName(paneName);
if (portlet != null)
{
paneID = portlet.getID();
rundata.getParameters().setString(JetspeedResources.PATH_PANEID_KEY, paneID);
}
}
if (null == portlet)
{
paneID = cont.retrievePaneID(rundata, true);
portlet = myPortlets.getPortletByID(paneID);
if (null == portlet)
{
paneID = cont.retrievePaneID(rundata, false);
portlet = myPortlets.getPortletByID(paneID);
}
}
if (portlet != null)
{
context.put("pane", portlet);
String state = portlet.getAttribute("_menustate", "open", rundata);
//System.out.println("State = [" + state +"]");
// if(state == null || !state.equals("closed"))
{
cont.savePaneID(rundata, paneID);
}