Package com.sun.facelets.tag

Examples of com.sun.facelets.tag.Tag


            for (int i = 0; i < oa.length; i++) {
                if (!"jsfc".equals(oa[i].getLocalName())) {
                    na[p++] = oa[i];
                }
            }
            return new Tag(tag, new TagAttributes(na));
        }
        return tag;
    }
View Full Code Here


                }
                attrList.add(attr[i]);
            }
            attr = (TagAttribute[]) attrList.toArray(new TagAttribute[attrList
                    .size()]);
            return new Tag(tag.getLocation(), tag.getNamespace(), tag
                    .getLocalName(), tag.getQName(), new TagAttributes(attr));
        }
    }
View Full Code Here

     */
    public Tag decorate(Tag tag) {
        if (XhtmlNamespace.equals(tag.getNamespace())) {
            String n = tag.getLocalName();
            if ("a".equals(n)) {
                return new Tag(tag.getLocation(), HtmlLibrary.Namespace,
                        "commandLink", tag.getQName(), tag.getAttributes());
            }
            if ("form".equals(n)) {
                return new Tag(tag.getLocation(), HtmlLibrary.Namespace,
                        "form", tag.getQName(), tag.getAttributes());
            }
            if ("input".equals(n)) {
                TagAttribute attr = tag.getAttributes().get("type");
                if (attr != null) {
                    String t = attr.getValue();
                    TagAttributes na = removeType(tag.getAttributes());
                    if ("text".equals(t)) {
                        return new Tag(tag.getLocation(),
                                HtmlLibrary.Namespace, "inputText", tag
                                        .getQName(), na);
                    }
                    if ("password".equals(t)) {
                        return new Tag(tag.getLocation(),
                                HtmlLibrary.Namespace, "inputSecret", tag
                                        .getQName(), na);
                    }
                    if ("hidden".equals(t)) {
                        return new Tag(tag.getLocation(),
                                HtmlLibrary.Namespace, "inputHidden", tag
                                        .getQName(), na);
                    }
                    if ("submit".equals(t)) {
                        return new Tag(tag.getLocation(),
                                HtmlLibrary.Namespace, "commandButton", tag
                                        .getQName(), na);
                    }
                }
            }
View Full Code Here

      columnConfig = new ComponentConfig() {

        private Tag tag;

        {
          Tag initialTag = config.getTag();
          TagAttribute[] allInitialAttributes = initialTag.getAttributes().getAll();
          TagAttribute[] attributes = new TagAttribute[allInitialAttributes.length];
          for (int i = 0; i < allInitialAttributes.length; i++) {
            TagAttribute initialAttribute = allInitialAttributes[i];
            String localName = initialAttribute.getLocalName();
            String attributeValue = initialAttribute.getValue();
           
            if ("id".equals(localName)) {
              attributeValue += ITERATION_INDEX_EXPRESSION;
            }
           
            attributes[i] = new TagAttribute(initialAttribute.getLocation(),
                initialAttribute.getNamespace(),
                localName,
                initialAttribute.getQName(),
                attributeValue);
          }
         
          TagAttributes tagAttributes = new TagAttributes(attributes);
          this.tag = new Tag(initialTag, tagAttributes);
        }
       
        public String getComponentType() {
          return config.getComponentType();
        }
View Full Code Here

                tagId = "_tagId0";

                Location location = new Location("cdr", 1, 2);
                String ns = "urn:unk";

                tag = new Tag(location, ns, "tag", null,
                        new TagAttributes(new TagAttribute[] {
                                new TagAttribute(location, "", "beanName", null, beanName),
                                new TagAttribute(location, "", "ajaxOnly", null, String.valueOf(ajaxOnly)) }));
            }
View Full Code Here

        if (log.isLoggable(Level.FINE)) {
            log.fine("Tag Pushed: " + orig);
        }

        Tag t = this.tagDecorator.decorate(orig);
        String[] qname = this.determineQName(t);
        t = this.trimAttributes(t);

        boolean handled = false;
View Full Code Here

        this.currentUnit().addChild(unit);
        this.units.push(unit);
    }

    private Tag trimAttributes(Tag tag) {
        Tag t = this.trimJSFCAttribute(tag);
        t = this.trimNSAttributes(t);
        return t;
    }
View Full Code Here

            for (int i = 0; i < oa.length; i++) {
                if (!"jsfc".equals(oa[i].getLocalName())) {
                    na[p++] = oa[i];
                }
            }
            return new Tag(tag, new TagAttributes(na));
        }
        return tag;
    }
View Full Code Here

                }
                attrList.add(attr[i]);
            }
            attr = (TagAttribute[]) attrList.toArray(new TagAttribute[attrList
                    .size()]);
            return new Tag(tag.getLocation(), tag.getNamespace(), tag
                    .getLocalName(), tag.getQName(), new TagAttributes(attr));
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.facelets.tag.Tag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.