Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/bundu/BunduWstWQPanel.java @ 9458:7369d6ae3f87
bundu bezugswst WQ-Input: UD disabled on global Error
author | gernotbelger |
---|---|
date | Tue, 28 Aug 2018 17:05:25 +0200 |
parents | 4cccbd32b680 |
children |
comparison
equal
deleted
inserted
replaced
9457:65f28328c9a3 | 9458:7369d6ae3f87 |
---|---|
169 } else if (value.equals(String.valueOf(mode.Q))) { | 169 } else if (value.equals(String.valueOf(mode.Q))) { |
170 enableQ(); | 170 enableQ(); |
171 } | 171 } |
172 } | 172 } |
173 }); | 173 }); |
174 | |
175 this.radiogroup.setCanEdit(false); | |
176 | |
174 return this.modes; | 177 return this.modes; |
175 } | 178 } |
176 | 179 |
177 private void enableUD() { | 180 private void enableUD() { |
178 BunduWstWQPanel.this.list.setVisibility(Visibility.HIDDEN); | 181 BunduWstWQPanel.this.list.setVisibility(Visibility.HIDDEN); |
402 @Override | 405 @Override |
403 public void onFailure(final Throwable caught) { | 406 public void onFailure(final Throwable caught) { |
404 GWT.log("Could not recieve wq informations."); | 407 GWT.log("Could not recieve wq informations."); |
405 final String msg = caught.getMessage(); | 408 final String msg = caught.getMessage(); |
406 resetLoadingMessageOfQTable(msg); | 409 resetLoadingMessageOfQTable(msg); |
407 // disable weiter-knopf | |
408 getSubmitBtn().disable(); | |
409 SC.warn(msg); | 410 SC.warn(msg); |
410 } | 411 } |
411 | 412 |
412 @Override | 413 @Override |
413 public void onSuccess(final GaugeInfoResult result) { | 414 public void onSuccess(final GaugeInfoResult result) { |
414 // TODO Auto-generated method stub | 415 // TODO Auto-generated method stub |
415 final String globalErrorMsg = result.getGlobalErrorMsg(); | 416 final String globalErrorMsg = result.getGlobalErrorMsg(); |
416 if (!globalErrorMsg.equals("")) { | 417 if (!globalErrorMsg.equals("")) { |
417 resetLoadingMessageOfQTable(""); | 418 resetLoadingMessageOfQTable(""); |
418 // disable weiter-knopf | |
419 getSubmitBtn().disable(); | |
420 SC.warn(globalErrorMsg); | 419 SC.warn(globalErrorMsg); |
421 } | 420 } |
422 | 421 |
423 final GaugeInfoObject[] gauges = result.getGaugeInfoObjects(); | 422 final GaugeInfoObject[] gauges = result.getGaugeInfoObjects(); |
424 | 423 |
440 final AsyncCallback<WQInfoObject[]> cb = new AsyncCallback<WQInfoObject[]>() { | 439 final AsyncCallback<WQInfoObject[]> cb = new AsyncCallback<WQInfoObject[]>() { |
441 @Override | 440 @Override |
442 public void onFailure(final Throwable caught) { | 441 public void onFailure(final Throwable caught) { |
443 GWT.log("Could not recieve wq informations."); | 442 GWT.log("Could not recieve wq informations."); |
444 addWQInfo(null, fi, gauge); | 443 addWQInfo(null, fi, gauge); |
444 if (fi == gauges.length - 1) | |
445 getSubmitBtn().enable(); // always enable on success (globalerrorMsg is also success) | |
445 } | 446 } |
446 | 447 |
447 @Override | 448 @Override |
448 public void onSuccess(final WQInfoObject[] wqi) { | 449 public void onSuccess(final WQInfoObject[] wqi) { |
449 final int num = wqi != null ? wqi.length : 0; | 450 final int num = wqi != null ? wqi.length : 0; |
450 GWT.log("Received " + num + " wq informations (" + fi + "."); | 451 GWT.log("Received " + num + " wq informations (" + fi + "."); |
451 | 452 |
452 addWQInfo(wqi, fi, gauge); | 453 addWQInfo(wqi, fi, gauge); |
453 if (fi == (gauges.length - 1) && globalErrorMsg.equals("")) | 454 if (fi == gauges.length - 1) { |
454 getSubmitBtn().enable(); | 455 getSubmitBtn().enable(); // always enable on success (globalerrorMsg is also success) |
456 | |
457 if (globalErrorMsg.equals("")) | |
458 BunduWstWQPanel.this.radiogroup.setCanEdit(true); | |
459 } | |
460 | |
455 } | 461 } |
456 }; | 462 }; |
457 callMainValuesService(locale, river, range[0] + rDiff, range[1] - rDiff, gauge.getStartdate(), gauge.getEnddate(), cb); | 463 callMainValuesService(locale, river, range[0] + rDiff, range[1] - rDiff, gauge.getStartdate(), gauge.getEnddate(), cb); |
458 } | 464 } |
459 } | 465 } |