/[projects]/WebConfig/src/dk/thoerup/webconfig/ConfigServlet.java
ViewVC logotype

Diff of /WebConfig/src/dk/thoerup/webconfig/ConfigServlet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1337 by torben, Wed Apr 20 04:45:28 2011 UTC revision 1338 by torben, Wed Apr 20 12:37:48 2011 UTC
# Line 57  public class ConfigServlet extends HttpS Line 57  public class ConfigServlet extends HttpS
57                                                                    
58                                                                    
59                                  if (anno.readonly() == false) {                                  if (anno.readonly() == false) {
60                                          sb.append("<td><input type='text' name='varvalue' value='").append( ""+ field.get(configObject) ).append("' /></td>");                                          if (field.getType().getName().equals("boolean") ) {
61                            String trueSelected = field.get(configObject).toString().equals("true") ? " selected " : "";
62                            String falseSelected = field.get(configObject).toString().equals("false") ? " selected " : "";
63                            String options = String.format("<option %s>true</option><option %s>false</option>", trueSelected, falseSelected);
64                            sb.append("<td><select name='varvalue'>").append(options).append("</select></td>");
65                        } else {
66                            sb.append("<td><input type='text' name='varvalue' value='").append( "" + field.get(configObject) ).append("' /></td>");
67                        }
68                                          sb.append("<td><input type='submit' name='Set' value='Set'></td>\n");                                          sb.append("<td><input type='submit' name='Set' value='Set'></td>\n");
69                                  } else {                                  } else {
70                                          sb.append("<td>").append( ""+ field.get(configObject) ).append("&nbsp;</td>");                                          sb.append("<td>").append( ""+ field.get(configObject) ).append("&nbsp;</td>");

Legend:
Removed from v.1337  
changed lines
  Added in v.1338

  ViewVC Help
Powered by ViewVC 1.1.20