本文整理汇总了Java中javax.faces.view.Location类的典型用法代码示例。如果您正苦于以下问题:Java Location类的具体用法?Java Location怎么用?Java Location使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Location类属于javax.faces.view包,在下文中一共展示了Location类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertTag
import javax.faces.view.Location; //导入依赖的package包/类
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;
}
示例2: createElementName
import javax.faces.view.Location; //导入依赖的package包/类
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);
}
示例3: convertTagAttribute
import javax.faces.view.Location; //导入依赖的package包/类
protected TagAttribute convertTagAttribute(TagAttribute attribute) {
Location location = attribute.getLocation();
String ns = attribute.getNamespace();
String myLocalName = attribute.getLocalName();
String qName;
String value = attribute.getValue();
if (Namespace.jsf.uri.equals(attribute.getNamespace())) {
// make this a component attribute
qName = myLocalName;
ns = "";
} else {
if (ns.length() != 0 && !ns.equals(attribute.getTag().getNamespace())) {
// the attribute has a different namespace than the tag.
// preserve it.
return attribute;
}
if (attribute.getLocalName().equals(otherHtmlIdAttribute)) {
// special case for input name
qName = "id";
myLocalName = "id";
} else {
// make this a pass through attribute
qName = "h:" + myLocalName;
ns = Namespace.h.uri;
}
}
return TagAttributeUtilities.createTagAttribute(location, ns, myLocalName, qName, value);
}
示例4: getLocation
import javax.faces.view.Location; //导入依赖的package包/类
@Override
public Location getLocation() {
throw new UnsupportedOperationException(NOT_SUPPORTED_YET);
}
示例5: addAttribute
import javax.faces.view.Location; //导入依赖的package包/类
public void addAttribute(Location location, String ns, String myLocalName, String qName, String value) {
TagAttribute[] newAttrs = Arrays.copyOf(attrs, attrs.length+1);
newAttrs[attrs.length] = TagAttributeUtilities.createTagAttribute(location, ns, myLocalName, qName, value);
init(newAttrs);
}
示例6: getLocation
import javax.faces.view.Location; //导入依赖的package包/类
/**
* Gets the location.
*
* @return the location
*/
public Location getLocation() {
return this.location;
}
示例7: setLocation
import javax.faces.view.Location; //导入依赖的package包/类
/**
* Sets the location.
*
* @param location
* the new location
*/
public void setLocation(final Location location) {
this.location = location;
}