List of usage examples for org.apache.wicket Component add
public Component add(final Behavior... behaviors)
From source file:com.gitblit.wicket.WicketUtils.java
License:Apache License
public static void setCssStyle(Component container, String value) { container.add(new AttributeModifier("style", value)); }
From source file:com.gitblit.wicket.WicketUtils.java
License:Apache License
public static void setCssBackground(Component container, String value) { String background = MessageFormat.format("background-color:{0};", StringUtils.getColor(value)); container.add(new AttributeModifier("style", background)); }
From source file:com.gitblit.wicket.WicketUtils.java
License:Apache License
public static Component setHtmlTooltip(Component container, String value) { return container.add(new AttributeModifier("title", value)); }
From source file:com.gitblit.wicket.WicketUtils.java
License:Apache License
public static void setInputPlaceholder(Component container, String value) { container.add(new AttributeModifier("placeholder", value)); }
From source file:com.gmail.volodymyrdotsenko.jqxwicket.widgets.tabs.TabsBehavior.java
License:Apache License
@Override public void bind(Component component) { super.bind(component); List<IXTab> tabs = getVisibleTabs(); for (IXTab tab : tabs) { if (tab.isClosable()) { component.add(this.closeTabEventBehavior = this.newCloseTabEventBehavior()); break; }// ww w.j a v a 2s. c om } // if (this.isCreateEventEnabled()) { // component.add(this.createEventBehavior = this // .newCreateEventBehavior()); // } if (this.isActivateEventEnabled()) { component.add(this.activateEventBehavior = this.newActivateEventBehavior()); } }
From source file:com.google.code.jqwicket.JQComponentOnBeforeRenderListener.java
License:Apache License
private void addJQueryHeaderContributor(Component component, Collection<? extends IJQHeaderContributor> contributors) { if (Utils.isEmpty(contributors)) return;//from w w w . ja v a2s. c om JQContributionRenderer renderer = JQContributionRenderer.get(); renderer.addContributors(contributors); component.add(renderer); }
From source file:com.google.code.jqwicket.ui.validationengine.ValidationEngineFormBehavior.java
License:Apache License
/** * {@inheritDoc}// w w w. j a v a 2 s . c om * * @see com.google.code.jqwicket.JQBehavior#bind(org.apache.wicket.Component) */ @Override public void bind(Component component) { super.bind(component); if (!options.hasValidationRules()) return; Collection<AjaxValidationRule> ajaxRules = this.options.getAjaxValidationRules(); if (Utils.isNotEmpty(ajaxRules)) { for (AjaxValidationRule r : ajaxRules) { component.add(r.getAjaxBehavior()); } } Collection<FuncValidationRule> funcRules = this.options.getFuncValidationRules(); if (Utils.isNotEmpty(funcRules)) { for (final FuncValidationRule r : funcRules) { component.add(new Behavior() { private static final long serialVersionUID = 1L; @Override public void renderHead(Component component, IHeaderResponse response) { response.renderJavaScript(r.getFuncDef(), UUID.randomUUID().toString()); } }); } } }
From source file:com.googlecode.wicket.jquery.ui.calendar.CalendarBehavior.java
License:Apache License
@Override public void bind(Component component) { super.bind(component); if (this.isEditable()) { component.add(this.onDayClickBehavior = this.newOnDayClickBehavior()); component.add(this.onEventClickBehavior = this.newOnEventClickBehavior()); }/*from w w w. ja va 2 s. co m*/ if (this.isSelectable()) { component.add(this.onSelectBehavior = this.newOnSelectBehavior()); } if (this.isEventDropEnabled()) { component.add(this.onEventDropBehavior = this.newOnEventDropBehavior()); } if (this.isEventResizeEnabled()) { component.add(this.onEventResizeBehavior = this.newOnEventResizeBehavior()); } if (this.isViewDisplayEnabled()) { component.add(this.onViewDisplayBehavior = this.newOnViewDisplayBehavior()); } }
From source file:com.googlecode.wicket.jquery.ui.effect.JQueryEffectBehavior.java
License:Apache License
@Override public void bind(Component component) { super.bind(component); if (this.isCallbackEnabled()) { component.add(this.callback = this.newCallbackBehavior()); }//from w w w. ja v a 2 s . com }
From source file:com.googlecode.wicket.jquery.ui.form.autocomplete.AutoCompleteBehavior.java
License:Apache License
@Override public void bind(Component component) { super.bind(component); component.add(this.onSelectBehavior = this.newOnSelectBehavior()); }