{
// customization state info is in the page's session state
SessionState customizationState = getPageSessionState();
Stack stack = (Stack)customizationState.getAttribute("customize-stack");
Portlet p = null;
if ((stack!=null)&&(!stack.empty()))
{
p = (Portlet)stack.peek();
}
/**
* Save the title of this currently selected portlet
* --------------------------------------------------------------------------
* last modified: 11/06/01
* Andreas Kempf, Siemens ICM S CP PE, Munich
*/
if ((p != null) && (stack.size() > 1))
customizationState.setAttribute ("customize-paneName", (String)p.getTitle());
else
customizationState.setAttribute ("customize-paneName", "*");
return (Portlet)p;
}