mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-25 06:36:37 +01:00
added editmode support
This commit is contained in:
@@ -45,6 +45,7 @@ namespace WebWidgets {
|
||||
|
||||
Cell::Cell(View* pOwner, const std::type_info& type):
|
||||
Renderable(type),
|
||||
_em(EM_SELECTCONTENT),
|
||||
_pOwner(pOwner),
|
||||
_enabled(true),
|
||||
_editable(true),
|
||||
@@ -58,6 +59,7 @@ Cell::Cell(View* pOwner, const std::type_info& type):
|
||||
|
||||
Cell::Cell(const std::type_info& type):
|
||||
Renderable(type),
|
||||
_em(EM_SELECTCONTENT),
|
||||
_pOwner(0),
|
||||
_enabled(true),
|
||||
_editable(true),
|
||||
|
||||
@@ -63,6 +63,7 @@ const std::string Table::EV_KEYDOWN("keydown");
|
||||
const std::string Table::EV_KEYPRESSED("keypressed");
|
||||
const std::string Table::EV_ROWSELECTED("rowselected");
|
||||
const std::string Table::EV_CELLSELECTED("cellselected");
|
||||
const std::string Table::EV_STARTCELLVALUECHANGE("startedit");
|
||||
|
||||
|
||||
Table::Table(const TableColumns& tc, TableModel::Ptr pModel):
|
||||
@@ -301,6 +302,15 @@ void Table::handleAjaxRequest(const Poco::Net::NameValueCollection& args, Poco::
|
||||
rowSelected(this, theRow);
|
||||
response.send();
|
||||
}
|
||||
else if (ev == EV_STARTCELLVALUECHANGE)
|
||||
{
|
||||
if (col < 0 || row < 0 || col >= getColumnCount())
|
||||
throw InvalidArgumentException("col/row out of range");
|
||||
|
||||
CellClick ev(row, col);
|
||||
startCellValueChange(this, ev);
|
||||
response.send();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user