Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java @ 599:1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
flys-client/trunk@2203 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 22 Jun 2011 12:50:20 +0000 |
parents | 031357c3e23e |
children | 347cf4a5a486 |
comparison
equal
deleted
inserted
replaced
598:031357c3e23e | 599:1dbffe4c6d12 |
---|---|
431 public void onSuccess(Collection[] collections) { | 431 public void onSuccess(Collection[] collections) { |
432 int num = collections != null ? collections.length : 0; | 432 int num = collections != null ? collections.length : 0; |
433 | 433 |
434 GWT.log("Received " + num + " user collections."); | 434 GWT.log("Received " + num + " user collections."); |
435 | 435 |
436 if (num == 0) { | |
437 return; | |
438 } | |
439 | |
440 updateGrid(collections); | 436 updateGrid(collections); |
441 } | 437 } |
442 } | 438 } |
443 ); | 439 ); |
444 } | 440 } |
453 } | 449 } |
454 | 450 |
455 | 451 |
456 protected void updateGrid(Collection[] collections) { | 452 protected void updateGrid(Collection[] collections) { |
457 clearGrid(); | 453 clearGrid(); |
454 | |
455 if (collections == null || collections.length == 0) { | |
456 return; | |
457 } | |
458 | 458 |
459 for (Collection c: collections) { | 459 for (Collection c: collections) { |
460 grid.addData(new CollectionRecord(c)); | 460 grid.addData(new CollectionRecord(c)); |
461 } | 461 } |
462 } | 462 } |