added editmode support

This commit is contained in:
Peter Schojer
2008-07-15 06:56:52 +00:00
parent 9f8bd817f3
commit 2f3fa758e6
8 changed files with 109 additions and 10 deletions

View File

@@ -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),

View File

@@ -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();
}
}