开发者

value saved to persistent store when user clicks a button

开发者 https://www.devze.com 2023-02-08 04:18 出处:网络
In my application There is a BasicEditField and a button,When user click on the button the string entered in the BasicEditfield stored intopersisten开发者_运维技巧t store.I assume you want to store Ed

In my application There is a BasicEditField and a button,When user click on the button the string entered in the BasicEditfield stored into persisten开发者_运维技巧t store.


I assume you want to store EditField text when button clicked:

button.setChangeListener(new FieldChangeListener() {

        public void fieldChanged(Field field, int context) {
            PersistentObject store = PersistentStore.getPersistentObject( 0xa3a56927824234L );
            store.setContents(basicEditField.getText());
            store.commit();
        }
    });
0

精彩评论

暂无评论...
验证码 换一张
取 消