Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

uploadItem.addChangedHandler does not fire twice with same file name

$
0
0
Hi,

I have a problem with addChangedHandler(...) method on UploadItem.

Code:

uploadItem.addChangedHandler(new ChangedHandler() {

            @Override
            public void onChanged(ChangedEvent event) {
                // doSomething
                doSomething();
            }
        });

My 1st scenario :

- Click on UploadItem then choose file "image.jpg"
- The onChanged(...) method is executed
- Click again on UploadItem then choose same file "image.jpg"
- The onChanged(...) method is NOT executed

My 2nd scenario :

In two different directories I have two images with same file name but different binary data

- filePath1/image.jpg -> the picture of a dog
- filePath2/image.jpg -> the picture of a cat

- Click on UploadItem then choose file "image.jpg" (dog image)
- The onChanged(...) method is executed
- Click again on UploadItem then choose "image.jpg" (cat image)
- The onChanged(...) method is NOT executed

I did the same with multiple files chosen in the file chooser, results are the same if file(s) name(s) are the same no matter on binary content.

It seems FormItem's detect value has been changed only looking on file name which is problematic for me.
I would like it systematic even if same file (same binary content) is beeing chosen several times.

Isomorphic, can you confirm me please that this is a bug ?

GWT Version : 2.6.1
SmartGWT Version : 5.0-p20141210
Firefox version : 24

I did the test with Firefox 36 also and the results are the same.

Thanks by advance.

Viewing all articles
Browse latest Browse all 4756

Trending Articles