Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 844:ac70261bb3f8
Allow passing no master artifact to RPC service when creating new artifact.
flys-client/trunk@2566 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 24 Aug 2011 14:31:13 +0000 |
parents | 78ef14dc1877 |
children | 4db672cdacb2 |
comparison
equal
deleted
inserted
replaced
843:78ef14dc1877 | 844:ac70261bb3f8 |
---|---|
609 final String url = config.getServerUrl(); | 609 final String url = config.getServerUrl(); |
610 final String locale = config.getLocale(); | 610 final String locale = config.getLocale(); |
611 final Collection collection = getCollection(); | 611 final Collection collection = getCollection(); |
612 final Artifact master = getArtifact(); | 612 final Artifact master = getArtifact(); |
613 | 613 |
614 if (master == null) { | |
615 GWT.log("WARNING: Currently no master artifact set."); | |
616 return; | |
617 } | |
618 if (recommendations == null) { | 614 if (recommendations == null) { |
619 GWT.log("WARNING: Currently no recommendations."); | 615 GWT.log("WARNING: Currently no recommendations."); |
620 return; | 616 return; |
621 } | 617 } |
622 | 618 |
627 | 623 |
628 final String factory = recommendation.getFactory(); | 624 final String factory = recommendation.getFactory(); |
629 | 625 |
630 GWT.log("Load recommended artifact with factory: " + factory); | 626 GWT.log("Load recommended artifact with factory: " + factory); |
631 | 627 |
628 String uuid = master != null ? master.getUuid() : null; | |
629 | |
632 createArtifactService.create( | 630 createArtifactService.create( |
633 url, locale, factory, master.getUuid(), recommendation, | 631 url, locale, factory, uuid, recommendation, |
634 new AsyncCallback<Artifact>() { | 632 new AsyncCallback<Artifact>() { |
635 public void onFailure(Throwable caught) { | 633 public void onFailure(Throwable caught) { |
636 GWT.log("Error loading recommendations: " + | 634 GWT.log("Error loading recommendations: " + |
637 caught.getMessage()); | 635 caught.getMessage()); |
638 } | 636 } |