mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-18 19:48:44 +02:00
fixed initVal
This commit is contained in:
@@ -132,7 +132,7 @@ void ListBoxCellRenderer::renderProperties(const ListBoxCell* pListBoxCell, std:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ostr << "})";
|
ostr << "})";
|
||||||
ostr << ",dataFields:['i','d'],initVal:'";
|
ostr << ",dataFields:['i','d'],initVal:[";
|
||||||
|
|
||||||
//now serialize data, use cached content for that
|
//now serialize data, use cached content for that
|
||||||
ListBoxCell::Data::const_iterator itV = pListBoxCell->begin();
|
ListBoxCell::Data::const_iterator itV = pListBoxCell->begin();
|
||||||
@@ -149,7 +149,7 @@ void ListBoxCellRenderer::renderProperties(const ListBoxCell* pListBoxCell, std:
|
|||||||
selected = true;
|
selected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ostr << "'";
|
ostr << "]";
|
||||||
ostr << ",valueField:'i',displayField:'d'";
|
ostr << ",valueField:'i',displayField:'d'";
|
||||||
|
|
||||||
ListBoxCell* pL = const_cast<ListBoxCell*>(pListBoxCell);
|
ListBoxCell* pL = const_cast<ListBoxCell*>(pListBoxCell);
|
||||||
|
@@ -73,6 +73,8 @@ Ext.ux.Multiselect = Ext.extend(Ext.form.Field, {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.store.on('load', this.onStoreLoad, this);
|
||||||
|
|
||||||
this.view = new Ext.ux.DDView({
|
this.view = new Ext.ux.DDView({
|
||||||
multiSelect: true, store: this.store, selectedClass: cls+"-selected", tpl:tpl,
|
multiSelect: true, store: this.store, selectedClass: cls+"-selected", tpl:tpl,
|
||||||
allowDup:this.allowDup, copy: this.copy, allowTrash: this.allowTrash,
|
allowDup:this.allowDup, copy: this.copy, allowTrash: this.allowTrash,
|
||||||
@@ -95,16 +97,20 @@ Ext.ux.Multiselect = Ext.extend(Ext.form.Field, {
|
|||||||
} else {
|
} else {
|
||||||
this.hiddenField = Ext.get(document.body).createChild(hiddenTag);
|
this.hiddenField = Ext.get(document.body).createChild(hiddenTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fs.doLayout();
|
||||||
|
},
|
||||||
|
|
||||||
|
initValue:Ext.emptyFn,
|
||||||
|
|
||||||
|
onStoreLoad: function() {
|
||||||
if (this.initVal != null)
|
if (this.initVal != null)
|
||||||
{
|
{
|
||||||
this.setValue(this.initVal);
|
this.setValue(this.initVal);
|
||||||
this.initVal = null;
|
this.initVal = null;
|
||||||
}
|
}
|
||||||
fs.doLayout();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initValue:Ext.emptyFn,
|
|
||||||
|
|
||||||
onViewClick: function(vw, index, node, e) {
|
onViewClick: function(vw, index, node, e) {
|
||||||
var arrayIndex = this.preClickSelections.indexOf(index);
|
var arrayIndex = this.preClickSelections.indexOf(index);
|
||||||
if (arrayIndex != -1)
|
if (arrayIndex != -1)
|
||||||
|
@@ -1117,6 +1117,7 @@ void ExtJSTest::testListBox()
|
|||||||
ptrList->insert(std::string("FirstSelected"), true);
|
ptrList->insert(std::string("FirstSelected"), true);
|
||||||
ptrList->insert(std::string("Second"), false);
|
ptrList->insert(std::string("Second"), false);
|
||||||
ptrList->insert(std::string("SecondSelected"), true);
|
ptrList->insert(std::string("SecondSelected"), true);
|
||||||
|
ptrList->rowSelected.setServerCallback(Poco::WebWidgets::SC_YES);
|
||||||
|
|
||||||
std::ostringstream ostr;
|
std::ostringstream ostr;
|
||||||
std::ofstream fstr("testListBox.html");
|
std::ofstream fstr("testListBox.html");
|
||||||
|
@@ -167,7 +167,7 @@ void ListBoxCell::select(const Any& elem)
|
|||||||
if (it->second != true)
|
if (it->second != true)
|
||||||
{
|
{
|
||||||
it->second = true;
|
it->second = true;
|
||||||
int idx = it - _data.begin();
|
int idx = static_cast<int>(it - _data.begin());
|
||||||
rowSelected(this, idx);
|
rowSelected(this, idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -182,7 +182,7 @@ void ListBoxCell::deselect(const Any& elem)
|
|||||||
if (it->second != false)
|
if (it->second != false)
|
||||||
{
|
{
|
||||||
it->second = false;
|
it->second = false;
|
||||||
int idx = it - _data.begin();
|
int idx = static_cast<int>(it - _data.begin());
|
||||||
rowDeselected(this, idx);
|
rowDeselected(this, idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user