本文整理了Java中javax.faces.view.facelets.Tag.<init>()
方法的一些代码示例,展示了Tag.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tag.<init>()
方法的具体详情如下:
包路径:javax.faces.view.facelets.Tag
类名称:Tag
方法名:<init>
[英]Constructor.
[中]建造师。
代码示例来源:origin: stackoverflow.com
CreateTagsRequest createTagsRequest = new CreateTagsRequest();
.withTags(new Tag("Name", "travel-ecommerce-" + idx));
ec2.createTags(createTagsRequest);
代码示例来源:origin: stackoverflow.com
@Test
@DatabaseSetup(value = "/TagDAOTest.xml")
@ExpectedDatabase(assertionMode=DatabaseAssertionMode.NON_STRICT, value= "/expectedData.xml")
public void testInsert() throws Exception {
Tag tagToInsert = new Tag(4, "insertedTag");
tagDAO.insert(tagToInsert);
}
代码示例来源:origin: stackoverflow.com
...
// Tag in a transient state
Tag tag = new Tag();
tag.setName("A");
// Tag in a persistent state
Long id = (Long) session.save(tag);
// Tag in a detached state
session.close();
...
代码示例来源:origin: stackoverflow.com
public void addTag(String tagName) {
Tag tag = new Tag();
tag.setUniqueName(tagName);
tag.getPhrases().add(this);
this.tagObjects.add(tag);
}
代码示例来源:origin: net.bootsfaces/bootsfaces
private Tag convertElementToInputTag(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, "inputText", "b:inputText", less);
return t;
}
代码示例来源:origin: net.bootsfaces/bootsfaces
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: 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: 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: 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 Tag convertToInputTag(Tag tag, TagAttributes attributeList) {
TagAttribute[] attributes = attributeList.getAll();
TagAttributes more = new AFTagAttributes(attributes);
Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "inputText", "b:inputText", more);
return t;
}
代码示例来源:origin: de.beyondjava/angularFaces-core
private Tag convertToInputText(Tag tag, TagAttributes attributeList) {
TagAttribute[] attributes = attributeList.getAll();
TagAttributes more = new AFTagAttributes(attributes);
Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "inputText", "inputText", more);
return t;
}
代码示例来源:origin: TheCoder4eu/BootsFaces-OSP
private Tag convertDivTagToPanelGroup(Tag tag, TagAttributes attributeList, boolean isDiv) {
TagAttribute[] attributes = attributeList.getAll();
TagAttributes more = addBlockAttributeIfNeeded(tag, isDiv, attributes);
Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "panelGroup", "panelGroup", more);
return t;
}
代码示例来源: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: 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: TheCoder4eu/BootsFaces-OSP
/**
* Converts <option>firstComboboxItem</option> to <f:selectItem itemValue="firstComboxItem">.
*/
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: de.beyondjava/angularFaces-core
private Tag convertToTranslateTag(Tag tag, TagAttributes modifiedAttributes) {
TagAttribute[] attributes = modifiedAttributes.getAll();
AFTagAttributes more = new AFTagAttributes(attributes);
if (null == more.get(JSF_NAMESPACE, "value")) {
more.addAttribute(tag.getLocation(), "http://beyondjava.net/angularFacesCore", "puitranslate",
"ac:puitranslate", "true");
}
Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "outputText", "h:outputText", more);
return t;
}
代码示例来源:origin: org.glassfish/javax.faces
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;
}
内容来源于网络,如有侵权,请联系作者删除!