Page tree
Skip to end of metadata
Go to start of metadata

If you upload an image your project,follow this list;

  1. The picture for the field to be inserted in the palette>Containers>flowpanel is added.
  2. In this field, palette->Miscellaneous->image added.
  3. With the image selected, the properties (show properties) by clicking on the icon, then double-click the event in the following block of code was added to more then it is written.

    PersonelEdit.uid
    private void img_0OnDoubleClick(final DoubleClickEvent event) {
    		try {
    			if (editing.getPersonel().getId() == null) {
    				Notification.showNotification(ClientContext.nlsCommon.hata(), PersonelClient.nls.Personel_onceKartKaydedin(), NotificationType.warning);
    				return;
    			}
    			ResimUploadEdit resForm = new ResimUploadEdit("kartResimUploadEdit", null, ControllerAction.UPDATE, getAuthKey(), null, TabloIdEnum.StokKart.getValue(), JsUtil.asString(editing.getPersonel().getId()), PersonelEdit.this);
    			GwtBootstrapApplication.showInWindow(resForm);
    		} catch (Exception e) {
    			JsUtil.shakeWidget(that);
    			Notification.showNotification(ClientContext.nlsCommon.hata(), e.getMessage(), NotificationType.warning);
    		}
    	}


  4. Clicked on the error and Iresimuploadhandler implements were made.

     

    PersonelEdit.uid
    public class PersonelEdit extends EditForm<PersonelClient, Long, PersonelDetay> implements IResimUploadHandler {
    
    

     

  5. Clicked on the error again. Added this override method and the necessary arrangements were made.

    PersonelEdit.uid
    @Override
    	public void onResimUploaded(String resim) {
    		personelResim.setValue(resim);
    	}
  6. Finally clicked the error. Our object identified and enumerated

    Forexample: "personelResim(5);" 

  7. Thus imageUpload gets completed.

Follow on FileUpload.

  • No labels