1 33 package com.icesoft.applications.faces.address; 34 35 43 public class FormElement { 44 45 protected String value, image; 47 protected boolean set; 48 49 public static final String IMAGE_ALERT = "status_alert.gif"; 51 public static final String IMAGE_BLANK = "status_blank.gif"; 52 public static final String IMAGE_PROGRESS = "status_blank.gif"; 53 54 55 58 public FormElement() { 59 setValue(""); 60 } 61 62 65 public void reset() { 66 setValue(""); 67 } 68 69 74 public String getValue() { 75 return this.value; 76 } 77 78 85 public void setValue(String value) { 86 87 if (value != null) { 88 89 if (value.length() > 0) { 90 this.value = value.trim(); 91 set = true; 92 return; 93 } 94 } 95 96 this.value = ""; 97 setImage(IMAGE_BLANK); 98 set = false; 99 } 100 101 107 public boolean getIsSet() { 108 return this.set; 109 } 110 111 117 public String getImage() { 118 return this.image; 119 } 120 121 126 public void setImage(String image) { 127 this.image = image; 128 } 129 } 130 | Popular Tags |