@Nonnull public IHCElementWithChildren <?> createQuestionBox (@Nonnull final ILayoutExecutionContext aWPEC, @Nullable final String sText) { return new HCDiv ().addChild (sText).addClass (CSS_CLASS_QUESTIONBOX); }
@Nonnull public IHCElementWithChildren <?> createWarnBox (@Nonnull final ILayoutExecutionContext aWPEC, @Nullable final String sText) { return new HCDiv ().addChild (sText).addClass (CSS_CLASS_WARNBOX); }
@Nonnull public IHCElementWithChildren <?> createSuccessBox (@Nonnull final ILayoutExecutionContext aWPEC, @Nullable final String sText) { return new HCDiv ().addChild (sText).addClass (CSS_CLASS_SUCCESSBOX); }
@Nonnull public IHCElementWithChildren <?> createInfoBox (@Nonnull final ILayoutExecutionContext aWPEC, @Nullable final String sText) { return new HCDiv ().addChild (sText).addClass (CSS_CLASS_INFOBOX); }
@Nonnull public IHCElementWithChildren <?> createErrorBox (@Nonnull final ILayoutExecutionContext aWPEC, @Nullable final String sText) { return new HCDiv ().addChild (sText).addClass (CSS_CLASS_ERRORBOX); }
@Nonnull public final BootstrapFormGroup setCtrl (@Nullable final String sValue) { final HCDiv aP = new HCDiv (); return setCtrl (aP.addChild (sValue)); }
@Nonnull public HCDiv getAsResponsiveTable () { return new HCDiv ().addClass (CBootstrapCSS.TABLE_RESPONSIVE).addChild (this); } }
@Nullable @OverrideOnDemand protected IHCNode createErrorNode (@Nonnull final IError aError) { return new HCDiv ().addChild (aError.getErrorText ()); }
@Nonnull private BootstrapNavbar _addNode (@Nonnull final EBootstrapNavbarPosition ePos, @Nullable final IHCElement <?> aNode) { if (aNode != null) aNode.addClass (ePos); if (ePos.isFixed ()) m_aHeader.addChild (aNode); else m_aContent.addChild (aNode); return this; }
@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 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); }
@Nullable public IHCNode build () { if (m_aPrefixes.isEmpty () && m_aSuffixes.isEmpty ()) return m_aInput; final HCDiv aInputGroup = new HCDiv ().addClasses (CBootstrapCSS.INPUT_GROUP, m_eSize); for (final IHCNode aPrefix : m_aPrefixes) { if (aPrefix instanceof BootstrapButton) aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_BTN).addChild (aPrefix)); else aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_ADDON).addChild (aPrefix)); } aInputGroup.addChild (m_aInput); for (final IHCNode aSuffix : m_aSuffixes) { if (aSuffix instanceof BootstrapButton) aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_BTN).addChild (aSuffix)); else aInputGroup.addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_ADDON).addChild (aSuffix)); } return aInputGroup; } }
@Nullable public HCDiv build () { final HCDiv ret = new HCDiv ().addClass (CBootstrapCSS.MODAL) .setRole (EHTMLRole.DIALOG) .setCustomAttr (CHTMLAttributes.ARIA_HIDDEN, "true") .setID (m_sID); if (m_bFade) ret.addClass (CBootstrapCSS.FADE); final HCDiv aDialog = ret.addAndReturnChild (new HCDiv ().addClasses (CBootstrapCSS.MODAL_DIALOG, m_eSize)); final HCDiv aContent = aDialog.addAndReturnChild (new HCDiv ().addClass (CBootstrapCSS.MODAL_CONTENT) .setID (_getContentID ())); if (m_aHeader != null) { final String sTitleID = _getTitleID (); ret.setCustomAttr (CHTMLAttributes.ARIA_LABELLEDBY, sTitleID); final HCDiv aHeader = aContent.addAndReturnChild (new HCDiv ().addClass (CBootstrapCSS.MODAL_HEADER)); if (m_bShowClose) aHeader.addChild (new BootstrapCloseIcon ().setDataAttr ("dismiss", "modal")); aHeader.addChild (new HCH4 ().addClass (CBootstrapCSS.MODAL_TITLE).setID (sTitleID).addChild (m_aHeader)); } if (m_aBody != null) aContent.addChild (new HCDiv ().addClass (CBootstrapCSS.MODAL_BODY).addChild (m_aBody)); if (m_aFooter != null) aContent.addChild (new HCDiv ().addClass (CBootstrapCSS.MODAL_FOOTER).addChild (m_aFooter)); return ret; }
final HCDiv aPane = aContent.addAndReturnChild (new HCDiv ().addChild (aTab.getContent ()) .addClass (CBootstrapCSS.TAB_PANE) .setID (aTab.getID ()));
aNodeList.addChild (aToolbar); aNodeList.addChild (new HCDiv ().addChild (EText.MSG_CACHE_ACTIVE.getDisplayText (aDisplayLocale) + EWebBasicsText.getYesOrNo (WebSiteResourceCache.isCacheEnabled (), aDisplayLocale))); aNodeList.addChild (new HCDiv ().addChild (EText.MSG_RESBUNDLE_SERVLET.getDisplayText (aDisplayLocale) + EWebBasicsText.getYesOrNo (ResourceBundleServlet.isServletRegisteredInServletContext (), aDisplayLocale))); aNodeList.addChild (new HCDiv ().addChild (EText.MSG_RESBUNDLE_ACTIVE.getDisplayText (aDisplayLocale) + EWebBasicsText.getYesOrNo (ResourceBundleServlet.isActive (), aDisplayLocale)));
aNodeList.addChild (aToolbar); aNodeList.addChild (new HCDiv ().addChild (EText.MSG_GO_SERVLET.getDisplayText (aDisplayLocale) + EWebBasicsText.getYesOrNo (GoServlet.isServletRegisteredInServletContext (), aDisplayLocale)));