Package javax.faces.view.facelets

Examples of javax.faces.view.facelets.Tag


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


   
    @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

   
    public Tag decorate(Tag tag)
    {
        // The default tag decorator is special, because a non null return value does not
        // stop processing.
        Tag processedTag = this.defaultTagDecorator.decorate(tag);
        // If a not null value is returned, pass the processedTag, otherwise pass the default one.
        return compositeTagDecorator.decorate(processedTag != null ? processedTag : tag);
    }
View Full Code Here

        this.defaultTagDecorator = defaultTagDecorator;
    }

    public Tag decorate(Tag tag)
    {
        Tag processedTag = defaultTagDecorator.decorate(tag);
        return processedTag != null ? processedTag : tag;
    }
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

        }
        return componentToTagMap.put((Integer) System.identityHashCode(c), t);
    }

    public static Tag getTagForComponent(FacesContext context, UIComponent c) {
        Tag result = null;
        Map<Object, Object> contextMap = context.getAttributes();
        Map<Integer, Tag> componentToTagMap;
        componentToTagMap = (Map<Integer, Tag>)
                contextMap.get(COMPONENT_TO_TAG_MAP_NAME);
        if (null != componentToTagMap) {
View Full Code Here

        }
        return componentToTagMap.put((Integer) System.identityHashCode(c), t);
    }

    public static Tag getTagForComponent(FacesContext context, UIComponent c) {
        Tag result = null;
        Map<Object, Object> contextMap = context.getAttributes();
        Map<Integer, Tag> componentToTagMap;
        componentToTagMap = (Map<Integer, Tag>)
                contextMap.get(COMPONENT_TO_TAG_MAP_NAME);
        if (null != componentToTagMap) {
View Full Code Here

        }
        return componentToTagMap.put((Integer) System.identityHashCode(c), t);
    }

    public static Tag getTagForComponent(FacesContext context, UIComponent c) {
        Tag result = null;
        Map<Object, Object> contextMap = context.getAttributes();
        Map<Integer, Tag> componentToTagMap;
        componentToTagMap = (Map<Integer, Tag>)
                contextMap.get(COMPONENT_TO_TAG_MAP_NAME);
        if (null != componentToTagMap) {
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

                }
            }
           
            if (inCompositeInterface)
            {
                this.unit.pushTag(new Tag(createLocation(), uri, localName, qName, 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(createLocation(), uri, localName, qName, createAttributes(attributes)));
                }
            }
        }
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.