String controller = rundata.getParameters().getString("controller");
if (controller != null)
{
Profile profile = ((JetspeedRunData) rundata).getCustomizedProfile();
PortletController pc = PortalToolkit.getController(controller);
if (pc != null)
{
set.setController(pc);
Portlets portlets = profile.getDocument().getPortletsById(set.getID());
Controller c = portlets.getController();
if (c == null)
{
c = new PsmlController();
portlets.setController(c);
}
c.setName(controller);
String linkedControl = pc.getConfig().getInitParameter("control");
if (linkedControl != null)
{
Control ctl = new PsmlControl();
ctl.setName(linkedControl);