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();
}
});
精彩评论