ErrorPickerで、ユーザーIDに欠番ができるとメールが送信できなくなっていたのを修正した。
@@ -76,6 +76,11 @@ | ||
76 | 76 | public static final int VISIBLE_TYPE_PASSWORD = 3; |
77 | 77 | |
78 | 78 | /** |
79 | + * パスワードnull可 | |
80 | + */ | |
81 | + public static final int VISIBLE_TYPE_PASSWORD_NOREQ = 4; | |
82 | + | |
83 | + /** | |
79 | 84 | * 見せない |
80 | 85 | */ |
81 | 86 | public static final int VISIBLE_TYPE_HIDDEN = 99; |
@@ -245,8 +250,11 @@ | ||
245 | 250 | public String getFullName() { |
246 | 251 | String rvalue = "%s.%s"; |
247 | 252 | String colName = this.getName(); |
248 | - String tableName = (this.getTable().hasAlias()) | |
249 | - ? this.getTable().getAlias() : this.getTable().getName(); | |
253 | + String tableName = (this.getTable() | |
254 | + .hasAlias()) | |
255 | + ? this.getTable() | |
256 | + .getAlias() : this.getTable() | |
257 | + .getName(); | |
250 | 258 | rvalue = String.format(rvalue, tableName, colName); |
251 | 259 | return rvalue; |
252 | 260 | } |
@@ -87,6 +87,12 @@ | ||
87 | 87 | <version>7.1.0</version> |
88 | 88 | <type>jar</type> |
89 | 89 | </dependency> |
90 | + <dependency> | |
91 | + <groupId>org.apache.wicket</groupId> | |
92 | + <artifactId>wicket-extensions</artifactId> | |
93 | + <version>7.10.0</version> | |
94 | + <type>jar</type> | |
95 | + </dependency> | |
90 | 96 | </dependencies> |
91 | 97 | <build> |
92 | 98 | <resources> |
@@ -145,7 +151,7 @@ | ||
145 | 151 | </goals> |
146 | 152 | </execution> |
147 | 153 | </executions> |
148 | - | |
154 | + | |
149 | 155 | </plugin> |
150 | 156 | <plugin> |
151 | 157 | <groupId>org.apache.maven.plugins</groupId> |
@@ -180,8 +186,8 @@ | ||
180 | 186 | <artifactId>maven-compiler-plugin</artifactId> |
181 | 187 | <version>3.1</version> |
182 | 188 | <configuration> |
183 | - <source>1.7</source> | |
184 | - <target>1.7</target> | |
189 | + <source>1.8</source> | |
190 | + <target>1.8</target> | |
185 | 191 | <encoding>UTF-8</encoding> |
186 | 192 | <showWarnings>true</showWarnings> |
187 | 193 | <showDeprecation>true</showDeprecation> |
@@ -60,7 +60,8 @@ | ||
60 | 60 | shops = new HashMap<>(); |
61 | 61 | errorRecord = new HashMap<>(); |
62 | 62 | |
63 | - String groupid = parameters.get("groupid").toString(); | |
63 | + String groupid = parameters.get("groupid") | |
64 | + .toString(); | |
64 | 65 | |
65 | 66 | if (groupid != null) { |
66 | 67 | this.mailSender = new MailSender(); |
@@ -84,12 +85,14 @@ | ||
84 | 85 | this.loadEmployee(); |
85 | 86 | |
86 | 87 | //従業者ごとにエラーの数をチェックする。 |
87 | - for (int i = 1; i <= this.employee.size(); i++) { | |
88 | - HashMap<String, String> emp = this.employee.get(i); | |
88 | + for (int i : this.employee.keySet()) { | |
89 | 89 | |
90 | - System.out.println(emp.get("EMPLOYEE_NAME")); | |
91 | - String employeeName = emp.get("EMPLOYEE_NAME"); | |
92 | - String employeeEmail = emp.get("EMAIL"); | |
90 | + System.out.println(this.employee.get(i) | |
91 | + .get("EMPLOYEE_NAME")); | |
92 | + String employeeName = this.employee.get(i) | |
93 | + .get("EMPLOYEE_NAME"); | |
94 | + String employeeEmail = this.employee.get(i) | |
95 | + .get("EMAIL"); | |
93 | 96 | |
94 | 97 | int errCount = this.getErrorCount(i); |
95 | 98 | System.out.println(errCount); |
@@ -97,7 +100,9 @@ | ||
97 | 100 | //エラーの件数が1以上のとき |
98 | 101 | if (errCount > 0) { |
99 | 102 | //いつがおかしいかを収集する。 |
100 | - String ldate = LocalDate.now().minusDays(1L).toString(); | |
103 | + String ldate = LocalDate.now() | |
104 | + .minusDays(1L) | |
105 | + .toString(); | |
101 | 106 | String cmd = "SELECT DISTINCT WR.* FROM WORKTIME_REPORT WR\n" |
102 | 107 | + "inner join (\n" |
103 | 108 | + " SELECT * FROM TIME_RECORD \n" |
@@ -117,12 +122,14 @@ | ||
117 | 122 | } |
118 | 123 | rs.close(); |
119 | 124 | } catch (SQLException ex) { |
120 | - Logger.getLogger(ErrorPicker.class.getName()).log( | |
121 | - Level.SEVERE, null, ex); | |
125 | + Logger.getLogger(ErrorPicker.class.getName()) | |
126 | + .log( | |
127 | + Level.SEVERE, null, ex); | |
122 | 128 | } |
123 | 129 | |
124 | 130 | message += "\n\n※このメッセージはタイムカードシステムより自動配信されております。"; |
125 | - message += "\n配信時刻: " + LocalDateTime.now().toString() + "\n"; | |
131 | + message += "\n配信時刻: " + LocalDateTime.now() | |
132 | + .toString() + "\n"; | |
126 | 133 | |
127 | 134 | this.sendMail(employeeEmail, message); |
128 | 135 | //System.out.println(message); |
@@ -175,7 +182,9 @@ | ||
175 | 182 | */ |
176 | 183 | private int getErrorCount(int employeeId) { |
177 | 184 | |
178 | - String ldate = LocalDate.now().minusDays(1L).toString(); | |
185 | + String ldate = LocalDate.now() | |
186 | + .minusDays(1L) | |
187 | + .toString(); | |
179 | 188 | String cmd = "SELECT count(*) reccount FROM (\n" |
180 | 189 | + "Select distinct WR.* from WORKTIME_REPORT WR\n" |
181 | 190 | + "inner join (\n" |
@@ -192,8 +201,8 @@ | ||
192 | 201 | rs.next(); |
193 | 202 | rvalue = rs.getInt("reccount"); |
194 | 203 | } catch (SQLException ex) { |
195 | - Logger.getLogger(ErrorPicker.class.getName()). | |
196 | - log(Level.SEVERE, null, ex); | |
204 | + Logger.getLogger(ErrorPicker.class.getName()) | |
205 | + .log(Level.SEVERE, null, ex); | |
197 | 206 | } |
198 | 207 | return rvalue; |
199 | 208 |
@@ -209,6 +218,7 @@ | ||
209 | 218 | while (rs.next()) { |
210 | 219 | int employeeId = rs.getInt("EMPLOYEE_ID"); |
211 | 220 | HashMap<String, String> emp = new HashMap<>(); |
221 | + emp.put("EMPLOYEE_ID", String.valueOf(employeeId)); | |
212 | 222 | emp.put("EMPLOYEE_NAME", rs.getString("EMPLOYEE_NAME")); |
213 | 223 | emp.put("EMAIL", rs.getString("EMAIL")); |
214 | 224 | this.employee.put(employeeId, emp); |
@@ -215,8 +225,8 @@ | ||
215 | 225 | } |
216 | 226 | rs.close(); |
217 | 227 | } catch (SQLException ex) { |
218 | - Logger.getLogger(ErrorPicker.class.getName()). | |
219 | - log(Level.SEVERE, null, ex); | |
228 | + Logger.getLogger(ErrorPicker.class.getName()) | |
229 | + .log(Level.SEVERE, null, ex); | |
220 | 230 | } |
221 | 231 | } |
222 | 232 |
@@ -241,8 +251,8 @@ | ||
241 | 251 | } |
242 | 252 | rs.close(); |
243 | 253 | } catch (SQLException ex) { |
244 | - Logger.getLogger(ErrorPicker.class.getName()). | |
245 | - log(Level.SEVERE, null, ex); | |
254 | + Logger.getLogger(ErrorPicker.class.getName()) | |
255 | + .log(Level.SEVERE, null, ex); | |
246 | 256 | } |
247 | 257 | } |
248 | 258 | } |
@@ -34,114 +34,117 @@ | ||
34 | 34 | </head> |
35 | 35 | <body> |
36 | 36 | <wicket:extend> |
37 | - <h3>打刻</h3> | |
38 | - <form wicket:id="timeRecorder"> | |
39 | - <div> | |
40 | - <span wicket:id="clock" /> | |
41 | - </div> | |
42 | - <div> | |
43 | - <input type="button" value="打刻" /> | |
44 | - </div> | |
45 | - <div class="locationpicker" > | |
46 | - <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCY2EpuxW8aKPvtDVWt9wmqBPKRHRoPwTQ&callback=initMap" | |
47 | - async defer> | |
48 | - </script> | |
49 | - <label class="localtionpicker title">現在位置</label> | |
50 | - <div class="localtionpicker map" name="map" style="width:40vw; height:25vh;"></div> | |
51 | - <div class="localtionpicker coordinates" name="localtionpicker.coordinates"> | |
52 | - <div> | |
53 | - <label class="locatitonpicker coordinates label">緯度</label> | |
54 | - <label class="locationpicker corrdinaltes parameter" name="latitude">[緯度]</label> | |
37 | + <div class="section center half left" style="display: none;"> | |
38 | + <h3>打刻</h3> | |
39 | + <form wicket:id="timeRecorder"> | |
40 | + | |
41 | + <div> | |
42 | + <span wicket:id="clock" /> | |
43 | + </div> | |
44 | + <div style="visible: hidden;"> | |
45 | + <input type="button" value="打刻" /> | |
46 | + </div> | |
47 | + <div class="locationpicker" style="visible:hidden;"> | |
48 | + <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCY2EpuxW8aKPvtDVWt9wmqBPKRHRoPwTQ&callback=initMap" | |
49 | + async defer> | |
50 | + </script> | |
51 | + <label class="localtionpicker title">現在位置</label> | |
52 | + <div class="localtionpicker map" name="map" style="width:40vw; height:25vh;"></div> | |
53 | + <div class="localtionpicker coordinates" name="localtionpicker.coordinates"> | |
54 | + <div> | |
55 | + <label class="locatitonpicker coordinates label">緯度</label> | |
56 | + <label class="locationpicker corrdinaltes parameter" name="latitude">[緯度]</label> | |
57 | + </div> | |
58 | + <div> | |
59 | + <label class="locatitonpicker coordinates label">経度</label> | |
60 | + <label class="locationpicker corrdinaltes parameter" name="longitude">[経度]</label> | |
61 | + </div> | |
62 | + <div> | |
63 | + <label class="locatitonpicker coordinates label">誤差</label> | |
64 | + <label class="locationpicker corrdinaltes parameter" name="accuracy">[誤差]</label> | |
65 | + </div> | |
55 | 66 | </div> |
56 | - <div> | |
57 | - <label class="locatitonpicker coordinates label">経度</label> | |
58 | - <label class="locationpicker corrdinaltes parameter" name="longitude">[経度]</label> | |
59 | - </div> | |
60 | - <div> | |
61 | - <label class="locatitonpicker coordinates label">誤差</label> | |
62 | - <label class="locationpicker corrdinaltes parameter" name="accuracy">[誤差]</label> | |
63 | - </div> | |
64 | - </div> | |
65 | - <input class="localtionpicker result" type="hidden" name="map_result" /> | |
66 | - <div class="localtionpicker message" name="show_result" /> | |
67 | - <script> | |
68 | - var currentPosition; | |
69 | - var map; | |
70 | - var marker; | |
71 | - function initMap() { | |
72 | - //ユーザーの現在の位置情報を取得 | |
73 | - navigator.geolocation.getCurrentPosition(successCallback, errorCallback); | |
74 | - } | |
67 | + <input class="localtionpicker result" type="hidden" name="map_result" /> | |
68 | + <div class="localtionpicker message" name="show_result" /> | |
69 | + <script> | |
70 | + var currentPosition; | |
71 | + var map; | |
72 | + var marker; | |
73 | + function initMap() { | |
74 | + //ユーザーの現在の位置情報を取得 | |
75 | + navigator.geolocation.getCurrentPosition(successCallback, errorCallback); | |
76 | + } | |
75 | 77 | |
76 | - /***** ユーザーの現在の位置情報を取得 *****/ | |
77 | - function successCallback(position) { | |
78 | - currentPosition = position; | |
79 | - //wicketとの干渉を避けるため、getElementsByNameで操作 | |
80 | - document.getElementsByName('latitude')[0].textContent = | |
81 | - position.coords.latitude; | |
82 | - document.getElementsByName('longitude')[0].textContent = | |
83 | - position.coords.longitude; | |
84 | - document.getElementsByName('accuracy')[0].textContent = | |
85 | - position.coords.accuracy; | |
78 | + /***** ユーザーの現在の位置情報を取得 *****/ | |
79 | + function successCallback(position) { | |
80 | + currentPosition = position; | |
81 | + //wicketとの干渉を避けるため、getElementsByNameで操作 | |
82 | + document.getElementsByName('latitude')[0].textContent = | |
83 | + position.coords.latitude; | |
84 | + document.getElementsByName('longitude')[0].textContent = | |
85 | + position.coords.longitude; | |
86 | + document.getElementsByName('accuracy')[0].textContent = | |
87 | + position.coords.accuracy; | |
86 | 88 | |
87 | - var position = new google.maps.LatLng( | |
88 | - currentPosition.coords.latitude, | |
89 | - currentPosition.coords.longitude); | |
89 | + var position = new google.maps.LatLng( | |
90 | + currentPosition.coords.latitude, | |
91 | + currentPosition.coords.longitude); | |
90 | 92 | |
91 | - var accuracy = currentPosition.coords.accuracy; | |
93 | + var accuracy = currentPosition.coords.accuracy; | |
92 | 94 | |
93 | - var mapOptions = { | |
94 | - center: position, | |
95 | - zoom: 18, | |
96 | - mapTypeId: google.maps.MapTypeId.ROADMAP | |
97 | - }; | |
98 | - map = new google.maps.Map(document.getElementsByName('map')[0], mapOptions); | |
99 | - var markerOptions = { | |
100 | - position: position, | |
101 | - map: map | |
102 | - }; | |
103 | - marker = new google.maps.Marker(markerOptions); | |
104 | - document.getElementsByName('map_result')[0].setAttribute("value", 0); | |
95 | + var mapOptions = { | |
96 | + center: position, | |
97 | + zoom: 18, | |
98 | + mapTypeId: google.maps.MapTypeId.ROADMAP | |
99 | + }; | |
100 | + map = new google.maps.Map(document.getElementsByName('map')[0], mapOptions); | |
101 | + var markerOptions = { | |
102 | + position: position, | |
103 | + map: map | |
104 | + }; | |
105 | + marker = new google.maps.Marker(markerOptions); | |
106 | + document.getElementsByName('map_result')[0].setAttribute("value", 0); | |
105 | 107 | |
106 | - var circleOptions = { | |
107 | - center: position, // 中心点(google.maps.LatLng) | |
108 | - fillColor: '#00ff00', // 塗りつぶし色 | |
109 | - fillOpacity: 0.7, // 塗りつぶし透過度(0: 透明 ⇔ 1:不透明) | |
110 | - map: map, // 表示させる地図(google.maps.Map) | |
111 | - radius: accuracy, // 半径(m) | |
112 | - strokeColor: '#00ff00', // 外周色 | |
113 | - strokeOpacity: 1, // 外周透過度(0: 透明 ⇔ 1:不透明) | |
114 | - strokeWeight: 1 // 外周太さ(ピクセル) | |
115 | - }; | |
108 | + var circleOptions = { | |
109 | + center: position, // 中心点(google.maps.LatLng) | |
110 | + fillColor: '#00AA00', // 塗りつぶし色 | |
111 | + fillOpacity: 0.1, // 塗りつぶし透過度(0: 透明 ⇔ 1:不透明) | |
112 | + map: map, // 表示させる地図(google.maps.Map) | |
113 | + radius: accuracy, // 半径(m) | |
114 | + strokeColor: '#008800', // 外周色 | |
115 | + strokeOpacity: 1, // 外周透過度(0: 透明 ⇔ 1:不透明) | |
116 | + strokeWeight: 1 // 外周太さ(ピクセル) | |
117 | + }; | |
116 | 118 | |
117 | - new google.maps.Circle(circleOptions); | |
119 | + new google.maps.Circle(circleOptions); | |
118 | 120 | |
119 | - } | |
121 | + } | |
120 | 122 | |
121 | - /***** 位置情報が取得できない場合 *****/ | |
122 | - function errorCallback(error) { | |
123 | - var err_msg = ""; | |
124 | - switch (error.code) | |
125 | - { | |
126 | - case 1: | |
127 | - err_msg = "位置情報の利用が許可されていません"; | |
128 | - break; | |
129 | - case 2: | |
130 | - err_msg = "デバイスの位置が判定できません"; | |
131 | - break; | |
132 | - case 3: | |
133 | - err_msg = "タイムアウトしました"; | |
134 | - break; | |
123 | + /***** 位置情報が取得できない場合 *****/ | |
124 | + function errorCallback(error) { | |
125 | + var err_msg = ""; | |
126 | + switch (error.code) | |
127 | + { | |
128 | + case 1: | |
129 | + err_msg = "位置情報の利用が許可されていません.<br>許可をすると当ページで打刻ができるようになります."; | |
130 | + break; | |
131 | + case 2: | |
132 | + err_msg = "デバイスの位置が判定できません"; | |
133 | + break; | |
134 | + case 3: | |
135 | + err_msg = "タイムアウトしました"; | |
136 | + break; | |
137 | + } | |
138 | + document.getElementsByName('map')[0].setAttribute("style", "display: none;"); | |
139 | + document.getElementsByName('localtionpicker.coordinates')[0].setAttribute("style", "display: none;"); | |
140 | + document.getElementsByName('map_result')[0].setAttribute("value", error.code); | |
141 | + document.getElementsByName("show_result")[0].innerHTML = err_msg; | |
142 | + //デバッグ用→ document.getElementById("show_result").innerHTML = error.message; | |
135 | 143 | } |
136 | - document.getElementsByName('map')[0].setAttribute("style", "display: none;"); | |
137 | - document.getElementsByName('localtionpicker.coordinates')[0].setAttribute("style", "display: none;"); | |
138 | - document.getElementsByName('map_result')[0].setAttribute("value", error.code); | |
139 | - document.getElementsByName("show_result")[0].innerHTML = err_msg; | |
140 | - //デバッグ用→ document.getElementById("show_result").innerHTML = error.message; | |
141 | - } | |
142 | - </script> | |
143 | - </div> | |
144 | - </form> | |
144 | + </script> | |
145 | + </div> | |
146 | + </form> | |
147 | + </div> | |
145 | 148 | <div class="section center"> |
146 | 149 | <h3>本日の打刻状況</h3> |
147 | 150 | <form wicket:id="recordViewForm"> |
@@ -72,20 +72,14 @@ | ||
72 | 72 | </dependency> |
73 | 73 | <dependency> |
74 | 74 | <groupId>org.apache.wicket</groupId> |
75 | - <artifactId>wicket-core</artifactId> | |
76 | - <version>7.10.0</version> | |
77 | - <type>jar</type> | |
78 | - </dependency> | |
79 | - <dependency> | |
80 | - <groupId>org.apache.wicket</groupId> | |
81 | 75 | <artifactId>wicket-auth-roles</artifactId> |
82 | 76 | <version>7.5.0</version> |
83 | 77 | <type>jar</type> |
84 | 78 | </dependency> |
85 | 79 | <dependency> |
86 | - <groupId>com.h2database</groupId> | |
87 | - <artifactId>h2</artifactId> | |
88 | - <version>1.4.197</version> | |
80 | + <groupId>org.clearfy</groupId> | |
81 | + <artifactId>org.clearfy.datawrapper</artifactId> | |
82 | + <version>1.0.0-SNAPSHOT</version> | |
89 | 83 | <type>jar</type> |
90 | 84 | </dependency> |
91 | 85 | <dependency> |
@@ -107,22 +101,17 @@ | ||
107 | 101 | <type>jar</type> |
108 | 102 | </dependency> |
109 | 103 | <dependency> |
110 | - <groupId>javax.mail</groupId> | |
111 | - <artifactId>javax.mail-api</artifactId> | |
112 | - <version>1.5.6</version> | |
104 | + <groupId>com.sun.mail</groupId> | |
105 | + <artifactId>javax.mail</artifactId> | |
106 | + <version>1.6.1</version> | |
113 | 107 | <type>jar</type> |
114 | 108 | </dependency> |
115 | 109 | <dependency> |
116 | - <groupId>javax.servlet</groupId> | |
117 | - <artifactId>javax.servlet-api</artifactId> | |
118 | - <version>3.1.0</version> | |
110 | + <groupId>javax</groupId> | |
111 | + <artifactId>javaee-web-api</artifactId> | |
112 | + <version>7.0</version> | |
119 | 113 | <type>jar</type> |
120 | 114 | </dependency> |
121 | - <dependency> | |
122 | - <groupId>${project.groupId}</groupId> | |
123 | - <artifactId>org.clearfy.datawrapper</artifactId> | |
124 | - <version>1.0.0-SNAPSHOT</version> | |
125 | - </dependency> | |
126 | 115 | </dependencies> |
127 | 116 | <build> |
128 | 117 | <resources> |
@@ -169,13 +169,13 @@ | ||
169 | 169 | this.user.setAliasFromLogicalName(this.page.getLanguage()); |
170 | 170 | |
171 | 171 | this.user.UserId.setVisibleType(Column.VISIBLE_TYPE_LABEL); |
172 | - this.user.Stamp.setVisibleType(Column.VISIBLE_TYPE_HIDDEN); | |
173 | - this.user.Mdate.setVisibleType(Column.VISIBLE_TYPE_HIDDEN); | |
174 | - this.user.Disable.setVisibleType(Column.VISIBLE_TYPE_HIDDEN); | |
172 | + this.user.Stamp.setVisibleType(Column.VISIBLE_TYPE_LABEL); | |
173 | + this.user.Mdate.setVisibleType(Column.VISIBLE_TYPE_LABEL); | |
174 | + this.user.Disable.setVisibleType(Column.VISIBLE_TYPE_CHECKBOX); | |
175 | 175 | this.user.UserAccount.setVisibleType(Column.VISIBLE_TYPE_LABEL); |
176 | - this.user.UserPasskey.setVisibleType(Column.VISIBLE_TYPE_HIDDEN); | |
177 | - this.user.UserApikey.setVisibleType(Column.VISIBLE_TYPE_HIDDEN); | |
178 | - this.user.UserEmail.setVisibleType(Column.VISIBLE_TYPE_HIDDEN); | |
176 | + this.user.UserPasskey.setVisibleType(Column.VISIBLE_TYPE_PASSWORD_NOREQ); | |
177 | + this.user.UserApikey.setVisibleType(Column.VISIBLE_TYPE_LABEL); | |
178 | + this.user.UserEmail.setVisibleType(Column.VISIBLE_TYPE_TEXT); | |
179 | 179 | |
180 | 180 | this.userRecordEditor = new RecordEditor("userRecordEditor", page, this.user) { |
181 | 181 | @Override |
@@ -93,6 +93,15 @@ | ||
93 | 93 | return this; |
94 | 94 | } |
95 | 95 | |
96 | + public void setRequeired(boolean status) { | |
97 | + this.password.setRequired(status); | |
98 | + this.passwordConfirm.setRequired(status); | |
99 | + } | |
100 | + | |
101 | + public boolean isRequired() { | |
102 | + return this.password.isRequired(); | |
103 | + } | |
104 | + | |
96 | 105 | /** |
97 | 106 | * パスワードの暗号化 |
98 | 107 | * |
@@ -50,6 +50,20 @@ | ||
50 | 50 | */ |
51 | 51 | public abstract class RecordEditor extends ClearfyContentHolder implements ISubmitter { |
52 | 52 | |
53 | + /** | |
54 | + * @return the passwordRequired | |
55 | + */ | |
56 | + public boolean isPasswordRequired() { | |
57 | + return passwordRequired; | |
58 | + } | |
59 | + | |
60 | + /** | |
61 | + * @param passwordRequired the passwordRequired to set | |
62 | + */ | |
63 | + public void setPasswordRequired(boolean passwordRequired) { | |
64 | + this.passwordRequired = passwordRequired; | |
65 | + } | |
66 | + | |
53 | 67 | private Label formCaption; |
54 | 68 | |
55 | 69 | private Table targetTable; |
@@ -62,6 +76,8 @@ | ||
62 | 76 | |
63 | 77 | private FeedbackPanel recordEditormessage; |
64 | 78 | |
79 | + private boolean passwordRequired = true; | |
80 | + | |
65 | 81 | public RecordEditor(String id, ClearfyPage page, Table table) { |
66 | 82 | super(id, page); |
67 | 83 | this.columnBindedControls = new ArrayList<>(); |
@@ -182,6 +198,19 @@ | ||
182 | 198 | |
183 | 199 | break; |
184 | 200 | |
201 | + case Column.VISIBLE_TYPE_PASSWORD_NOREQ: | |
202 | + colValuePassword.setVisible(true); | |
203 | + colValuePassword.setBindedColumn(col); | |
204 | + colValuePassword.setRequeired(false); | |
205 | + RecordEditor.this.columnBindedControls | |
206 | + .add((IColumnBindedComponent) colValuePassword); | |
207 | + colValueLabel.setVisible(false); | |
208 | + colValueTextField.setVisible(false); | |
209 | + //colValuePassword.setVisible(false); | |
210 | + colValueCheck.setVisible(false); | |
211 | + | |
212 | + break; | |
213 | + | |
185 | 214 | case Column.VISIBLE_TYPE_CHECKBOX: |
186 | 215 | colValueCheck.setVisible(true); |
187 | 216 | colValueCheck.setBindedColumn(col); |