/** * renders all core bootstrap resource references * * @param component current component * @param response The current {@link IHeaderResponse} */ public static void renderHead(final Component component, final IHeaderResponse response) { BootstrapResourcesBehavior.instance().renderHead(getSettings(component.getApplication()), response); }
/** * Construct. * * @param markupId The component's id * @param model The textfield value * @param dataSource The data source for all available options * @param config The typeahead configuration */ public Typeahead(final String markupId, final IModel<T> model, final IDataSource<T> dataSource, final TypeaheadConfig config) { super(markupId, model); this.config = config.withDataSource(dataSource); add(inputBehavior = new InputBehavior()); add(new AttributeModifier("data-provide", "typeahead")); BootstrapResourcesBehavior.addTo(this); }
/** * Construct. * * @param markupId mandatory parameter * @param tabs mandatory parameter * @param activeTab mandatory parameter */ public Collapsible(final String markupId, final List<ITab> tabs, final IModel<Integer> activeTab) { super(markupId, activeTab); this.tabs = tabs; this.activeTab = activeTab; setOutputMarkupId(true); add(newTabList("tabs", tabs)); add(new BootstrapResourcesBehavior(), new CssClassNameAppender("accordion")); }
@Override protected void onConfigure() { super.onConfigure(); if (Strings.isNullOrEmpty(inlineHeader.getDefaultModelObjectAsString())) { this.inlineHeader.setVisible(false); this.blockHeader.setVisible(false); } else { this.inlineHeader.setVisible(useInlineHeader); this.blockHeader.setVisible(!useInlineHeader); } this.message.setDefaultModel(getDefaultModel()); if (closeButton.isVisible()) { add(BootstrapResourcesBehavior.instance()); } } }
/** * Construct. * * @param markupId The component id */ public ContextMenu(final String markupId, final IModel<T> model) { super(markupId, model); setOutputMarkupId(true); setOutputMarkupPlaceholderTag(true); BootstrapResourcesBehavior.addTo(this); add(new CssClassNameAppender("context-menu")); add(createContent("content")); }
/** * Construct. * * @param markupId the component id * @param model the list of images */ public Carousel(final String markupId, final IModel<List<? extends ICarouselImage>> model) { super(markupId, model); this.model = model; setOutputMarkupId(true); add(new CssClassNameAppender("carousel", "slide")); add(new BootstrapResourcesBehavior()); add(new AssertTagNameBehavior("div")); add(newImageList("images"), newNavigationButton("prev"), newNavigationButton("next")); }
/** * renders all core bootstrap resource references * * @param response The current {@link IHeaderResponse} */ public static void renderHead(final IHeaderResponse response) { BootstrapResourcesBehavior.instance().renderHead(getSettings(Application.get()), response); } }
/** * Construct. * * @param markupId The markup id * @param model The label of the main button * @param iconTypeModel the type of the icon */ public DropDownButton(final String markupId, final IModel<String> model, final IModel<IconType> iconTypeModel) { super(markupId, model); this.iconTypeModel = iconTypeModel; this.script = createInitializerScript(); add(baseButton = createButton("btn", model, iconTypeModel)); add(buttonListView = newButtonList("buttons")); baseButton.add(icon = createButtonIcon("icon", iconTypeModel)); add(new BootstrapResourcesBehavior()); add(new CssClassNameAppender("dropdown")); addButtonBehavior(buttonType, buttonSize); }