@Nonnull public static HCNodeList createDefaultErrorNode (@Nullable final IErrorList aErrorList, @Nonnull final Locale aContentLocale) { final HCNodeList ret = new HCNodeList (); if (aErrorList != null) for (final IError aError : aErrorList) ret.addChild (createDefaultErrorNode (aError, aContentLocale)); return ret; }
@Nonnull public final BootstrapFormGroup addHelpText (@Nullable final IHCNode aHelpText) { if (aHelpText != null) { if (m_aHelpText == null) m_aHelpText = new HCNodeList (); m_aHelpText.addChild (aHelpText); onHelpTextModified (m_aHelpText); } return this; }
@Nonnull public final BootstrapFormGroup addHelpText (@Nullable final IHCNode aHelpText) { if (aHelpText != null) { if (m_aHelpText == null) m_aHelpText = new HCNodeList (); m_aHelpText.addChild (aHelpText); onHelpTextModified (m_aHelpText); } return this; }
@Nonnull public final BootstrapFormGroup setHelpText (@Nullable final IHCNode aHelpText) { return setHelpText (aHelpText instanceof HCNodeList ? (HCNodeList) aHelpText : new HCNodeList ().addChild (aHelpText)); }
@Nonnull public final BootstrapFormGroup setHelpText (@Nullable final IHCNode aHelpText) { return setHelpText (aHelpText instanceof HCNodeList ? (HCNodeList) aHelpText : new HCNodeList ().addChild (aHelpText)); }
@Nonnull public static IHCNode createSimpleTooltip (@Nonnull final String sTitle) { final IHCElement <?> aIcon = EFontAwesome4Icon.QUESTION_CIRCLE.getAsNode (); final BootstrapTooltip aTooltip = new BootstrapTooltip (aIcon).setTooltipTitle (sTitle); return new HCNodeList ().addChild (aIcon).addChild (aTooltip); }
@Nonnull public static IHCNode createSimpleTooltip (@Nonnull final IHCNode aTitle) { final IHCElement <?> aIcon = EBootstrapIcon.QUESTION_SIGN.getAsNode (); final BootstrapTooltip aTooltip = new BootstrapTooltip (aIcon).setTooltipTitle (aTitle); return new HCNodeList ().addChild (aIcon).addChild (aTooltip); }
@Nonnull public static IHCNode createSimpleTooltip (@Nonnull final IHCNode aTitle) { final IHCElement <?> aIcon = EFontAwesome4Icon.QUESTION_CIRCLE.getAsNode (); final BootstrapTooltip aTooltip = new BootstrapTooltip (aIcon).setTooltipTitle (aTitle); return new HCNodeList ().addChild (aIcon).addChild (aTooltip); }
@SuppressWarnings ("unchecked") public void html (@Nullable final IHCNode aNode) { html (aNode == null ? null : aNode instanceof IHCHasChildrenMutable <?, ?> ? (IHCHasChildrenMutable <?, IHCNode>) aNode : new HCNodeList ().addChild (aNode), null, null); }
@Nullable private static IHCNode _getAsString (@Nonnull final List <? extends IEmailAddress> aList) { if (aList.isEmpty ()) return null; final HCNodeList ret = new HCNodeList (); for (final IEmailAddress aEmailAddress : aList) ret.addChild (new HCDiv ().addChild (aEmailAddress.getDisplayName ())); return ret; }
@Nullable private static IHCNode _getAsString (@Nonnull final List <? extends IEmailAddress> aList) { if (aList.isEmpty ()) return null; final HCNodeList ret = new HCNodeList (); for (final IEmailAddress aEmailAddress : aList) ret.addChild (new HCDiv ().addChild (aEmailAddress.getDisplayName ())); return ret; }
@Nullable private static IHCNode _getAsString (@Nonnull final List <? extends IEmailAddress> aList) { if (aList.isEmpty ()) return null; final HCNodeList ret = new HCNodeList (); for (final IEmailAddress aEmailAddress : aList) ret.addChild (new HCDiv ().addChild (aEmailAddress.getDisplayName ())); return ret; }
@Nonnull public static IHCNode createSimpleTooltip (@Nonnull final String sTitle) { final HCSpan aSpan = new HCSpan ().addChild (EBootstrapIcon.QUESTION_SIGN.getAsNode ()); final BootstrapTooltip aTooltip = new BootstrapTooltip (aSpan).setTitle (sTitle); return new HCNodeList ().addChild (aSpan).addChild (aTooltip); }
/** * @return All cell nodes as one big {@link HCNodeList}. Never * <code>null</code>. */ @Nonnull public HCNodeList getCellsAsNodeList () { final HCNodeList ret = new HCNodeList (); if (hasChildren ()) for (final IHCCell <?> aCell : directGetAllChildren ()) ret.addChild (aCell); return ret; }
@Nonnull public final BootstrapFormGroup setCtrl (@Nullable final String... aValues) { final HCNodeList aNodeList = new HCNodeList (); if (aValues != null) for (final String sValue : aValues) { final HCDiv aP = new HCDiv (); aNodeList.addChild (aP.addChild (sValue)); } return setCtrl (aNodeList); }
@Override @Nonnull protected IHCNode createPageHeader (@Nonnull final ISimpleWebExecutionContext aSWEC, @Nullable final IHCNode aPageTitle) { final HCNodeList ret = new HCNodeList (); ret.addChild (new HCDiv ().addClass (CBootstrapCSS.MB_3).addChild (SMPRendererPublic.createLogoBig (aSWEC))); ret.addChild (new BootstrapPageHeader ().addChild ("Administration - Login")); return ret; }
@Nonnull @Nonempty public static HCNodeList getDisplayNameNode (@Nonnull final ISMLInfo aObj) { return new HCNodeList ().addChild ("[" + aObj.getDisplayName () + "] ") .addChild (new HCA (new SimpleURL (aObj.getManagementServiceURL ())).setTargetBlank () .addChild (aObj.getManagementServiceURL ())) .addChild (" (" + aObj.getDNSZone () + ")"); }
@Override protected void performDelete (@Nonnull final WPECTYPE aWPEC, @Nonnull final FailedMailData aSelectedObject) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); // Delete a single failed mail without querying if (m_aFailedMailQueue.remove (aSelectedObject.getID ()) != null) { s_aLogger.info ("Deleted single failed mail with ID " + aSelectedObject.getID () + "!"); aNodeList.addChild (getStyler ().createSuccessBox (aWPEC, EText.DELETE_SUCCESS.getDisplayText (aDisplayLocale))); } }
@Override protected void onFinalizeNodeState (@Nonnull final IHCConversionSettingsToNode aConversionSettings, @Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aTargetNode) { super.onFinalizeNodeState (aConversionSettings, aTargetNode); if (m_bShowResetButton) suffixes ().addChild (EBootstrapIcon.REMOVE.getAsNode ()); addClass (CSS_CLASS_DATE); // Add JS if necessary if (!m_aEdit.isReadOnly ()) addChild (new BootstrapDateTimePickerJS (this)); }
@Override protected void performDelete (@Nonnull final WPECTYPE aWPEC, @Nonnull final FormState aSelectedObject) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); if (FormStateManager.getInstance ().deleteFormState (aSelectedObject.getID ()).isChanged ()) aNodeList.addChild (getStyler ().createSuccessBox (aWPEC, EText.DELETE_SUCCESS.getDisplayText (aDisplayLocale))); else aNodeList.addChild (getStyler ().createErrorBox (aWPEC, EText.DELETE_ERROR.getDisplayText (aDisplayLocale))); }