コード例 #1
0
  @Override
  public void bind(final Component component) {
    super.bind(component);

    BootstrapBaseBehavior.addTo(component);
    component.add(cssClassNameAppender);
  }
コード例 #2
0
  @Override
  public void bind(Component component) {
    super.bind(component);

    if (component instanceof Form<?>) {
      form = (Form<?>) component;
    } else {
      form = Form.findForm(component);
      if (form == null) {
        throw new WicketRuntimeException(
            AjaxFormValidatingBehavior.class.getSimpleName()
                + " should be bound to a Form component or a component that is inside a form!");
      }
    }
  }
コード例 #3
0
  @Override
  public void bind(Component component) {
    super.bind(component);
    component.add(
        new CssClassAppender(
            new CssClassToggleModel(BootstrapCssClass.FORM_HORIZONTAL) {

              @Override
              protected boolean isActive() {
                return FormStyleBehavior.this.isHorizontal();
              }
            }));
    component.add(
        new CssClassAppender(
            new CssClassToggleModel(BootstrapCssClass.FORM_INLINE) {

              @Override
              protected boolean isActive() {
                return FormStyleBehavior.this.isInline();
              }
            }));
  }
コード例 #4
0
  @Override
  public void bind(final Component component) {
    super.bind(component);
    this.component = component;
    this.component.setOutputMarkupId(true);
    if (addTitle && !isAjax())
      component.add(
          new AttributeModifier("title", true, new Model<String>(title + "::" + content)));
    if (isAjax()) {
      this.component.add(new MootipAjaxListener(panel));
      component.add(
          new AttributeModifier(
              "title",
              true,
              new Model<String>("CALLBACK:mootipAjax" + getEscapedComponentMarkupId() + "()")));
    }

    component.add(
        new AttributeModifier(
            "class", true, new Model<String>("toolTipImg" + getEscapedComponentMarkupId())));

    component.setOutputMarkupId(true);
  }
コード例 #5
0
ファイル: CompositeBehavior.java プロジェクト: russpitre/core
 /** {@inheritDoc} */
 @Override
 public void bind(final Component arg0) {
   for (final Behavior behavior : behaviors_) behavior.bind(arg0);
 }
コード例 #6
0
 @Override
 public void bind(Component component) {
   super.bind(component);
   this.component = component;
   component.add(getResourcePackage());
 }