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

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

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

Tag.getAttributes介绍

[英]Return an object encapsulating the TagAttributes specified on this element in the view.
[中]

代码示例

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

/**
 * Utility method for fetching the appropriate TagAttribute
 * 
 * @param localName
 *            name of attribute
 * @return TagAttribute if found, otherwise null
 */
protected final TagAttribute getAttribute(String localName) {
  return this.tag.getAttributes().get(localName);
}

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

/**
 * Utility method for fetching the appropriate TagAttribute
 * 
 * @param localName
 *            name of attribute
 * @return TagAttribute if found, otherwise null
 */
protected final TagAttribute getAttribute(String localName) {
  return this.tag.getAttributes().get(localName);
}

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

private boolean hasJsfAttribute(Tag tag) {
  for (String ns : tag.getAttributes().getNamespaces()) {
    if (Namespace.jsf.uri.equals(ns)) {
      return true;
    }
  }
  return false;
}

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

private boolean hasJsfAttribute(Tag tag) {
  for (String ns : tag.getAttributes().getNamespaces()) {
    if (Namespace.jsf.uri.equals(ns)) {
      return true;
    }
  }
  return false;
}

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

/**
 * Utility method for fetching the appropriate TagAttribute
 * 
 * @param localName
 *            name of attribute
 * @return TagAttribute if found, otherwise null
 */
protected final TagAttribute getAttribute(String localName)
{
  return this.tag.getAttributes().get(localName);
}

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

/**
 * Utility method for fetching the appropriate TagAttribute
 * 
 * @param localName
 *            name of attribute
 * @return TagAttribute if found, otherwise null
 */
protected final TagAttribute getAttribute(String localName) {
  return this.tag.getAttributes().get(localName);
}

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

/**
 * Utility method for fetching the appropriate TagAttribute
 * 
 * @param localName
 *            name of attribute
 * @return TagAttribute if found, otherwise null
 */
protected final TagAttribute getAttribute(String localName) {
  return this.tag.getAttributes().get(localName);
}

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

private boolean hasJsfAttribute(Tag tag) {
  for (String ns : tag.getAttributes().getNamespaces()) {
    if (Namespace.jsf.uri.equals(ns)) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.icefaces/icefaces-ace

public StackPaneHandler(ComponentConfig componentConfig) {
  super(componentConfig);
  Tag tag = componentConfig.getTag();
  facelet = tag.getAttributes().get("facelet");
  client = tag.getAttributes().get("client");
  savedId = tag.getAttributes().get("id");
}
@Override

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

protected final TagAttribute getRequiredPassthroughAttribute(String localName)
    throws TagException {
  TagAttribute attr = this.tag.getAttributes().get(PassThroughAttributeLibrary.Namespace, localName);
  if (attr == null) {
    throw new TagException(this.tag, "Attribute '" + localName
        + "' is required");
  }
  return attr;
}

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

protected final TagAttribute getRequiredPassthroughAttribute(String localName)
    throws TagException {
  TagAttribute attr = this.tag.getAttributes().get(PassThroughAttributeLibrary.Namespace, localName);
  if (attr == null) {
    throw new TagException(this.tag, "Attribute '" + localName
        + "' is required");
  }
  return attr;
}

代码示例来源:origin: org.icefaces/icefaces-ace

public StackHandler(ComponentConfig componentConfig) {
  super(componentConfig);
  Tag tag = componentConfig.getTag();
  selectedIdTag = tag.getAttributes().get("selectedId");
}

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

public CompositeComponentTagHandler(Resource ccResource, ComponentConfig config) {
  super(config);
  this.ccResource = ccResource;
  this.binding = config.getTag().getAttributes().get("binding");
  ((ComponentTagHandlerDelegateImpl)this.getTagHandlerDelegate()).setCreateCompositeComponentDelegate(this);
}

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

public CompositeComponentTagHandler(Resource ccResource, ComponentConfig config) {
  super(config);
  this.ccResource = ccResource;
  this.binding = config.getTag().getAttributes().get("binding");
  ((ComponentTagHandlerDelegateImpl)this.getTagHandlerDelegate()).setCreateCompositeComponentDelegate(this);
}

代码示例来源:origin: org.richfaces.ui/richfaces-components-ui

public TagAttribute getTagAttribute(String localName) {
  // workaround for MyFaces
  if (componentHandler == null) {
    return getComponentConfig().getTag().getAttributes().get(localName);
  }
  return componentHandler.getTagAttribute(localName);
}

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

private Tag generateTagIfNecessary(Tag tag, TagAttributes modifiedAttributes) {
  if (modifiedAttributes != tag.getAttributes()) {
    if (tag.getLocalName().equals("div") && modifiedAttributes instanceof AFTagAttributes) {
      return generatePuiHtmlTag(tag, modifiedAttributes, "puiDiv");
    } else if (tag.getLocalName().equals("span") && modifiedAttributes instanceof AFTagAttributes) {
      return generatePuiHtmlTag(tag, modifiedAttributes, "puiSpan");
    } else
      return new Tag(tag.getLocation(), tag.getNamespace(), tag.getLocalName(), tag.getQName(), modifiedAttributes);
  }
  return null;
}

代码示例来源: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;
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-web-resources-jsf

public PageResourceHandler(TagConfig config) {
  super(config);
  this.config = config;
  name = getAttribute("name");
  type = getAttribute("type");
  flavor = getAttribute("flavor");
  target = getAttribute("target");
  includeTimestamp = getAttribute("includeTimestamp");
  vars = tag.getAttributes().getAll();
}

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

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;
}

相关文章