* @param id the portlet id to customize or null;
*/
public void setCustomized(Portlet p)
{
// customization state info is in the page's session state
SessionState customizationState = getPageSessionState();
Stack stack = (Stack)customizationState.getAttribute("customize-stack");
if (stack == null)
{
stack = new Stack();
customizationState.setAttribute("customize-stack", stack);
}
if (p==null)
{
if (!stack.empty()) stack.pop();
customizationState.setAttribute ("customize-paneName", "*");
}
else
{
if (stack.size () > 0)
{
Portlet last = (Portlet)stack.peek();
if ((last!=null) && (p.getName().equals(last.getName())) && (p.getTitle().equals(last.getTitle())))
{
//System.out.println ("Portlet already used!!!");
}
else
stack.push(p);
}
else
stack.push(p);
/**
* Save the title of this currently selected portlet
* --------------------------------------------------------------------------
* last modified: 11/06/01
* Andreas Kempf, Siemens ICM S CP PE, Munich
*/
customizationState.setAttribute ("customize-paneName", (String)p.getTitle());
}
}