开发者

value saved to persistent store when user clicks a button

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