Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to select and upload a file on button click in smartgwt

    One of the requirement is to upload a file on button click. So I would like implement that user has to select and upload a file on button click instead of using UploadItem and submit button. Is there any possibility of implementing this in smartgwt ?

    I know the server side implementaion of upload file part.. (servlet). Struggling only on client side about input control.

    How could i open "File System dialog" on button click ??

    Help me..! Looking forward for your reply..Thanks.
    Last edited by RIDEM; 28 Mar 2016, 06:37.

    #2
    Hi RIDEM,

    if I understand correctly you want not to have the "Submit"-button and upload immediately after selecting the file in the file chooser dialog?
    If so, did you try to add a onChange-handler on the UploadItem or the DynamicForm? This would be my first test.

    Best regards
    Blama

    Comment


      #3
      Thanks for your reply Blama..

      I will test and reply back about your suggestion - adding ChangeHandler. on UploadItem.

      Before that.. Is there any possibility to open the File chooser dialog on button click?

      Comment


        #4
        Hi RIDEM,

        in this sample there is the "Dateien auswählen" Button. Perhaps you can put it as the only item in a DynamicForm and get rid of the title and the other strings.
        Please note that you should most likely use FileItem and not UploadItem.

        Best regards
        Blama

        Comment

        Working...
        X