comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java @ 6584:3059d49cc5ce

issue1394: Let client use the new pseudo-out: differenceable, deal with artifacts of other types for diffs. Minor refac.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 17 Jul 2013 12:18:28 +0200
parents ea9eef426962
children 967ae6799d98
comparison
equal deleted inserted replaced
6583:e7e5b40cccc3 6584:3059d49cc5ce
173 Canvas submit = getNextButton(); 173 Canvas submit = getNextButton();
174 174
175 VLayout layout = new VLayout(); 175 VLayout layout = new VLayout();
176 HLayout helperLayout = new HLayout(); 176 HLayout helperLayout = new HLayout();
177 helperLayout.addMember(new DatacagePairWidget(this.artifact, 177 helperLayout.addMember(new DatacagePairWidget(this.artifact,
178 user, "waterlevels", differencesList)); 178 user, "differenceable", differencesList));
179 179
180 layout.addMember(widget); 180 layout.addMember(widget);
181 layout.addMember(submit); 181 layout.addMember(submit);
182 layout.setMembersMargin(10); 182 layout.setMembersMargin(10);
183 this.helperContainer.addMember(helperLayout); 183 this.helperContainer.addMember(helperLayout);
275 public void trackRemoved(Record r) { 275 public void trackRemoved(Record r) {
276 RecommendationPairRecord pr = (RecommendationPairRecord) r; 276 RecommendationPairRecord pr = (RecommendationPairRecord) r;
277 this.removedPairs.add(pr); 277 this.removedPairs.add(pr);
278 } 278 }
279 279
280 public void adjustRecommendation(Recommendation recommendation) {
281 if (recommendation.getIDs() != null) {
282 GWT.log("Setting staticwkms factory for rec with ID "
283 + recommendation.getID());
284 recommendation.setFactory("staticwkms");
285 }
286 else if (recommendation.getFactory().equals("winfo")) {
287 GWT.log("Setting waterlevel factory for a winfo rec.");
288 recommendation.setFactory("waterlevel");
289 }
290 else {
291 GWT.log("Leave rec. id " + recommendation.getID() + ", factory "
292 + recommendation.getFactory() + " untouched.");
293 }
294 }
280 295
281 /** 296 /**
282 * Validates data, does nothing if invalid, otherwise clones new selected 297 * Validates data, does nothing if invalid, otherwise clones new selected
283 * waterlevels and add them to collection, forward the artifact. 298 * waterlevels and add them to collection, forward the artifact.
284 */ 299 */

http://dive4elements.wald.intevation.org