1 package org.nextime.ion.admin.helper; 2 3 import java.util.*; 4 5 public class DataForm { 6 7 public static synchronized String getForm( Hashtable ht ) { 8 if( ht == null ) ht = new Hashtable(); 9 String form = ""; 10 form+="<table>"; 11 Enumeration en = ht.keys(); 12 boolean bouton = false; 13 14 while( en.hasMoreElements() ) { 15 String key = en.nextElement()+""; 16 bouton = true; 17 form+="<tr>"; 18 form+="<td align='right' valign='top' class='texte' width='60'><b>"+key+" : </b></td>"; 19 form+="<td>"; 20 form+="<textarea name='DATA_"+key+"' cols='40' rows='3'>"+ht.get(key)+"</textarea>"; 21 form+="</td>"; 22 form+="</tr>"; 23 } 24 if ( bouton ) { 25 form+="<tr>"; 26 form+="<td></td>"; 27 form+="<td><input type='image' style='border:0px' SRC='images/valide-fade.gif' onmouseover=\"this.src='images/valide.jpg'\" onmouseout=\"this.src='images/valide-fade.gif'\"/></td>"; 28 form+="</tr>"; 29 } 30 form+="</table>"; 31 return form; 32 } 33 34 } 35 36 | Popular Tags |