Map titles = new HashMap();
for (int col = 0; col < columns.length; col++)
{
for (int row = 0; row < columns[col].size(); row++)
{
IdentityElement identityElement = (IdentityElement) columns[col].get(row);
MetaInfo metaInfo = identityElement.getMetaInfo();
if ((metaInfo != null) && (metaInfo.getTitle() != null))
{
titles.put(identityElement.getId(), metaInfo.getTitle());
continue;
}
if (identityElement instanceof Entry)
{
Entry entry = (Entry) identityElement;
PortletEntry pentry = (PortletEntry) Registry.getEntry(Registry.PORTLET, entry.getParent());
if ((pentry != null) && (pentry.getTitle() != null))
{
titles.put(entry.getId(), pentry.getTitle());
continue;
}
titles.put(entry.getId(), entry.getParent());
continue;
}
if (identityElement instanceof Reference)
{
titles.put(identityElement.getId(), CustomLocalization.getString("CUSTOMIZER_REF_DEFAULTTITLE", rundata));
continue;
}
// Let's make sure there is a title
titles.put(identityElement.getId(), CustomLocalization.getString("CUSTOMIZER_NOTITLESET", rundata));
}
}
context.put("titles", titles);
context.put("action", "controllers.MultiColumnControllerAction");