Wtx ~ Wt Extension Library
WtxLib
|
#include <TableView.h>
Public Member Functions | |
TableView (Wtx::Dbo::Session *s) | |
TableView (const std::string &viewDefName, Wtx::Dbo::Session *s) | |
TableView (const Wtx::TableViewDef::ViewDef &viewDef, Wtx::Dbo::Session *s) | |
TableView (const std::string &viewDefName, const Wtx::TableViewDef::ViewDef &viewDef, Wtx::Dbo::Session *s) | |
bool | loadLayout (const std::string &name) |
void | saveLayout (const std::string &name) |
Wtx::Dbo::Session * | session () const |
const std::shared_ptr< Wtx::Dbo::QueryModel< Wt::Dbo::ptr< C > > > & | model () const |
virtual void | showHeaderPopup (const Wt::WMouseEvent &event) |
std::string | layoutName (const std::string &name) const |
void | refresh () |
void | refreshSelected () |
const std::string & | filter () const |
void | setFilter () |
void | setFilter (const std::string &filter) |
void | setSearch (const std::string &search) |
void | setSubFilter (const std::string &filter) |
const std::string & | queryValue () const |
void | setQuery (const std::string &search="") |
void | setupLayout () |
int | queryRowCount () const |
int | totalRowCount () |
Wt::Dbo::ptr< C > | item (Wt::WModelIndex index) |
void | selectItem (Wt::Dbo::ptr< C > item) |
Wt::Dbo::ptr< C > | selectedItem () |
Public Member Functions inherited from Wtx::TableView | |
Wtx::TableViewDef & | viewDef () |
Dbo Table View.
Definition at line 68 of file TableView.h.
void Wtx::Dbo::TableView< C >::setQuery | ( | const std::string & | search = "" | ) |
BUGBUG: this will replace a single-quote character with a double-single-quote character. This is bad because the search string can still produce a sql-injection issue.
BUGBUG: need to audit the 'search' string to make sure there is no risk of SQL injection. Or, instead of trying to parse the sql string if we can figure out how to call upon query.where().bind() repeatedly in seperate calls
When assigning this search to the regular filter, make sure the regular filter is wrapped with parenthesis so the logic doesn't get blown if there's more than one clause in the regular filter. Ideally you'd expect the author of the base filter to already wrap things in parenthesis, but we can't rely on it.
Definition at line 328 of file TableView_imp.h.