Search in sources :

Example 1 with NiceNameEntry

use of com.helger.phoss.smp.nicename.NiceNameEntry in project phoss-smp by phax.

the class PageSecureSMPIdentifierMappings method _createList.

@Nonnull
private IHCNode _createList(@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final ICommonsOrderedMap<String, NiceNameEntry> aEntries, @Nonnull final String sSuffix) {
    final Locale aDisplayLocale = aWPEC.getDisplayLocale();
    final HCTable aTable = new HCTable(new DTCol("ID"), new DTCol("Name"), new DTCol("Deprecated?")).setID(getID() + sSuffix);
    for (final Map.Entry<String, NiceNameEntry> aEntry : aEntries.entrySet()) {
        final HCRow aRow = aTable.addBodyRow();
        aRow.addCell(aEntry.getKey());
        aRow.addCell(aEntry.getValue().getName());
        aRow.addCell(EPhotonCoreText.getYesOrNo(aEntry.getValue().isDeprecated(), aDisplayLocale));
    }
    return new HCNodeList().addChild(aTable).addChild(BootstrapDataTables.createDefaultDataTables(aWPEC, aTable));
}
Also used : Locale(java.util.Locale) HCTable(com.helger.html.hc.html.tabular.HCTable) HCNodeList(com.helger.html.hc.impl.HCNodeList) DTCol(com.helger.photon.uictrls.datatables.column.DTCol) HCRow(com.helger.html.hc.html.tabular.HCRow) NiceNameEntry(com.helger.phoss.smp.nicename.NiceNameEntry) ICommonsOrderedMap(com.helger.commons.collection.impl.ICommonsOrderedMap) Map(java.util.Map) Nonnull(javax.annotation.Nonnull)

Aggregations

ICommonsOrderedMap (com.helger.commons.collection.impl.ICommonsOrderedMap)1 HCRow (com.helger.html.hc.html.tabular.HCRow)1 HCTable (com.helger.html.hc.html.tabular.HCTable)1 HCNodeList (com.helger.html.hc.impl.HCNodeList)1 NiceNameEntry (com.helger.phoss.smp.nicename.NiceNameEntry)1 DTCol (com.helger.photon.uictrls.datatables.column.DTCol)1 Locale (java.util.Locale)1 Map (java.util.Map)1 Nonnull (javax.annotation.Nonnull)1