Project

General

Profile

Bug #865 » test172.cc

Koen Deforche, 06/23/2011 04:56 PM

 
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#include <iostream>
#include <boost/lexical_cast.hpp>

#include <Wt/WApplication>
#include <Wt/WContainerWidget>
#include <Wt/WLineEdit>
#include <Wt/WPushButton>
#include <Wt/WTemplate>

using namespace Wt;

class TestApplication : public WApplication {
public:
TestApplication(const WEnvironment& env)
: WApplication(env) {

WTemplate *text = new WTemplate("<div>${test} some text</div>");
text->bindString("test", "<i>");
root()->addWidget(text);
}
};

WApplication *createApplication(const WEnvironment& env)
{
WApplication *app = new TestApplication(env);
return app;
}

int main(int argc, char **argv)
{
return WRun(argc, argv, &createApplication);
}
(1-1/3)