comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/IntegerRangePanel.java @ 1606:a4da53328693

#482 Display i18n messages for validation errors in range panel. flys-client/trunk@3967 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 08 Feb 2012 12:27:40 +0000
parents ae25566ce6f6
children 360e22afb98b
comparison
equal deleted inserted replaced
1605:fe59df5c85cc 1606:a4da53328693
62 62
63 return null; 63 return null;
64 } 64 }
65 65
66 66
67 @Override
68 public Object getMaxLower() {
69 return maxLower;
70 }
71
72
73 @Override
74 public Object getMaxUpper() {
75 return maxUpper;
76 }
77
78
67 public Integer getLowerAsInt() { 79 public Integer getLowerAsInt() {
68 String raw = getLower(); 80 String raw = getLower();
69 81
70 if (raw != null && raw.length() > 0) { 82 if (raw != null && raw.length() > 0) {
71 try { 83 try {
95 return null; 107 return null;
96 } 108 }
97 109
98 110
99 protected Validator newRangeValidator() { 111 protected Validator newRangeValidator() {
100 Integer maxLower = getMaxLower(); 112 Integer maxLower = getMaxLowerAsInt();
101 Integer maxUpper = getMaxUpper(); 113 Integer maxUpper = getMaxUpperAsInt();
102 114
103 if (maxLower != null && maxUpper != null) { 115 if (maxLower != null && maxUpper != null) {
104 IntegerRangeValidator validator = new IntegerRangeValidator(); 116 IntegerRangeValidator validator = new IntegerRangeValidator();
105 validator.setMax(maxUpper); 117 validator.setMax(maxUpper);
106 validator.setMin(maxLower); 118 validator.setMin(maxLower);
110 122
111 return null; 123 return null;
112 } 124 }
113 125
114 126
115 public Integer getMaxLower() { 127 public Integer getMaxLowerAsInt() {
116 return maxLower; 128 return maxLower;
117 } 129 }
118 130
119 131
120 protected void setMaxLower(DataList dataList) { 132 protected void setMaxLower(DataList dataList) {
126 public void setMaxLower(Integer maxLower) { 138 public void setMaxLower(Integer maxLower) {
127 this.maxLower = maxLower; 139 this.maxLower = maxLower;
128 } 140 }
129 141
130 142
131 public Integer getMaxUpper() { 143 public Integer getMaxUpperAsInt() {
132 return maxUpper; 144 return maxUpper;
133 } 145 }
134 146
135 147
136 protected void setMaxUpper(DataList dataList) { 148 protected void setMaxUpper(DataList dataList) {

http://dive4elements.wald.intevation.org