KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > faces > facelets > UIXhtmlTagDecorator


1 package com.icesoft.faces.facelets;
2
3 import com.sun.facelets.tag.TagDecorator;
4 import com.sun.facelets.tag.Tag;
5
6 /**
7  * @author Mark Collette
8  * @since 1.6
9  */

10 public class UIXhtmlTagDecorator implements TagDecorator {
11     public UIXhtmlTagDecorator() {
12         super();
13     }
14
15     /**
16      * @see TagDecorator#decorate(com.sun.facelets.tag.Tag)
17      */

18     public Tag decorate(Tag tag) {
19 //System.out.println("UIXhtmlTagDecorator.decorate() tag: " + tag + " tag-ns: " + tag.getNamespace());
20
if( tag.getNamespace() == null || tag.getNamespace().length() == 0 ) {
21             Tag newTag = new Tag(
22                 tag.getLocation(),
23                 UIXhtmlTagLibrary.NAMESPACE,
24                 tag.getLocalName(),
25                 tag.getQName(),
26                 tag.getAttributes() );
27 //System.out.println("UIXhtmlTagDecorator.decorate() newTag: " + newTag);
28
return newTag;
29         }
30         return null;
31     }
32 }
33
Popular Tags