@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 HCNodeList getAllChildrenAsNodeList () { return new HCNodeList ().addChildren (m_aChildren); }
@Nonnull public HCTableFormViewItemRow setCtrl (@Nullable final String... aValues) { return setCtrl (HCNodeList.create (aValues)); }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (HCH4.create (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, new ComparatorHasDisplayName <IHasDisplayName> (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }
@Nullable public static IHCNode getExtensionDisplay (@Nonnull final ISMPHasExtension aHasExtension) { final ICommonsList <com.helger.peppol.bdxr.ExtensionType> aExtensions = aHasExtension.getAllExtensions (); if (aExtensions.isEmpty ()) return null; final HCNodeList aNL = new HCNodeList (); for (final com.helger.peppol.bdxr.ExtensionType aExtension : aExtensions) { if (aNL.hasChildren ()) { // add a separator line aNL.addChild (new HCHR ()); } // Use only the XML element of the first extension final Element aAny = (Element) aExtension.getAny (); final String sXML = XMLWriter.getNodeAsString (aAny); aNL.addChild (new HCPrismJS (EPrismLanguage.MARKUP).addChild (sXML)); } return aNL; } }
final HCNodeList ret = new HCNodeList (); final HCCanvas aCanvas = ret.addAndReturnChild (new HCCanvas ().setID (getCanvasID ())); final HCLegend aLegendDiv = ret.addAndReturnChild (new HCLegend ().setID (getLegendID ())); aCode.add (JSHtml.documentGetElementById (aLegendDiv) .ref ("innerHTML") ret.addChild (new HCScript (aCode));
protected final void handleViewObject (@Nonnull final WPECTYPE aWPEC, @Nonnull final DATATYPE aSelectedObject) { // Valid object found - show details showSelectedObject (aWPEC, aSelectedObject); if (showViewToolbar (aWPEC, aSelectedObject)) { // Toolbar on bottom aWPEC.getNodeList ().addChild (createViewToolbar (aWPEC, true, aSelectedObject)); } }
@Nonnull public static IHCNode getContent (@Nonnull final LayoutExecutionContext aLEC) final HCNodeList ret = new HCNodeList (); final BootstrapContainer aOuterContainer = ret.addAndReturnChild (new BootstrapContainer ().setFluid (true));
@Override protected void onFinalizeNodeState (@Nonnull final IHCConversionSettingsToNode aConversionSettings, @Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aTargetNode) { super.onFinalizeNodeState (aConversionSettings, aTargetNode); addClasses (CBootstrapCSS.INPUT_GROUP, m_eSize); if (m_aPrefixes.hasChildren ()) for (final IHCNode aPrefix : m_aPrefixes.getChildren ()) { if (aPrefix instanceof BootstrapButton) addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_BTN).addChild (aPrefix)); else addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_ADDON).addChild (aPrefix)); } addChild (m_aInput); if (m_aSuffixes.hasChildren ()) for (final IHCNode aSuffix : m_aSuffixes.getChildren ()) { if (aSuffix instanceof BootstrapButton) addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_BTN).addChild (aSuffix)); else addChild (new HCSpan ().addClass (CBootstrapCSS.INPUT_GROUP_ADDON).addChild (aSuffix)); } } }
@Override protected void showSelectedObject (@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final ISMPUserEditable aSelectedObject) { final HCNodeList aNodeList = aWPEC.getNodeList (); final BootstrapViewForm aTable = aNodeList.addAndReturnChild (new BootstrapViewForm ()); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("User name").setCtrl (aSelectedObject.getUserName ())); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("Password").setCtrl (aSelectedObject.getPassword ())); }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (new HCH4 ().addChild (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, IHasDisplayName.getComparatorCollating (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, aDisplayLocale)); } }
@Nullable public static IHCNode getExtensionDisplay (@Nonnull final ISMPHasExtension aHasExtension) { final ICommonsList <com.helger.peppol.bdxr.ExtensionType> aExtensions = aHasExtension.getAllExtensions (); if (aExtensions.isEmpty ()) return null; final HCNodeList aNL = new HCNodeList (); for (final com.helger.peppol.bdxr.ExtensionType aExtension : aExtensions) { if (aNL.hasChildren ()) { // add a separator line aNL.addChild (new HCHR ()); } // Use only the XML element of the first extension final Element aAny = (Element) aExtension.getAny (); final String sXML = XMLWriter.getNodeAsString (aAny); aNL.addChild (new HCPrismJS (EPrismLanguage.MARKUP).addChild (sXML)); } return aNL; }
@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))); } }
@Nonnull public static IHCNode getContent (@Nonnull final LayoutExecutionContext aLEC) final HCNodeList ret = new HCNodeList (); final BootstrapContainer aOuterContainer = ret.addAndReturnChild (new BootstrapContainer ().setFluid (true));
addClasses (CBootstrapCSS.INPUT_GROUP, m_eSize); if (m_aPrefixes.hasChildren ()) for (final IHCNode aPrefix : m_aPrefixes.getChildren ()) if (m_aSuffixes.hasChildren ()) for (final IHCNode aSuffix : m_aSuffixes.getChildren ())
@Override protected void showSelectedObject (@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final ISMPUserEditable aSelectedObject) { final HCNodeList aNodeList = aWPEC.getNodeList (); final BootstrapViewForm aTable = aNodeList.addAndReturnChild (new BootstrapViewForm ()); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("User name").setCtrl (aSelectedObject.getUserName ())); aTable.addFormGroup (new BootstrapFormGroup ().setLabel ("Password").setCtrl (aSelectedObject.getPassword ())); }
@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 HCNodeList getAllChildrenAsNodeList () { return new HCNodeList ().addChildren (m_aChildren); }
@Override protected void fillContent (@Nonnull final WPECTYPE aWPEC) { final HCNodeList aNodeList = aWPEC.getNodeList (); final Locale aDisplayLocale = aWPEC.getDisplayLocale (); aNodeList.addChild (new HCH4 ().addChild (EText.MSG_TPM_HEADER.getDisplayText (aDisplayLocale))); // Third party modules final Set <IThirdPartyModule> aModules = ThirdPartyModuleRegistry.getInstance () .getAllRegisteredThirdPartyModules (); final HCUL aUL = aNodeList.addAndReturnChild (new HCUL ()); // Show all required modules, sorted by name for (final IThirdPartyModule aModule : CollectionHelper.getSorted (aModules, IHasDisplayName.getComparatorCollating (aDisplayLocale))) if (!aModule.isOptional ()) aUL.addItem (_getModuleHCNode (aModule, 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)); }