comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 39:4187a797fc3d

Implemented the step forward mechanism in the CollectionView and added the river map to the initial widget. flys-client/trunk@1472 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 15 Mar 2011 14:35:41 +0000
parents b6b89ff1adee
children d573ae975330
comparison
equal deleted inserted replaced
38:7142386e86c2 39:4187a797fc3d
124 124
125 /** 125 /**
126 * This method handles the initial layout stuff. 126 * This method handles the initial layout stuff.
127 */ 127 */
128 protected void init() { 128 protected void init() {
129 setWidth(600); 129 setWidth(700);
130 setHeight(400); 130 setHeight(600);
131 131
132 layout.setWidth100(); 132 layout.setWidth100();
133 133
134 setCanDragResize(true); 134 setCanDragResize(true);
135 135
141 141
142 layout.addMember(tabs); 142 layout.addMember(tabs);
143 tabs.addTab(parameterTab); 143 tabs.addTab(parameterTab);
144 144
145 if (isNew()) { 145 if (isNew()) {
146 tabs.setTabTitle(0, "MODUL"); 146 tabs.setTabTitle(0, messages.new_calculation());
147 tabs.updateTab(0, renderNew()); 147 tabs.updateTab(0, renderNew());
148 } 148 }
149 } 149 }
150 150
151 151
255 String name = river.getName(); 255 String name = river.getName();
256 items[i++] = new DefaultDataItem(name, null, name); 256 items[i++] = new DefaultDataItem(name, null, name);
257 } 257 }
258 258
259 Data data = new DefaultData( 259 Data data = new DefaultData(
260 messages.river_selection(), 260 "river",
261 messages.river_selection(), 261 messages.river_selection(),
262 null, 262 null,
263 items, 263 items,
264 null); 264 null);
265 265
361 * @param event The StepForwardEvent. 361 * @param event The StepForwardEvent.
362 */ 362 */
363 public void onStepForward(StepForwardEvent event) { 363 public void onStepForward(StepForwardEvent event) {
364 GWT.log("CollectionView - onStepForward()"); 364 GWT.log("CollectionView - onStepForward()");
365 GWT.log("TODO: IMPLEMENT FEED!"); 365 GWT.log("TODO: IMPLEMENT FEED!");
366 String serverUrl = Config.getInstance().getServerUrl();
367
368 forwardService.go(serverUrl, artifact, event.getData(),
369 new AsyncCallback<Artifact>() {
370 public void onFailure(Throwable caught) {
371 GWT.log("Could not feed the artifact.");
372 GWT.log(caught.getMessage());
373 }
374
375 public void onSuccess(Artifact artifact) {
376 GWT.log("Successfully feed the artifact.");
377 setArtifact(artifact);
378 }
379 });
366 } 380 }
367 381
368 382
369 /** 383 /**
370 * Update the view (refresh the list of old and current data). 384 * Update the view (refresh the list of old and current data).

http://dive4elements.wald.intevation.org