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

TextItem with KeyPressFilter return old value

$
0
0
Hello,

We upgraded our application from 4.0p (NIGHTLY 2014-02-12) to 5.0p (NIGHTLY-2015-04-03) and we hawe some issues with a TextItem associated with a KeyPressFilter. If you run following code

Code:

        public void onModuleLoad() {

                DynamicForm form = new DynamicForm();
                form.setWidth(200);
                form.setHeight(200);
               
                TextItem item = new TextItem();
               
                item.setTitle("item0");
                item.setKeyPressFilter("[0-9]");
                item.setValue(2015);
               
                item.addKeyPressHandler(new KeyPressHandler() {
                       
                        @Override
                        public void onKeyPress(KeyPressEvent event) {
                                GWT.log("current value " + event.getItem().getValue());
                        }
                });
               
               
                form.setFields(item);
                form.draw();
        }

item will be initially filled with value 2015.
Execute these steps:

* with cursor at the end press backspace (value will be 201)
* press number 6: log will show the old value (2015) instead of displayed value (201)

With SmartGWT 4.0p20140212 when you press number 6 log show current item value (201).
Is this a missing setting or a wrong behavior?

Browser Chrome 41.0.2272.118 (64-bit)

Thanks in advance

Viewing all articles
Browse latest Browse all 4756

Trending Articles