comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ManualWSPEditor.java @ 2929:0ef4753e5515

Improved manual wsp input validation. flys-client/trunk@4830 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 28 Jun 2012 15:44:10 +0000
parents f0c7c52203c0
children a30d77d86386
comparison
equal deleted inserted replaced
2928:f0c7c52203c0 2929:0ef4753e5515
280 /** 280 /**
281 * Called when OK Button was clicked. Then, if entered values are valid, 281 * Called when OK Button was clicked. Then, if entered values are valid,
282 * fire a RedrawRequest and destroy. 282 * fire a RedrawRequest and destroy.
283 */ 283 */
284 protected void okClicked() { 284 protected void okClicked() {
285 // TODO proper validation (might use DynamicForm)
286 if (valueInputPanel.getValue() == null) { 285 if (valueInputPanel.getValue() == null) {
287 // not valid...
288 //TODO
289 return; 286 return;
290 } 287 }
291 GWT.log(valueInputPanel.getValue().toString()); 288 GWT.log(valueInputPanel.getValue().toString());
292 if(isDialogValid()) { 289 if(isDialogValid()) {
293 // Feed JSON-encoded content of form. 290 // Feed JSON-encoded content of form.
363 } 360 }
364 361
365 362
366 /** Return false if x or y attribute is missing. */ 363 /** Return false if x or y attribute is missing. */
367 protected boolean isDialogValid() { 364 protected boolean isDialogValid() {
368 boolean valid = true; 365 return (DoubleValidator.isDouble(valueInputPanel.getValue()));
369 // TODO implement
370 //
371 return valid;
372 } 366 }
373 } 367 }
374 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 368 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org