Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java @ 5008:04ccec566689
flys/#657: Shapefile upload now reports success or failure to client.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Mon, 18 Feb 2013 16:29:37 +0100 |
parents | 6aa1b8abe2d3 |
children | 4bf3b89b38d5 |
comparison
equal
deleted
inserted
replaced
5000:99b452967737 | 5008:04ccec566689 |
---|---|
1 package de.intevation.flys.client.client.ui; | 1 package de.intevation.flys.client.client.ui; |
2 | 2 |
3 import com.google.gwt.core.client.GWT; | 3 import com.google.gwt.core.client.GWT; |
4 import com.google.gwt.user.client.rpc.AsyncCallback; | 4 import com.google.gwt.user.client.rpc.AsyncCallback; |
5 | |
5 import com.smartgwt.client.types.Encoding; | 6 import com.smartgwt.client.types.Encoding; |
6 import com.smartgwt.client.types.VerticalAlignment; | 7 import com.smartgwt.client.types.VerticalAlignment; |
7 import com.smartgwt.client.util.SC; | 8 import com.smartgwt.client.util.SC; |
8 import com.smartgwt.client.widgets.Button; | 9 import com.smartgwt.client.widgets.Button; |
9 import com.smartgwt.client.widgets.Canvas; | 10 import com.smartgwt.client.widgets.Canvas; |
177 label.setWidth(50); | 178 label.setWidth(50); |
178 combobox.setValueMap(it); | 179 combobox.setValueMap(it); |
179 combobox.setShowTitle(false); | 180 combobox.setShowTitle(false); |
180 form.setItems(combobox); | 181 form.setItems(combobox); |
181 | 182 |
182 HTMLPane frame = new HTMLPane(); | 183 HTMLPane uploadTargetFrame = new HTMLPane(); |
183 frame.setWidth("1px"); | 184 uploadTargetFrame.setWidth("200px"); |
184 frame.setHeight("1px"); | 185 uploadTargetFrame.setHeight("50px"); |
185 frame.setContents("<iframe id='uploadTarget' name='uploadTarget'></iframe>"); | 186 uploadTargetFrame.setContents( |
187 "<iframe id='uploadTarget' name='uploadTarget' scrolling='no' width=200 height=50 style='border: 0px'></iframe>"); | |
188 uploadTargetFrame.setBorder("0px"); | |
189 uploadTargetFrame.setScrollbarSize(0); | |
186 | 190 |
187 final DynamicForm uploadForm = new DynamicForm(); | 191 final DynamicForm uploadForm = new DynamicForm(); |
188 uploadForm.setAction("flys/fileupload?uuid=" + artifact.getUuid()); | 192 uploadForm.setAction("flys/fileupload?uuid=" + artifact.getUuid()); |
189 uploadForm.setTarget("uploadTarget"); | 193 uploadForm.setTarget("uploadTarget"); |
190 uploadForm.setEncoding(Encoding.MULTIPART); | 194 uploadForm.setEncoding(Encoding.MULTIPART); |
198 @Override | 202 @Override |
199 public void onClick(ClickEvent e) { | 203 public void onClick(ClickEvent e) { |
200 uploadForm.submitForm(); | 204 uploadForm.submitForm(); |
201 } | 205 } |
202 }); | 206 }); |
203 layout.addMember(frame); | 207 |
204 layout.addMember(label); | 208 layout.addMember(label); |
205 layout.addMember(form); | 209 layout.addMember(form); |
206 layout.addMember(uploadLabel); | 210 layout.addMember(uploadLabel); |
207 layout.addMember(uploadForm); | 211 layout.addMember(uploadForm); |
208 layout.addMember(submit); | 212 layout.addMember(submit); |
209 layout.addMember(getNextButton()); | 213 layout.addMember(getNextButton()); |
214 | |
215 layout.setMembersMargin(10); | |
216 layout.addMember(uploadTargetFrame); | |
210 } | 217 } |
211 | 218 |
212 form.setValues(initial); | 219 form.setValues(initial); |
213 | 220 |
214 layout.setAlign(VerticalAlignment.TOP); | 221 layout.setAlign(VerticalAlignment.TOP); |