Revision 846 org.gvsig.tools/library/trunk/org.gvsig.tools/dynform/src/org/gvsig/tools/dynform/impl/dynformfield/AbstractJDynFormField.java

View differences:

AbstractJDynFormField.java
49 49
	}
50 50

  
51 51
	public abstract void initComponent();
52
	public abstract Object getAssignedValue();
52 53

  
53 54
	public Object getParameterValue() {
54 55
		return this.parameters.getDynValue(DynFormManager.FIELD_VALUE);
......
181 182
	public ProblemIndicator problemIndicator() {
182 183
		return this.problemIndicator;
183 184
	}
184
		
185

  
185 186
	public class IllegalFieldValue extends RuntimeException {
186 187
		
187 188
		/**
......
193 194
			super("The value of field '"+field.getLabel()+"' is not valid. " + message);
194 195
		}
195 196
	}
197
	
198
	public String toString() {
199
		return super.toString() + "{" + this.getName() + "}";
200
	}
201
	
202
	public boolean isModified() {
203
		try {
204
			Object value = this.getValue();
205
			if( value == null ) {
206
				return value != this.getAssignedValue();
207
			}
208
			return ! value.equals(this.getAssignedValue());
209
		} catch(IllegalFieldValue ex) {
210
			// Si es incorrecto el valor del campo decimos a capom que esta modificado.
211
			return true;
212
		}
213
	}
214
	
215

  
196 216
}

Also available in: Unified diff