Examples of HtmlTag


Examples of com.citytechinc.cq.component.content.htmltag.HtmlTag

        }
        if (StringUtils.isNotBlank(htmlTag.id())) {
            htmlTagParameters.setId(htmlTag.id());
        }

        return new HtmlTag(htmlTagParameters);
    }
View Full Code Here

Examples of com.github.dandelion.core.html.HtmlTag

* @since 0.2.0
*/
public class HtmlUtils {

  public static HtmlTag transformAsset(Asset asset) {
    HtmlTag tag;
    switch (asset.getType()) {
    case css:
      tag = new LinkTag(asset.getFinalLocation());
      break;
    case js:
      tag = new ScriptTag(asset.getFinalLocation());
      break;
    default:
      tag = null;
    }
    if (tag != null) {
      tag.addAttributesOnlyName(asset.getAttributesOnlyName());
      tag.addAttributes(asset.getAttributes());
    }
    return tag;
  }
View Full Code Here

Examples of de.agilecoders.wicket.core.markup.html.bootstrap.html.HtmlTag

        return mousetrap;
    }

    private void init() {

        add(new HtmlTag("html"));

        add(new OptimizedMobileViewportMetaTag("viewport"));
        add(new ChromeFrameMetaTag("chrome-frame"));
        add(new MetaTag("description", Model.of("description"), Model.of("Mystic Paste")));
        add(new MetaTag("author", Model.of("author"), Model.of("Andrew Lombardi")));
View Full Code Here

Examples of de.chris_soft.utilities.web.HtmlTag

  private void createPasswordInputSite(HtmlTag body) {
    addJavascriptLibrary("js/md5.js");
    addJavascriptLibrary("js/password.js");
    copyAllValues();
    body.add("p").add("b").addText("Please enter password for document server access:");
    HtmlTag p = body.add("p");
    p.add("input", "type=\"password\"", varnamePassword);
    p.add("input", "type=\"hidden\"", varnamePasswordMD5);
    p.add("input", "onClick=\"createPwMD5Hash();\" type=\"submit\" value=\"OK\"");
  }
View Full Code Here

Examples of fitnesse.html.HtmlTag

  }

  protected void addStopLink(String stopResponderId) {
    String link = "?responder=stoptest&id=" + stopResponderId;

    HtmlTag status = HtmlUtil.makeSilentLink(link, new RawHtml("Stop Test"));
    status.addAttribute("class", "stop");

    writeData(HtmlUtil.makeReplaceElementScript("test-action", status.html()).html());
  }
View Full Code Here

Examples of info.bliki.wiki.tags.HTMLTag

      if (hashSection == null) {
        String pageName = Encoder.normaliseTitle(fPageTitle, true, ' ',
            true);
        // self link?
        if (title.equals(pageName)) {
          HTMLTag selfLink = new HTMLTag("strong");
          selfLink.addAttribute("class", "selflink", false);
          pushNode(selfLink);
          selfLink.addChild(new ContentToken(description));
          popNode();
          return;
        }
      }
View Full Code Here

