Package com.github.dandelion.datatables.core.html

Examples of com.github.dandelion.datatables.core.html.HtmlHyperlink


    if (StringUtils.isBlank(dom)) {
      addParameter(DTConstants.DT_DOM, "lEfrtip", Mode.OVERRIDE);
    }

    StringBuilder content = new StringBuilder();
    HtmlHyperlink link = null;

    // A HTML link is generated for each ExportConf bean
    for (ExportConf conf : table.getTableConfiguration().getExportConfiguration().values()) {

      link = new HtmlHyperlink();

      if (conf.getCssClass() != null) {
        link.setCssClass(conf.getCssClass());
      }

      if (conf.getCssStyle() != null) {
        link.setCssStyle(conf.getCssStyle());
        link.addCssStyle(";margin-left:2px;");
      }
      else {
        link.addCssStyle("margin-left:2px;");
      }

      if (conf.hasCustomUrl()) {
        link.setOnclick(getOnclick(conf));
      }
      else {
        link.setHref(conf.getUrl());
      }
      link.addContent(conf.getLabel());
      content.append(link.toHtml());
    }
    extraHtml.setContent(content.toString());

    // Once created, the extraHtml is transformed into Javascript and
    // appended in the DataTables configuration
View Full Code Here

TOP

Related Classes of com.github.dandelion.datatables.core.html.HtmlHyperlink

Copyright © 2018 www.massapicom. 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.