qooxdoo Mobile で、各項目の横にチェックボックスがあるリストを作成しようとしています (Android の設定メニューのように)。リストから拡張し、独自のプロバイダーとレンダラーを作成しました。ファイルは以下にあります。さらに、私の現在の進行状況のライブの例は、ここで見ることができます:例のページ
さて状態は?ご覧のとおり、チェックボックスは表示されていませんが、表示されています (DOM を確認してください)。ネイティブ チェックボックスを表示するように CSS を上書きすると、実際にはそれらが表示されますが、フレームワーク ボックスは表示されません。私の質問は次のとおりです。これを解決するにはどうすればよいですか?これは多くの人が恩恵を受けることができる貢献になると信じているので、これは解決する価値があると本当に思います.
編集:チェックボックスをコンテナにラップしようとしましたが、何も変わりませんでした。
ファイル:
qx.ui.mobile.list.CheckBoxList: ( pastebin.org上)
qx.Class.define('qx.ui.mobile.list.CheckBoxList', {
extend : qx.ui.mobile.list.List,
// overridden
construct : function (delegate) {
this.base( arguments );
this.__provider = new qx.ui.mobile.list.provider.CheckBoxListItemProvider( this );
if ( delegate ) {
this.setDelegate( delegate );
}
}
});
qx.ui.mobile.list.provider.CheckBoxListItemProvider ( pastebin.org上)
qx.Class.define('qx.ui.mobile.list.provider.CheckBoxListItemProvider', {
extend : qx.ui.mobile.list.provider.Provider,
members : {
// overridden
_createItemRenderer : function () {
return new qx.ui.mobile.list.renderer.CheckBoxListItemRenderer();
}
}
});
qx.ui.mobile.list.renderer.CheckBoxListItemRenderer ( pastebin.org上)
qx.Class.define('qx.ui.mobile.list.renderer.CheckBoxListItemRenderer', {
extend : qx.ui.mobile.list.renderer.Abstract,
// overridden
construct : function () {
this.base( arguments, new qx.ui.mobile.layout.HBox().set( { alignY: 'middle' } ) );
this._init();
},
members : {
__title : null,
__subtitle : null,
__checkbox : null,
__leftContainer : null,
getTitle : function () {
return this.__title.getValue()
},
setTitle : function (title) {
this.__title.setValue( title );
},
getSubTitle : function () {
return this.__subtitle.getValue();
},
setSubTitle : function (subtitle) {
this.__subtitle.setValue( subtitle );
},
getValue : function () {
return this.__checkbox.getValue();
},
setValue : function (checked) {
this.__checkbox.setValue( checked );
},
_init : function () {
this.__leftContainer = this._createLeftContainer();
this.add( this.__leftContainer, { flex: 1 } );
this.__title = this._createTitle();
this.__leftContainer.add( this.__title );
this.__subtitle = this._createSubTitle();
this.__leftContainer.add( this.__subtitle );
this.__checkbox = this._createCheckBox();
this.add( this.__checkbox );
},
_createLeftContainer : function () {
return new qx.ui.mobile.container.Composite( new qx.ui.mobile.layout.VBox() );
},
_createTitle : function () {
var title = new qx.ui.mobile.basic.Label();
title.addCssClass( 'list-itemlabel' );
return title;
},
_createSubTitle : function () {
var subtitle = new qx.ui.mobile.basic.Label();
subtitle.addCssClass( 'subtitle' );
return subtitle;
},
_createCheckBox : function () {
var checkbox = new qx.ui.mobile.form.CheckBoxListCheckBox();
return checkbox;
},
// overridden
_applyShowArrow : function (value, old) {
return;
},
// overriden
reset : function () {
this.__title.setValue( '' );
this.__subtitle.setValue( '' );
this.__checkbox.setValue( false );
}
},
// overriden
destruct : function () {
this._disposeObjects( '__title', '__subtitle', '__checkbox', '__leftContainer' );
}
});
qx.ui.mobile.form.CheckBoxListCheckBox ( pastebin.org上)
qx.Class.define('qx.ui.mobile.form.CheckBoxListCheckBox', {
extend : qx.ui.mobile.form.CheckBox,
members : {
// overridden
_onAppear : function () {
// we purposely don't call this.base( arguments ) because it would create a label that we don't need
qx.event.Registration.removeListener( this, 'appear', this.__onAppear, this );
}
}
});