Examples of AttributeAppender


Examples of org.apache.wicket.behavior.AttributeAppender

                }

                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 int ADDITIONAL_CHARS = 3;

    public static Select2Choice<ObjectAdapterMemento> newSelect2Choice(String id, final IModel<ObjectAdapterMemento> modelObject, ScalarModel scalarModel) {
        Select2Choice<ObjectAdapterMemento> select2Choice = new Select2Choice<>(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

    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

Examples of org.apache.wicket.behavior.AttributeAppender

      BookmarkablePageLink<Void> navLink = new BookmarkablePageLink<Void>("navLink", navItemPageClass,
          navItem.getPageParameters());
      navLink.add(new Label("navLabel", navItem.getLabelModel()));
     
      if (navItemPageClass.equals(MainTemplate.this.getMenuPage())) {
        item.add(new AttributeAppender("class", "active"));
      }
     
      item.add(navLink);
    }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

      .setForcePlaceholderSize(true)
      .setTolerance(ToleranceEnum.POINTER)
      .setDisabled(!isSortMode());
    elementsContainer.add(sortableListView);
    elementsContainer.add(sortableBehavior);
    elementsContainer.add(new AttributeAppender("class", new LoadableDetachableModel<String>() {
      private static final long serialVersionUID = 1L;
     
      @Override
      protected String load() {
        if (!SortablePanel.this.isSortMode()) {
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

                    ExternalLink link = new ExternalLink("preview", "#");
                    if(layerSummary.getStatus().successful()) {
                        // TODO: move the preview link generation ability to some utility object
                        PreviewLayer preview = new PreviewLayer(layer);
                        String url = "window.open(\"" + preview.getWmsLink() + "&format=application/openlayers\")";
                        link.add(new AttributeAppender("onclick", new Model(url), ";"));
                    } else {
                        link.setEnabled(false);
                    }
                    f.add(link);
                   
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

        String wfsUrl = "'../ows?service=WFS&version=1.0.0&request=GetFeature&typeName="
          + layer.getName()
          + "&maxFeatures=50"
          + "&outputFormat=' + this.options[this.selectedIndex].value";
        String choice = "(this.options[this.selectedIndex].parentNode.label == 'WMS') ? " + wmsUrl + " : " + wfsUrl;
        menu.add(new AttributeAppender("onchange", new Model("window.open("
                + choice + ");this.selectedIndex=0"), ";"));
        f.add(menu);
        return f;
    }
View Full Code Here

Examples of org.apache.wicket.behavior.AttributeAppender

        init();
    }
   
    void init() {
        add(HeaderContributor.forJavaScript(JSCOLOR_JS));
        add(new AttributeAppender("class", new Model("color {required:false}"), ","));
    }
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

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
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.