Examples of it.tref.eclipse.wicket.plugin.views.HTMLTag

   * @param filepath file to parse
   * @param root html root tag, childs will be attached to it
   */
  public static void parse(String filepath, HTMLTag root)
  {
    HTMLTag parent = root;
   
    for(String tag : parseTags(filepath))
    {
      if(tag.contains(WICKET_ID))
      {
        try {
         
          HTMLTag htmltag = new HTMLTag(tag.substring(0, tag.indexOf(" ")));
         
          int i1 = tag.indexOf("\"", tag.indexOf(WICKET_ID)) + 1;
          int i2 = tag.indexOf("\"", i1);
         
          htmltag.setId(tag.substring(i1, i2));
          htmltag.setParent(parent);
          parent.addChild(htmltag);
       
          if(!tag.endsWith("/"))
            parent = htmltag;
         
View Full Code Here

Examples of jodd.servlet.HtmlTag

   */
  protected String populateForm(String html, FieldResolver resolver) {
    int s = 0;
    StringBuilder result = new StringBuilder((int) (html.length() * 1.2));
    String currentSelectName = null;
    HtmlTag tag = null;
    while (true) {
      if (tag != null) {
        result.append(tag);
      }
      tag = HtmlTag.locateNextTag(html, s);
      if (tag == null) {
        result.append(html.substring(s));
        break;
      }
      result.append(html.substring(s, tag.getStartIndex()));
      s = tag.getNextIndex();

      String tagName = tag.getTagName();
      // process end tags
      if (tag.isEndTag()) {
        if (tagName.equals(SELECT)) {
          currentSelectName = null;
        }
        continue;
      }

      if (tagName.equals(INPUT) == true) {
        // INPUT
        String tagType = tag.getAttribute(TYPE);
        if (tagType == null) {
          continue;
        }
        String name = tag.getAttribute(NAME);
        if (name == null) {
          continue;
        }
        Object valueObject = resolver.value(name);
        if (valueObject == null) {
          continue;
        }
        String value = valueObject.toString();
        tagType = tagType.toLowerCase();

        if (tagType.equals(TEXT)) {
          tag.setAttribute(VALUE, value);
        } else if (tagType.equals(HIDDEN)) {
          tag.setAttribute(VALUE, value);
        } else if (tagType.equals(IMAGE)) {
          tag.setAttribute(VALUE, value);
        } else if (tagType.equals(PASSWORD)) {
          tag.setAttribute(VALUE, value);
        } else if (tagType.equals(CHECKBOX)) {
          String tagValue = tag.getAttribute(VALUE);
          if (tagValue == null) {
            tagValue = TRUE;
          }
          if (valueObject.getClass().isArray()) {
            // checkbox group
            String vs[] = StringUtil.toStringArray(valueObject);
            for (String vsk : vs) {
              if ((vsk != null) && (vsk.equals(tagValue))) {
                tag.setAttribute(CHECKED);
              }
            }
          } else if (tagValue.equals(value)) {
            tag.setAttribute(CHECKED);
          }
        } else if (tagType.equals(RADIO)) {
          String tagValue = tag.getAttribute(VALUE);
          if (tagValue != null) {
            if (tagValue.equals(value)) {
              tag.setAttribute(CHECKED);
            }
          }
        }
      } else if (tagName.equals(TEXTAREA)) {
        String name = tag.getAttribute(NAME);
        Object valueObject = resolver.value(name);
        if (valueObject != null) {
          tag.setSuffixText(HtmlEncoder.text(valueObject.toString()));
        }
      } else if (tagName.equals(SELECT)) {
        currentSelectName = tag.getAttribute(NAME);
      } else if (tagName.equals(OPTION)) {
        if (currentSelectName == null) {
          continue;
        }
        String tagValue = tag.getAttribute(VALUE);
        if (tagValue != null) {
          Object vals = resolver.value(currentSelectName);
          if (vals == null) {
            continue;
          }
          if (vals.getClass().isArray()) {
            String vs[] = StringUtil.toStringArray(vals);
            for (String vsk : vs) {
              if ((vsk != null) && (vsk.equals(tagValue))) {
                tag.setAttribute(SELECTED);
              }
            }
          } else {
            String value = StringUtil.toString(vals);
            if (value.equals(tagValue)) {
              tag.setAttribute(SELECTED);
            }
          }
        }
      }
    }
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlWriter.HtmlTag

            // The Anchors
            if (disabled==false)
            {
                String url = getUrl();

                HtmlTag a = htmlWriter.startTag("a");
                a.addAttribute("id",       this.getId());
                a.addAttribute("href",     url);
        a.addAttribute("target",   this.target);
                a.addAttribute("class",    this.cssClass);
                a.addAttribute("style",    this.cssStyle);
                a.addAttribute("onclick"this.onclick);
                a.beginBody(text);
                a.endTag(body);
            }
            else
            {  
                // disabledTag = null
                HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
                if (disabledTag == null)
                    disabledTag = dic.AnchorDisabledTag();
                if (cssClass ==null)
                    cssClass = dic.AnchorDisabledClass();
                // The value
                HtmlTag s = htmlWriter.startTag(disabledTag);
                s.addAttribute("class",    this.cssClass);
                s.addAttribute("style",    this.cssStyle);
                s.beginBody(text);
                s.endTag(body);
            }
            return false;
           
        } catch (Exception e) {
            log.error("error when rendering", e);
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlWriter.HtmlTag

    // <td class="???"><a href="action!method" class=""/>value</a></td>
   
    @Override
    protected void render(HtmlWriter hw, String body, InputControl control)
    {
        HtmlTag td = hw.startTag(htmlTag);
        td.addAttribute("class", this.cssClass);
        td.addAttribute("style", this.cssStyle);
        td.beginBody();
        // Add Link?
        HtmlTag anchor = null;
        if (action!=null)
        {
            String url = getURL();
            // print href
            anchor = hw.startTag("a");
            anchor.addAttribute("href", url);
            anchor.addAttribute("title", alt);
            anchor.addAttribute("class", anchorClass);
            anchor.addAttribute("onclick", onclick);
            anchor.beginBody();
        }
        // Body prepend
        if (usesBody() && "append".equalsIgnoreCase(bodyUsage)==false)
            hw.print(body);
        // Render Data
        control.renderText(hw, this);
        // Body append
        if (usesBody() && "append".equalsIgnoreCase(bodyUsage))
            hw.print(body);
        // close anchor
        if (anchor!=null)
            anchor.endTag();
        // close td
        td.endTag();
    }
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.