List of usage examples for org.apache.wicket Component setOutputMarkupId
public final Component setOutputMarkupId(final boolean output)
From source file:org.wicketstuff.extjs.behavior.ExtTabBehavior.java
License:Apache License
public void bind(Component component) { super.bind(component); component.setOutputMarkupId(true); component.add(new AttributeAppender("class", new Model("x-tab"), " ")); if (title != null) { component.add(new AttributeModifier("title", true, new Model(title))); }// ww w.j a v a 2 s . c o m }
From source file:org.wicketstuff.jquery.datepicker.DatePickerBehavior.java
License:Apache License
@Override protected void onBind() { super.onBind(); Component component = getComponent(); if (component instanceof TextField) { component.setOutputMarkupId(true); if (component instanceof ITextFormatProvider) { format_ = ((ITextFormatProvider) component).getTextFormat().toLowerCase(); } else {/* w ww .j a va 2 s . com*/ TextField<?> tf = (TextField<?>) component; IConverter<?> cnv = tf.getConverter(tf.getType()); if (cnv != null && DateConverter.class.isAssignableFrom(cnv.getClass())) { SimpleDateFormat sdf = (SimpleDateFormat) ((DateConverter) cnv) .getDateFormat(component.getLocale()); format_ = sdf.toPattern().toLowerCase(); } // convertDateInOptions(cnv, "startDate", component.getLocale()); // convertDateInOptions(cnv, "endDate", component.getLocale()); } component.add(getDatePickerStyle()); } else { throw new RuntimeException("DatePicketBehavior is intended to be attached to a TextField component!"); } }
From source file:org.wicketstuff.jquery.dnd.DnDSortableBehavior.java
License:Apache License
/** * Register a component as draggable/moveable item. (add the css class and markupId to be find * on clientside)./*from w w w .jav a2 s .co m*/ * * @param v * the component to register. * @return this */ protected DnDSortableBehavior registerItem(Component v) { v.add(new AttributeAppender("class", new Model<String>(String.valueOf(options_.get("accept"))), " ")); v.setOutputMarkupId(true); return this; }
From source file:org.wicketstuff.js.ext.ExtComponent.java
License:Apache License
private void updateContentElement() { final List<Component> children = new LinkedList<Component>(); visitChildren(new IVisitor<Component, Void>() { @Override//from w w w .j av a 2 s . co m public void component(Component component, IVisit<Void> visit) { if ((!(component instanceof ExtComponent)) && (!(component instanceof ItemsRepeater)) && (!(component instanceof ItemsRepeater.ExtItem))) { children.add(component); } visit.dontGoDeeper(); } }); if (children.size() > 1) { throw new WicketRuntimeException("More than one child component added to ExtComponent"); } if (children.size() == 1) { Component component = children.get(0); component.setOutputMarkupId(true); component.add(new AttributeAppender("class", Model.of("x-hidden"), " ") { @Override public boolean isTemporary(Component component) { return true; } }); this.contentEl = component.getMarkupId(); } onAfterUpdateContentElement(); }
From source file:org.wicketstuff.js.ext.ExtMessageBoxOptions.java
License:Apache License
public void setAnimEl(Component animEl) { animEl.setOutputMarkupId(true); this.animEl = animEl; }
From source file:org.wicketstuff.minis.behavior.mootip.MootipBehaviour.java
License:Apache License
@Override public void bind(final Component component) { super.bind(component); this.component = component; this.component.setOutputMarkupId(true); if (addTitle && !isAjax()) component.add(AttributeModifier.replace("title", title + "::" + content)); if (isAjax()) { this.component.add(new MootipAjaxListener(panel)); component.add(AttributeModifier.replace("title", "CALLBACK:mootipAjax" + getEscapedComponentMarkupId() + "()")); }/*ww w . j av a 2 s . c o m*/ component.add(AttributeModifier.replace("class", "toolTipImg" + getEscapedComponentMarkupId())); component.setOutputMarkupId(true); }
From source file:org.wicketstuff.minis.behavior.prototip.PrototipBehaviour.java
License:Apache License
/** * Provide a component to show as the tool tip (eg a panel) * /*w w w .j ava 2 s . co m*/ * @param panel */ public PrototipBehaviour(Component panel) { tooltipComponent = panel; panel.setOutputMarkupId(true); }
From source file:org.wicketstuff.minis.behavior.reflection.ReflectionBehavior.java
License:Apache License
/** * Binds the component to this behavior. * /*www .j a v a2 s .c o m*/ * @see Behavior#bind(Component) */ @Override public void bind(final Component component) { super.bind(component); component.setOutputMarkupId(true); components.add(component); }
From source file:org.wicketstuff.minis.behavior.spinner.Spinner.java
License:Apache License
/** * {@inheritDoc}/* www . jav a 2s . c om*/ */ @Override public void bind(final Component component) { if (this.component != null) throw new IllegalStateException("Spinner can not be added to more than one component."); else if (!(component instanceof TextField)) throw new IllegalArgumentException("Spinner can only be added to a TextField."); this.component = component.setOutputMarkupId(true); ; }
From source file:org.wicketstuff.minis.behavior.veil.VeilResources.java
License:Apache License
/** * @see Behavior#bind(org.apache.wicket.Component) *//*from w ww.jav a2 s .c o m*/ @Override public void bind(final Component component) { super.bind(component); component.setOutputMarkupId(true); }