Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileUpload dialog #17

Closed
GoogleCodeExporter opened this issue Apr 22, 2015 · 20 comments
Closed

FileUpload dialog #17

GoogleCodeExporter opened this issue Apr 22, 2015 · 20 comments

Comments

@GoogleCodeExporter
Copy link

How can we replace file upload dialog from GWT-EXT? What is the analogue
in SmartGWT? This is a missing feature which adds to migration pains from 
GWT-EXT.

Thanks,
--MG

http://forums.smartclient.com/showthread.php?t=3102

Original issue reported on code.google.com by mgrushin...@gmail.com on 1 Dec 2008 at 4:00

@GoogleCodeExporter
Copy link
Author

i added some example on the thread. However there is still one part missing -
callback from iframe.

Original comment by ysbel...@gmail.com on 6 Feb 2009 at 8:00

@GoogleCodeExporter
Copy link
Author

An implementation adjusted from GWT-FormPanel

Original comment by tomsontom@gmail.com on 10 Feb 2009 at 10:20

Attachments:

@GoogleCodeExporter
Copy link
Author

I tried to use it but it doesn't work in hosted mode and with Internet 
Explorer. the iframe onload function is not called. It works only with 
firefoxe. Can you please 
tell me how can I make it work ?

Original comment by zakaria.bouslama@gmail.com on 4 Mar 2009 at 8:40

@GoogleCodeExporter
Copy link
Author

For IE support

In your gwt.xml you need to set:
<replace-with class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImpl">
        <when-type-is class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImpl"/>
    </replace-with>

    <replace-with class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImplIE6">
        <when-type-is class="at.bestsolution.gwt.util.impl.DynamicCallbackFormImpl"/>
        <when-property-is name="user.agent" value="ie6"/>
    </replace-with>

Original comment by tomsontom@gmail.com on 6 Mar 2009 at 5:10

Attachments:

@GoogleCodeExporter
Copy link
Author

I had made one which works almost the same as the File Dialog in GWT-Ext-UX. 

Sanjiv: can you let me join to smartgwt-extensions project? So I can upload it 
there.

Original comment by anthony....@gmail.com on 20 Mar 2009 at 6:44

@GoogleCodeExporter
Copy link
Author

Great! I've added you as a project member.

Original comment by sanjiv.j...@gmail.com on 20 Mar 2009 at 7:12

@GoogleCodeExporter
Copy link
Author

Closing issue. 

PS: anthony : looking forward to check out your work when its in 
smartgwt-extensions.

Original comment by sanjiv.j...@gmail.com on 31 Mar 2009 at 10:43

  • Changed state: Done
  • Added labels: SmartGWT-1.0b3

@GoogleCodeExporter
Copy link
Author

I'm looking forward to this as well.  Has there been any progress since the 
last 
comments on this issue?  I noticed it mentioned on the smartgwt extensions page 
but 
haven't seen a release.  I'd certainly be willing to test this out.

Original comment by tim.cly...@gmail.com on 14 Apr 2009 at 7:59

@GoogleCodeExporter
Copy link
Author

Any progress on this implementation?

Original comment by cazacugmihai@gmail.com on 16 Apr 2009 at 9:07

@GoogleCodeExporter
Copy link
Author

Need this functionality. Can someone upload it so that all of us dont have to 
reinvent it? This will help out a great bit.

Original comment by prase...@gmail.com on 5 May 2009 at 4:06

@GoogleCodeExporter
Copy link
Author

praseedt, 
Pete also posted the required code here :
http://forums.smartclient.com/showthread.php?t=5477

Users have used it successfully.

This will be incorporated into the smartgwt-extensions project but until then it
should be fairly straightforward to incorporate the code into your project.

Original comment by sanjiv.j...@gmail.com on 5 May 2009 at 4:12

@GoogleCodeExporter
Copy link
Author

Hi all,

When following these links I find there are at least three suggested 
approaches/code 
samples (see list below) with differing degrees of complexity.

Is there a best of breed solution for file upload that works across browsers?

Examples of advice/example code offerred ...
http://code.google.com/p/smartgwt/issues/detail?id=17
http://forums.smartclient.com/showthread.php?t=5477
http://forums.smartclient.com/showthread.php?t=3102

It seems plain GWT has FormPanel and FormHandler, the latter containing support 
for 
intercepting the submit complete event and providing access to the response 
content.

http://google-web-
toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FormHandler
.html

I haven't tried this stuff, but is there any plan/merit introducing something 
similar on DynamicForm - would this avoid provide the solution we're all 
looking for?

Original comment by john.lon...@gmail.com on 5 May 2009 at 11:59

@GoogleCodeExporter
Copy link
Author

Original comment by sanjiv.j...@gmail.com on 20 May 2009 at 1:26

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

@tomsontom

I have a question concerning the IE6 implementation. In the unhookevents 
function you
set form.onsubmit = null. But when I destroy the window I get javascript errors 
that
"form" doesn't exist. Can I safely delete that line? Or did I mess something up 
that
the form can't be found?

Original comment by roa...@googlemail.com on 17 Nov 2009 at 1:32

@GoogleCodeExporter
Copy link
Author

Can someone provide an example on how to use the DynamicCallbackForm? Thanks!

Original comment by mingqi...@gmail.com on 29 Jun 2010 at 2:09

@GoogleCodeExporter
Copy link
Author

I tried the following but the onSubmitComplete doesn't seem to get called:

display.getUploadForm().addFormHandler(new DynamicFormHandler() {
      public void onSubmitComplete(DynamicFormSubmitCompleteEvent event) {
        System.out.println("submit complete");
        String responseString = event.getResults();
        System.out.println("Response String is " + responseString);
      }
    });

// Handler for import button
    display.getImportButton().addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        if (display.getUploadForm().validate()
            && display.getImportForm().validate()) {

        // set value for the hidden field
        display.getUploadForm().setValue(
              ModelConstants.FILE_DS_FILE_ID,
              (String) display.getImportForm().getValue(
                  ModelConstants.FILE_DS_FILE_ID));

          display.getImportForm().saveData();

          display.getUploadForm().submitForm();

        }
      }
    });

Original comment by mingqi...@gmail.com on 29 Jun 2010 at 6:54

@GoogleCodeExporter
Copy link
Author

Even for me the onSubmitComplete is not trigerred is there a work around, or is 
this functionality part of smartGWT already ?

Original comment by karthik....@gmail.com on 2 Aug 2010 at 9:26

@GoogleCodeExporter
Copy link
Author

The onSubmitComplete is not called when using IE.
You have to look back on this page to comment 4 how to enable IE support;
http://code.google.com/p/smartgwt/issues/detail?id=17#c4

Original comment by meindert...@gmail.com on 4 Aug 2010 at 9:59

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I have the same problem with chrome (the onSubmitComplete is not called). Any 
ideas?

Original comment by jose.sie...@integromics.com on 30 Apr 2013 at 7:43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant