KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > faces > test > TestUIComponentFactory


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.faces.test;
6
7 import org.exoplatform.faces.UIComponentFactory;
8 import org.exoplatform.faces.core.renderer.xhtmlmp.SimpleFormRenderer;
9 import org.exoplatform.test.BasicTestCase;
10 /**
11  * Thu, May 15, 2004 @
12  * @author: Tuan Nguyen
13  * @version: $Id: TestUIComponentFactory.java,v 1.4 2004/08/05 14:58:42 tuan08 Exp $
14  * @email: tuan08@yahoo.com
15  */

16 public class TestUIComponentFactory extends BasicTestCase {
17     
18   public TestUIComponentFactory(String JavaDoc name) {
19     super(name);
20   }
21
22   public void setUp() throws Exception JavaDoc {
23     
24   }
25   
26   public void tearDown() throws Exception JavaDoc {
27
28   }
29   
30   public void testFactory() throws Exception JavaDoc {
31     UIComponentFactory factory = new UIComponentFactory(null) ;
32     //factory.createUIComponent("org.exoplatform.faces.test.UIComponent1") ;
33
factory.createUIComponent("org.exoplatform.faces.test.UIComponent1$UIInnerComponent") ;
34     //Class clazz = Class.forName("org.exoplatform.faces.test.UIComponent1$UIInnerComponent") ;
35
//System.out.println(UIComponent1.UIInnerComponent.class.getName()) ;
36
}
37   
38   public void testGetLabel() throws Exception JavaDoc {
39     SimpleFormRenderer renderer = new SimpleFormRenderer() ;
40     String JavaDoc s = renderer.getLabel("<img SRC='/skin/blank.gif'/>test") ;
41     System.out.println("label = " + s) ;
42   }
43 }
Popular Tags