javax.faces.view.facelets.Tag.getLocation()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(136)

本文整理了Java中javax.faces.view.facelets.Tag.getLocation()方法的一些代码示例,展示了Tag.getLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.getLocation()方法的具体详情如下:
包路径:javax.faces.view.facelets.Tag
类名称:Tag
方法名:getLocation

Tag.getLocation介绍

[英]Return the Location of this Tag instance in the Facelet view.
[中]返回此Tag实例在Facelet视图中的位置。

代码示例

代码示例来源:origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

public Location getLocation()
  {
    return this.tag.getLocation();
  }
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

public Location getLocation()
  {
    return this.tag.getLocation();
  }
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-impl

@Override
  public Tag decorate(Tag orig, TagAttributes attributes)
  {
    return new Tag(orig.getLocation(), this.targetNamespace, 
      this.targetLocalName, this.targetQName, attributes);
  }
}

代码示例来源:origin: de.beyondjava/angularFaces-core

private Tag convertToPuiMessagesTag(Tag tag, TagAttributes attributeList) {
  if (tag.getNamespace().equals(PRIMEFACES_NAMESPACE)) {
    AFTagAttributes modifiedAttributes = new AFTagAttributes(attributeList.getAll());
    modifiedAttributes.addAttribute(tag.getLocation(), PASS_THROUGH_NAMESPACE, "primefaces", "primefaces", "true");
    Tag t = new Tag(tag.getLocation(), HTML_NAMESPACE, "puimessages", "puimessages", modifiedAttributes);
    return t;
  } else {
    Tag t = new Tag(tag.getLocation(), HTML_NAMESPACE, "puimessages", "puimessages", attributeList);
    return t;
  }
}

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

private TagAttributes addBlockAttributeIfNeeded(Tag tag, boolean isDiv, TagAttribute[] attributes) {
  TagAttribute[] moreAttributes = attributes;
  if (isDiv) {
    moreAttributes = new TagAttribute[attributes.length + 1];
    for (int i = 0; i < attributes.length; i++)
      moreAttributes[i] = attributes[i];
    moreAttributes[attributes.length] = TagAttributeUtilities.createTagAttribute(tag.getLocation(),
        HTML_NAMESPACE, "display", "display", "block");
  }
  TagAttributes more = new AFTagAttributes(moreAttributes);
  return more;
}

代码示例来源:origin: net.bootsfaces/bootsfaces

private TagAttribute createElementName(Tag tag) {
  Location location = tag.getLocation();
  String ns = Namespace.p.uri;
  String myLocalName = Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY;
  String qName = "p:" + myLocalName;
  String value = tag.getLocalName();
  return TagAttributeUtilities.createTagAttribute(location, ns, myLocalName, qName, value);
}

代码示例来源:origin: com.sun.faces/jsf-impl

private TagAttribute createElementName(Tag tag) {
  Location location = tag.getLocation();
  String ns = Namespace.p.uri;
  String myLocalName = Renderer.PASSTHROUGH_RENDERER_LOCALNAME_KEY;
  String qName = "p:" + myLocalName;
  String value = tag.getLocalName();
  return new TagAttributeImpl(location, ns, myLocalName, qName, value);
}

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

private Tag convertElementToSelectOneMenuTag(Tag tag, TagAttributes modifiedAttributes) {
  TagAttribute[] attributes = modifiedAttributes.getAll();
  TagAttribute[] lessAttributes = Arrays.copyOf(attributes, attributes.length - 1);
  TagAttributes less = new AFTagAttributes(lessAttributes);
  Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "selectOneMenu", "b:selectOneMenu", less);
  return t;
}

代码示例来源:origin: javax/javaee-web-api

/**
 * Constructor.
 *
 * @param orig the original tag.
 * @param attributes the tag attributes.
 */
public Tag(Tag orig, TagAttributes attributes) {
  this(orig.getLocation(), orig.getNamespace(), orig.getLocalName(), orig
      .getQName(), attributes);
}

代码示例来源:origin: javax.faces/javax.faces-api

/**
 * Constructor.
 *
 * @param orig the original tag.
 * @param attributes the tag attributes.
 */
public Tag(Tag orig, TagAttributes attributes) {
  this(orig.getLocation(), orig.getNamespace(), orig.getLocalName(), orig
      .getQName(), attributes);
}

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

