Revision 336
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.serv/org.gvsig.tools.swing.serv.field/src/main/java/org/gvsig/tools/swing/serv/field/component/JTextFieldComponent.java | ||
---|---|---|
128 | 128 |
} |
129 | 129 |
|
130 | 130 |
public Object getValue() { |
131 |
String text = null; |
|
132 |
|
|
131 | 133 |
if (label != null) { |
132 |
return label.getText();
|
|
134 |
text = label.getText();
|
|
133 | 135 |
} else |
134 | 136 |
if (jtext != null) { |
135 |
return jtext.getText();
|
|
137 |
text = jtext.getText();
|
|
136 | 138 |
} |
137 |
return null; |
|
139 |
if (text.equals("")){ |
|
140 |
if (this.getDynField().isMandatory()){ |
|
141 |
text = (String)this.getDynField().getDefaultValue(); |
|
142 |
} else { |
|
143 |
text = null; |
|
144 |
} |
|
145 |
} |
|
146 |
return text; |
|
138 | 147 |
} |
139 | 148 |
|
140 | 149 |
@Override |
Also available in: Unified diff