Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java @ 4184:03de5c424f95
Fix warnings and minor TODOs in flys-client.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 19 Oct 2012 09:29:57 +0200 |
parents | 145980c21700 |
children | 207de712d79d |
comparison
equal
deleted
inserted
replaced
4183:1755a1bfe5ce | 4184:03de5c424f95 |
---|---|
64 extends Tab | 64 extends Tab |
65 implements StepBackHandler, StepForwardHandler, ParameterChangeHandler, | 65 implements StepBackHandler, StepForwardHandler, ParameterChangeHandler, |
66 HasParameterChangeHandler, CollectionChangeHandler, | 66 HasParameterChangeHandler, CollectionChangeHandler, |
67 OutputModesChangeHandler, AdvanceHandler | 67 OutputModesChangeHandler, AdvanceHandler |
68 { | 68 { |
69 private static final long serialVersionUID = 5204784727239299980L; | |
70 | |
69 public static final String STYLENAME_OLD_PARAMETERS = "oldParameters"; | 71 public static final String STYLENAME_OLD_PARAMETERS = "oldParameters"; |
70 | 72 |
71 /** The message class that provides i18n strings.*/ | 73 /** The message class that provides i18n strings.*/ |
72 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); | 74 protected FLYSConstants MSG = GWT.create(FLYSConstants.class); |
73 | 75 |
353 HasStepForwardHandlers handler = widget; | 355 HasStepForwardHandlers handler = widget; |
354 | 356 |
355 widget.setContainer(helperPanel); | 357 widget.setContainer(helperPanel); |
356 | 358 |
357 handler.addStepForwardHandler(new StepForwardHandler() { | 359 handler.addStepForwardHandler(new StepForwardHandler() { |
360 private static final long serialVersionUID = -6210719844707004860L; | |
361 | |
358 @Override | 362 @Override |
359 public void onStepForward(StepForwardEvent event) { | 363 public void onStepForward(StepForwardEvent event) { |
360 lockUI(); | 364 lockUI(); |
361 Data[] data = event.getData(); | 365 Data[] data = event.getData(); |
362 | 366 |
364 DataItem[] riversItems = data[1].getItems(); | 368 DataItem[] riversItems = data[1].getItems(); |
365 | 369 |
366 String module = moduleItems[0].getStringValue(); | 370 String module = moduleItems[0].getStringValue(); |
367 String river = riversItems[0].getStringValue(); | 371 String river = riversItems[0].getStringValue(); |
368 | 372 |
369 if (module == null) { | 373 if (module == null || river == null) { |
370 // TODO throw / show error! | 374 GWT.log("ParameterList.renderNew(): module == null || river == null"); |
371 unlockUI(); | 375 unlockUI(); |
372 return; | 376 return; |
373 } | 377 } |
374 | 378 |
375 String newTitle = MSG.getString(module); | 379 String newTitle = MSG.getString(module); |
385 new AsyncCallback<Artifact>() { | 389 new AsyncCallback<Artifact>() { |
386 @Override | 390 @Override |
387 public void onFailure(Throwable caught) { | 391 public void onFailure(Throwable caught) { |
388 unlockUI(); | 392 unlockUI(); |
389 GWT.log("Could not create the new artifact."); | 393 GWT.log("Could not create the new artifact."); |
390 SC.warn(MSG.getString(caught.getMessage())); | 394 SC.warn(FLYS.getExceptionString(MSG, caught)); |
391 } | 395 } |
392 | 396 |
393 @Override | 397 @Override |
394 public void onSuccess(Artifact artifact) { | 398 public void onSuccess(Artifact artifact) { |
395 GWT.log("Successfully created a new artifact."); | 399 GWT.log("Successfully created a new artifact."); |