Package javax.faces.view.facelets

Examples of javax.faces.view.facelets.Tag


   
    @Test
    public void testDefaultTagDecorator4() throws Exception
    {
        Location location = new Location("/test.xhtml", 20, 5);
        Tag tag = new Tag(location, DefaultTagDecorator.XHTML_NAMESPACE, "a", "a",
            new TagAttributesImpl(new TagAttribute[]
                {
                    new TagAttributeImpl(location, DefaultTagDecorator.JSF_ALIAS_NAMESPACE, "action", "jsf:action", "#{test.testAction}")
                }
            ));
       
        TagDecorator tagDecorator = new DefaultTagDecorator();
        Tag decoratedTag = tagDecorator.decorate(tag);
       
        Assert.assertNotNull(decoratedTag);
    }
View Full Code Here


                stringValue = entry.getValue().toString();
            }
            ta[i] = new TagAttributeImpl(location, "", entry.getKey(), entry.getKey(), stringValue);
            i++;
        }       
        mngr.pushTag(new Tag(location, taglibURI, tagName, "oamf:"+tagName, new TagAttributesImpl(ta)));
        mngr.popTag();
        mngr.popNamespace(prefix);
       
        FaceletHandler handler = new DynamicComponentFacelet((NamespaceHandler) mngr.createFaceletHandler());
        return handler;
View Full Code Here

            this.inDocument = false;
        }

        public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
        {
            this.unit.pushTag(new Tag(this.createLocation(), uri, localName, qName, this.createAttributes(attributes)));
        }
View Full Code Here

                {
                    this.inMetadata=true;
                }
                else if (!inMetadata && "view".equals(localName))
                {
                    this.unit.pushTag(new Tag(createLocation(), uri, localName, qName, createAttributes(attributes)));
                }
            }
            if (inMetadata)
            {
                this.unit.pushTag(new Tag(createLocation(), uri, localName, qName, createAttributes(attributes)));
            }
        }
View Full Code Here

                }
            }
           
            if (inCompositeInterface)
            {
                this.unit.pushTag(new Tag(createLocation(), uri, localName, qName, createAttributes(attributes)));
            }
            else if (inCompositeImplementation &&
                (CompositeLibrary.NAMESPACE.equals(uri) || CompositeLibrary.ALIAS_NAMESPACE.equals(uri)))
            {
                if ("insertFacet".equals(localName)    ||
                    "renderFacet".equals(localName)    ||
                    "insertChildren".equals(localName) ||
                    ImplementationHandler.NAME.equals(localName)   )
                {
                    this.unit.pushTag(new Tag(createLocation(), uri, localName, qName, createAttributes(attributes)));
                }
            }
        }
View Full Code Here

            }
        }
       
        public Tag decorate(Tag orig, TagAttributes attributes)
        {
            return new Tag(orig.getLocation(), this.targetNamespace,
                this.targetLocalName, this.targetQName, attributes);
        }
View Full Code Here

            this.inDocument = false;
        }

        public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
        {
            this.unit.pushTag(new Tag(this.createLocation(), uri, localName, qName, this.createAttributes(attributes)));
        }
View Full Code Here

            {
                this.inMetadata=true;
            }
            if (inMetadata)
            {
                this.unit.pushTag(new Tag(this.createLocation(), uri, localName, qName, this.createAttributes(attributes)));
            }
        }
View Full Code Here

                }
            }
           
            if (inCompositeInterface)
            {
                this.unit.pushTag(new Tag(this.createLocation(), uri, localName, qName, this.createAttributes(attributes)));
            }
            else if (inCompositeImplementation && CompositeLibrary.NAMESPACE.equals(uri))
            {
                if ("insertFacet".equals(localName)    ||
                    "renderFacet".equals(localName)    ||
                    "insertChildren".equals(localName) ||
                    ImplementationHandler.NAME.equals(localName)   )
                {
                    this.unit.pushTag(new Tag(this.createLocation(), uri, localName, qName, this.createAttributes(attributes)));
                }
            }
        }
View Full Code Here

        }
    }

    public void endTag()
    {
        Tag tag = (Tag) this.tags.pop();

        if (HTML.BODY_ELEM.equalsIgnoreCase(tag.getQName()))
        {
            this.addInstruction(new BodyEndElementInstruction(tag.getQName()));
        }
        else
        {
            this.addInstruction(new EndElementInstruction(tag.getQName()));           
        }

        if (this.startTagOpen)
        {
            this.buffer.append("/>");
            this.startTagOpen = false;
        }
        else
        {
            this.buffer.append("</").append(tag.getQName()).append('>');
        }
    }
View Full Code Here

TOP

Related Classes of javax.faces.view.facelets.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.