1 17 18 package org.objectweb.jac.aspects.gui.web; 19 20 21 import org.objectweb.jac.aspects.gui.*; 22 import org.objectweb.jac.core.rtti.FieldItem; 23 import java.io.PrintWriter ; 24 25 28 29 public class URLEditor extends AbstractFieldEditor 30 implements FieldEditor, HTMLEditor 31 { 32 35 36 public URLEditor(Object substance, FieldItem field) { 37 super(substance,field); 38 } 39 40 42 public void genHTML(PrintWriter out) { 43 out.println("<input type=text size=30 name=\""+label+"\" "+ 44 "value=\""+(value!=null?value.toString():"")+"\""); 45 printAttributes(out); 46 out.println(">"); 47 } 48 49 protected boolean doReadValue(Object parameter) { 50 setValue(Utils.stringToURL((String )parameter)); 51 return true; 52 } 53 } 54 | Popular Tags |