principal.getName().equals(((UserManager)getManager()).getAnonymousUser()));
if (!guestUserSelected)
{
// if guest user: don't show status panel
tab = new AbstractTab(new Model("Status"))
{
public Panel getPanel(String panelId)
{
return new PrincipalStatusPanel(panelId);
}
};
panel.getTabs().add(tab);
}
tab = new AbstractTab(new Model("Associations"))
{
public Panel getPanel(String panelId)
{
return new PrincipalAssociationsPanel(panelId);
}
};
panel.getTabs().add(tab);
tab = new AbstractTab(new Model("Attributes"))
{
public Panel getPanel(String panelId)
{
return new PrincipalAttributesPanel(panelId);
}
};
panel.getTabs().add(tab);
if (!guestUserSelected && principalType.getName().equals(JetspeedPrincipalType.USER))
{
tab = new AbstractTab(new Model("Credentials"))
{
public Panel getPanel(String panelId)
{
return new PrincipalCredentialsPanel(panelId);
}
};
panel.getTabs().add(tab);
}
if (principalType.getName().equals(JetspeedPrincipalType.USER))
{
tab = new AbstractTab(new Model("User Profile"))
{
public Panel getPanel(String panelId)
{
return new UserPrincipalProfilePanel(panelId);
}
};
panel.getTabs().add(tab);
}
panel.setSelectedTab(0);
} else
{
if (principalType.getName().equals(JetspeedPrincipalType.USER))
{
tab = new AbstractTab(new Model("New "
+ principalType.getName().toUpperCase()))
{
public Panel getPanel(String panelId)
{
return new NewUserPrincipalPanel(panelId);
}
};
} else
{
tab = new AbstractTab(new Model("New "
+ principalType.getName().toUpperCase()))
{
public Panel getPanel(String panelId)
{