1 package net.sourceforge.formview.displayer.test; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 5 6 import net.sourceforge.formview.FormViewException; 7 import net.sourceforge.formview.displayer.DisplayerConfig; 8 import net.sourceforge.formview.displayer.DisplayersConfigResources; 9 10 import org.xml.sax.SAXException ; 11 12 public class TestIfDisplayerConfig { 13 14 17 public static void main(String [] args) throws FormViewException, IOException , SAXException { 18 InputStream inDisplayerConfig = null; 19 DisplayersConfigResources resources = null; 21 try { 22 23 inDisplayerConfig = DisplayersConfigResources.class.getResourceAsStream("displayers-config.xml"); 24 resources = new DisplayersConfigResources(inDisplayerConfig); 25 26 } finally { 27 if (inDisplayerConfig != null) { 29 inDisplayerConfig.close(); 30 } 31 32 } 33 34 DisplayerConfig displayerConfig = resources.getDisplayerConfig("select"); 36 System.out.println(displayerConfig.toString()); 37 38 39 40 } 41 42 private static String getHtmlInputContent() { 43 StringBuffer htmlContent = new StringBuffer (""); 44 htmlContent.append("<input name=\"htmlElementCheckBox\" type=\"checkbox\" >\n"); 45 return htmlContent.toString(); 46 } 47 48 49 } 50 | Popular Tags |