private Tag convertDivElementToPanelGroup(Tag tag, TagAttributes modifiedAttributes, boolean isDiv) {
  TagAttribute[] attributes = modifiedAttributes.getAll();
  TagAttributes more = addBlockAttributeIfNeeded(tag, isDiv, attributes);
  Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "panelGroup", "h:panelGroup", more);
  return t;
}

代码示例来源:origin: net.bootsfaces/bootsfaces

private Tag convertToSelectOneMenuTag(Tag tag, TagAttributes attributeList) {
  TagAttribute[] attributes = attributeList.getAll();
  TagAttributes more = new AFTagAttributes(attributes);
  Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "selectOneMenu", "b:selectOneMenu", more);
  return t;
}

代码示例来源:origin: org.apache.myfaces.core/myfaces-api

private static String print(Tag tag, TagAttribute attr)
  {
    return tag.getLocation() + " <" + tag.getQName() + " " + attr.getQName() + "=\"" + attr.getValue() + "\">";
  }
}

代码示例来源:origin: com.sun.faces/jsf-api

private static String print(Tag tag, TagAttribute attr) {
  return tag.getLocation() + " <" + tag.getQName() + " " + attr.getQName()
      + "=\"" + attr.getValue() + "\">";
}

代码示例来源:origin: org.glassfish/javax.faces

/**
 * Constructor.
 *
 * @param orig the original tag.
 * @param attributes the tag attributes.
 */
public Tag(Tag orig, TagAttributes attributes) {
  this(orig.getLocation(), orig.getNamespace(), orig.getLocalName(), orig
      .getQName(), attributes);
}

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

private Tag convertToSelectOneMenuTag(Tag tag, TagAttributes attributeList) {
  TagAttribute[] attributes = attributeList.getAll();
  TagAttributes more = new AFTagAttributes(attributes);
  Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "selectOneMenu", "b:selectOneMenu", more);
  return t;
}

代码示例来源:origin: com.sun.faces/jsf-impl

public void apply(FaceletContext ctx, UIComponent parent)
   throws IOException {
  UIComponent compositeParent =
     UIComponent.getCurrentCompositeComponent(ctx.getFacesContext());
  if (compositeParent != null) {
    compositeParent.subscribeToEvent(PostAddToViewEvent.class,
                     new RelocateFacetListener(ctx,
                                  parent,
                                  this.tag.getLocation()));
  }
}

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

/**
 * Converts &lt;option&gt;firstComboboxItem&lt;/option&gt; to &lt;f:selectItem itemValue="firstComboxItem"&gt;.
 */
private Tag convertTofSelectItemText(Tag tag, TagAttributes attributeList) {
  TagAttribute[] attributes = attributeList.getAll();
  AFTagAttributes more = new AFTagAttributes(attributes);
  more.replaceAttribute("value", "itemValue");
  more.replaceAttribute("label", "itemLabel");
  Tag t = new Tag(tag.getLocation(), JSF_CORE_NAMESPACE, "selectItem", "selectItem", more);
  return t;
}

代码示例来源:origin: com.sun.faces/jsf-impl

protected Tag convertTag(Tag tag, Namespace namespace, String localName) {
  Location location = tag.getLocation();
  String ns = namespace.uri;
  String qName = namespace.name() + ":" + localName;
  TagAttributes attributes = convertAttributes(tag.getAttributes());
  Tag converted = new Tag(location, ns, localName, qName, attributes);
  for (TagAttribute tagAttribute : attributes.getAll()) {
    // set the correct tag
    tagAttribute.setTag(converted);
  }
  return converted;
}

代码示例来源:origin: TheCoder4eu/BootsFaces-OSP

protected Tag convertTag(Tag tag, Namespace namespace, String localName) {
  Location location = tag.getLocation();
  String ns = namespace.uri;
  String qName = namespace.name() + ":" + localName;
  TagAttributes attributes = convertAttributes(tag.getAttributes(), tag);
  Tag converted = new Tag(location, ns, localName, qName, attributes);
  for (TagAttribute tagAttribute : attributes.getAll()) {
    // set the correct tag
    tagAttribute.setTag(converted);
  }
  return converted;
}

相关文章