Examples of AttributeAppender


Examples of org.apache.wicket.behavior.AttributeAppender

   
    private static void applyCssVisibility(final Component component, final boolean visible) {
        final AttributeModifier modifier = 
                visible
                    ? new AttributeModifier("class", String.valueOf(component.getMarkupAttributes().get("class")).replaceFirst(INVISIBLE_CLASS, ""))
                    : new AttributeAppender("class", " " +
                            INVISIBLE_CLASS);
        component.add(modifier);
    }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

      @Override
      protected void populateEmptyItem(final Item<Book> item) {
        addMetadata(item);
       
        final String msg = "*empty*";
        final AttributeAppender cssClass = //
          new AttributeAppender("class", Model.of("yellowBack"), " ");
        item.add(new Label("title", msg).add(cssClass));
        item.add(new Label("isbn", msg).add(cssClass));
        item.add(new Label("price", msg).add(cssClass));
      }
     
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

   */
  public static AttributeAppender append(String attributeName, IModel<?> value)
  {
    Args.notEmpty(attributeName, "attributeName");

    return new AttributeAppender(attributeName, value).setSeparator(" ");
  }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

   */
  public static AttributeAppender prepend(String attributeName, IModel<?> value)
  {
    Args.notEmpty(attributeName, "attributeName");

    return new AttributeAppender(attributeName, value)
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected String newValue(String currentValue, String replacementValue)
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

    private static final int ADDITIONAL_CHARS = 3;
   
    public static Select2Choice<ObjectAdapterMemento> newSelect2Choice(String id, final IModel<ObjectAdapterMemento> modelObject, ScalarModel scalarModel) {
        Select2Choice<ObjectAdapterMemento> select2Choice = new Select2Choice<ObjectAdapterMemento>(id, modelObject);
        int typicalLength = scalarModel.getTypicalLength();
        select2Choice.add(new AttributeAppender("style", asCssStyleWidth(typicalLength)));
        select2Choice.setRequired(scalarModel.isRequired());
        return select2Choice;
    }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

       
        for(i=0; i<MAX_NUM_UNDERLYING_VIEWS; i++) {
            Component component = underlyingViews[i];
            if(component != null) {
                if(i != selected) {
                    component.add(new AttributeAppender("class", " " + INVISIBLE_CLASS));
                } else {
                    selectedComponent = component;
                }
            }
        }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

            return;
        }
        final AttributeModifier modifier = 
                visible
                    ? new AttributeModifier("class", String.valueOf(component.getMarkupAttributes().get("class")).replaceFirst(INVISIBLE_CLASS, ""))
                    : new AttributeAppender("class", " " +
                        INVISIBLE_CLASS);
        component.add(modifier);
    }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

    @Override
    protected void populateItem(ListItem<JarManifestAttributes> item) {
        final JarManifestAttributes detail = item.getModelObject();
        Label label = new Label(idLine, detail.getLine());
        item.add(new AttributeAppender("class", detail.getType().name().toLowerCase()));
        item.add(label);
    }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

                final AbstractLink link = linkAndLabel.getLink();

                Label viewTitleLabel = new Label(ID_ADDITIONAL_LINK_TITLE, linkAndLabel.getLabel());
                String disabledReasonIfAny = linkAndLabel.getDisabledReasonIfAny();
                if(disabledReasonIfAny != null) {
                    viewTitleLabel.add(new AttributeAppender("title", disabledReasonIfAny));
                }
                if(linkAndLabel.isBlobOrClob()) {
                    link.add(new CssClassAppender("noVeil"));
                }
                if(linkAndLabel.isPrototype()) {
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

    private static final long serialVersionUID = 1L;

    public static void addTargetBlankIfActionReturnsUrl(final AbstractLink link, final ObjectAction action) {
        final ObjectSpecification returnType = action.getReturnType();
        if(returnType != null && "java.net.URL".equals(returnType.getFullIdentifier())) {
            link.add(new AttributeAppender("target", Model.of("_blank")));
            link.add(new CssClassAppender("noVeil"));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.