public Object getValueAt(int row, int col) { PortletEntry<Subscriber> entry = getObject(row); Subscriber subscriber = entry.getValue(); Publisher pub = subscriber.getPublisher(); switch (col) { case 0: Object subsInfoObj = subToSubInfo.get(subscriber); if (subsInfoObj instanceof SubscriptionInfo) { SubscriptionInfo subsInfo = (SubscriptionInfo) subsInfoObj; int newsCount = subsInfo.countSubscriptionListItems(); if (newsCount == 1) { return translate( "notificationsPortlet.single.news.in", subsInfo.getTitle(SubscriptionInfo.MIME_PLAIN)); } else { return translate( "notificationsPortlet.multiple.news.in", new String[] {newsCount + "", subsInfo.getTitle(SubscriptionInfo.MIME_PLAIN)}); } } return ""; case 1: String innerType = pub.getType(); return NewControllerFactory.translateResourceableTypeName(innerType, locale); default: return "ERROR"; } }