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

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

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

Tag.<init>介绍

[英]Constructor.
[中]建造师。

代码示例

代码示例来源:origin: stackoverflow.com

  1. CreateTagsRequest createTagsRequest = new CreateTagsRequest();
  2. .withTags(new Tag("Name", "travel-ecommerce-" + idx));
  3. ec2.createTags(createTagsRequest);

代码示例来源:origin: stackoverflow.com

  1. @Test
  2. @DatabaseSetup(value = "/TagDAOTest.xml")
  3. @ExpectedDatabase(assertionMode=DatabaseAssertionMode.NON_STRICT, value= "/expectedData.xml")
  4. public void testInsert() throws Exception {
  5. Tag tagToInsert = new Tag(4, "insertedTag");
  6. tagDAO.insert(tagToInsert);
  7. }

代码示例来源:origin: stackoverflow.com

  1. ...
  2. // Tag in a transient state
  3. Tag tag = new Tag();
  4. tag.setName("A");
  5. // Tag in a persistent state
  6. Long id = (Long) session.save(tag);
  7. // Tag in a detached state
  8. session.close();
  9. ...

代码示例来源:origin: stackoverflow.com

  1. public void addTag(String tagName) {
  2. Tag tag = new Tag();
  3. tag.setUniqueName(tagName);
  4. tag.getPhrases().add(this);
  5. this.tagObjects.add(tag);
  6. }

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

  1. private Tag convertElementToInputTag(Tag tag, TagAttributes modifiedAttributes) {
  2. TagAttribute[] attributes = modifiedAttributes.getAll();
  3. TagAttribute[] lessAttributes = Arrays.copyOf(attributes, attributes.length - 1);
  4. TagAttributes less = new AFTagAttributes(lessAttributes);
  5. Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "inputText", "b:inputText", less);
  6. return t;
  7. }

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

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

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

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

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

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

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

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

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

  1. private Tag convertToPuiMessagesTag(Tag tag, TagAttributes attributeList) {
  2. if (tag.getNamespace().equals(PRIMEFACES_NAMESPACE)) {
  3. AFTagAttributes modifiedAttributes = new AFTagAttributes(attributeList.getAll());
  4. modifiedAttributes.addAttribute(tag.getLocation(), PASS_THROUGH_NAMESPACE, "primefaces", "primefaces", "true");
  5. Tag t = new Tag(tag.getLocation(), HTML_NAMESPACE, "puimessages", "puimessages", modifiedAttributes);
  6. return t;
  7. } else {
  8. Tag t = new Tag(tag.getLocation(), HTML_NAMESPACE, "puimessages", "puimessages", attributeList);
  9. return t;
  10. }
  11. }

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

  1. private Tag convertToInputTag(Tag tag, TagAttributes attributeList) {
  2. TagAttribute[] attributes = attributeList.getAll();
  3. TagAttributes more = new AFTagAttributes(attributes);
  4. Tag t = new Tag(tag.getLocation(), BOOTSFACES_NAMESPACE, "inputText", "b:inputText", more);
  5. return t;
  6. }

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

  1. private Tag convertToInputText(Tag tag, TagAttributes attributeList) {
  2. TagAttribute[] attributes = attributeList.getAll();
  3. TagAttributes more = new AFTagAttributes(attributes);
  4. Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "inputText", "inputText", more);
  5. return t;
  6. }

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

  1. private Tag convertDivTagToPanelGroup(Tag tag, TagAttributes attributeList, boolean isDiv) {
  2. TagAttribute[] attributes = attributeList.getAll();
  3. TagAttributes more = addBlockAttributeIfNeeded(tag, isDiv, attributes);
  4. Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "panelGroup", "panelGroup", more);
  5. return t;
  6. }

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

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

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

  1. private Tag generateTagIfNecessary(Tag tag, TagAttributes modifiedAttributes) {
  2. if (modifiedAttributes != tag.getAttributes()) {
  3. if (tag.getLocalName().equals("div") && modifiedAttributes instanceof AFTagAttributes) {
  4. return generatePuiHtmlTag(tag, modifiedAttributes, "puiDiv");
  5. } else if (tag.getLocalName().equals("span") && modifiedAttributes instanceof AFTagAttributes) {
  6. return generatePuiHtmlTag(tag, modifiedAttributes, "puiSpan");
  7. } else
  8. return new Tag(tag.getLocation(), tag.getNamespace(), tag.getLocalName(), tag.getQName(), modifiedAttributes);
  9. }
  10. return null;
  11. }

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

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

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

  1. protected Tag convertTag(Tag tag, Namespace namespace, String localName) {
  2. Location location = tag.getLocation();
  3. String ns = namespace.uri;
  4. String qName = namespace.name() + ":" + localName;
  5. TagAttributes attributes = convertAttributes(tag.getAttributes());
  6. Tag converted = new Tag(location, ns, localName, qName, attributes);
  7. for (TagAttribute tagAttribute : attributes.getAll()) {
  8. // set the correct tag
  9. tagAttribute.setTag(converted);
  10. }
  11. return converted;
  12. }

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

  1. private Tag convertToTranslateTag(Tag tag, TagAttributes modifiedAttributes) {
  2. TagAttribute[] attributes = modifiedAttributes.getAll();
  3. AFTagAttributes more = new AFTagAttributes(attributes);
  4. if (null == more.get(JSF_NAMESPACE, "value")) {
  5. more.addAttribute(tag.getLocation(), "http://beyondjava.net/angularFacesCore", "puitranslate",
  6. "ac:puitranslate", "true");
  7. }
  8. Tag t = new Tag(tag.getLocation(), JSF_NAMESPACE, "outputText", "h:outputText", more);
  9. return t;
  10. }

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

  1. protected Tag convertTag(Tag tag, Namespace namespace, String localName) {
  2. Location location = tag.getLocation();
  3. String ns = namespace.uri;
  4. String qName = namespace.name() + ":" + localName;
  5. TagAttributes attributes = convertAttributes(tag.getAttributes());
  6. Tag converted = new Tag(location, ns, localName, qName, attributes);
  7. for (TagAttribute tagAttribute : attributes.getAll()) {
  8. // set the correct tag
  9. tagAttribute.setTag(converted);
  10. }
  11. return converted;
  12. }

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

  1. protected Tag convertTag(Tag tag, Namespace namespace, String localName) {
  2. Location location = tag.getLocation();
  3. String ns = namespace.uri;
  4. String qName = namespace.name() + ":" + localName;
  5. TagAttributes attributes = convertAttributes(tag.getAttributes(), tag);
  6. Tag converted = new Tag(location, ns, localName, qName, attributes);
  7. for (TagAttribute tagAttribute : attributes.getAll()) {
  8. // set the correct tag
  9. tagAttribute.setTag(converted);
  10. }
  11. return converted;
  12. }

相关文章