Titanium の Alloy フレームワークを使用する際、モデルは Backbone.js を使用しています。私は Backbone.js と Alloy の両方が初めてです。
私は ExtJS に精通していますが、ExtJS では、フォームを作成してから次のように言うことができます。
form.loadRecord(record); // where record is an instance of a model
その後
form.getRecord(record); // When you're saving the form, get the record
var vals = form.getValues(); // And then get the values from the form that the user changed
record.setValues(vals); // Update your record with whatever values the user changed.
私の質問は、合金のフォームのパターンは何ですか? それとも一つもありませんか?
独自の関数を簡単に作成できましたが、次のようにモデルをフォーム オブジェクトにバインドしようとするとアプリがクラッシュするという問題が発生しています。
that.model = model; // where model was passed in to the form.loadRecord function.