Пример #1
0
void WGLWidget::connectJavaScript(Wt::EventSignalBase &s,
                                  const std::string &methodName)
{
  std::string jsFunction =
    "function(obj, event){"
    """var o=" + glObjJsRef() + ";"
    """if(o) o." + methodName + "(obj,event);"
    "}";
  s.connect(jsFunction);
}
Пример #2
0
void WLineEdit::connectJavaScript(Wt::EventSignalBase& s,
				  const std::string& methodName)
{
  std::string jsFunction =
    "function(lobj, event) {"
    """var o = jQuery.data(" + jsRef() + ", 'lobj');"
    """if (o) o." + methodName + "(lobj, event);"
    "}";

  s.connect(jsFunction);
}