新しいデータを sqlite に (ボタンクリックで) 挿入し、アイテムリストを更新して、アプリを再起動せずに新しいデータを表示できるようにする方法を説明します。javascript&html を使用して win8app を作成します。
アプリでデータバインディングを使用しませんでした。
// Because we're doing the rendering, we need to put the data into the item.
// We can't use databinding.
result.getElementsByClassName("item-image")[0].src =currentItem.data.backgroundImage;
result.getElementsByClassName("item-note-day")[0].textContent = currentItem.data.noteDay;
result.getElementsByClassName("item-iconClassImage")[0].src = currentItem.data.iconImage;
result.getElementsByClassName("item-noteTitle")[0].textContent = currentItem.data.noteTitle;
result.getElementsByClassName("item-noteExcerpt")[0].textContent = currentItem.data.noteContent;
return result;
私が欲しいのは、ボタンをクリックすると、自分のデータを sqlite に挿入し、リストビューを更新して、すべてのデータに新しいデータが含まれていることを確認できるようにすることです。そして、データをsqliteに挿入することに成功しました。
すみません、私は中国人です。英語で質問するのはこれが初めてです。私ははっきりしていませんか?誰かが私を助けることができれば、ありがとう。