Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/input/fieldsupport/AbstractGeneratedStringInputField.java

Diff revisions: vs.
  @@ -1,7 +1,7 @@
1 1 package com.temp.client.foundation.widget.input.fieldsupport;
2 2
3 - import com.temp.shared.utils.Validate;
4 - import com.temp.shared.validators.MaxLengthValueValidator;
3 + import com.temp.shared.utils.*;
4 + import com.temp.shared.validators.*;
5 5
6 6 public abstract class AbstractGeneratedStringInputField<C extends AbstractGeneratedStringInputField<C>> extends AbstractGeneratedInputField<String, C> {
7 7 private Integer maxLength;
  @@ -10,28 +10,28 @@
10 10 return maxLength;
11 11 }
12 12
13 - public final void setMaxLength(Integer maxLength) {
14 - assertBuildMode("setMaxLength");
15 - setValidatedMaxLength(Validate.optionalLength("MaxLength", maxLength));
13 + public final void setMaxLength( Integer maxLength ) {
14 + assertBuildMode( "setMaxLength" );
15 + setValidatedMaxLength( Validate.optionalLength( "MaxLength", maxLength ) );
16 16 }
17 17
18 - public C maxLength(int maxLength) {
19 - assertBuildMode("maxLength");
20 - setValidatedMaxLength(Validate.optionalLength("MaxLength", maxLength));
18 + public C maxLength( int maxLength ) {
19 + assertBuildMode( "maxLength" );
20 + setValidatedMaxLength( Validate.optionalLength( "MaxLength", maxLength ) );
21 21 return inheritanceLeaf();
22 22 }
23 23
24 - protected void setValidatedMaxLength(Integer maxLength) {
24 + protected void setValidatedMaxLength( Integer maxLength ) {
25 25 this.maxLength = maxLength;
26 26 }
27 27
28 28 // The above must be set/changed BEFORE the widget is attached!
29 29
30 30 @Override
31 - protected void augmentValidator(InputWidgetValidator<String> validator) {
32 - if (maxLength != null) {
33 - addTo(validator, new MaxLengthValueValidator(maxLength));
31 + protected void augmentValidator( InputWidgetValidator<String> validator ) {
32 + if ( maxLength != null ) {
33 + addTo( validator, new MaxLengthValueValidator( maxLength ) );
34 34 }
35 - super.augmentValidator(validator);
35 + super.augmentValidator( validator );
36 36 }
37 37 }