Project

General

Profile

Bug #3721 ยป WTextEditInWTemplate.cpp

WTemplate example that reproduce the problem. - Anonymous, 01/08/2015 09:19 PM

 


#include <Wt/WPushButton>
#include <Wt/WTemplate>
#include <Wt/WLineEdit>
#include <Wt/WTextEdit>




class WInvalidTemplate : public Wt::WTemplate{
public:
WInvalidTemplate(Wt::WContainerWidget* parent) :
Wt::WTemplate(parent)
{
setTemplateText(
"<div> "
" <div> "
" <label for=\"${id:name}\">Name</label> "
" <div>${name}</div> "
" </div> "
" <div> "
" <label for=\"${id:post}\">Post</label> "
" <div >${post}</div> "
" </div> "
" <div> "
" <div> "
" ${submit} "
" </div> "
" </div> "
"</div> "
);
Wt::WLineEdit* name = new Wt::WLineEdit();
Wt::WTextEdit* post = new Wt::WTextEdit();
Wt::WPushButton* pb = new Wt::WPushButton("Save");
pb->clicked().connect(this, &WInvalidTemplate::save);

bindWidget("name", name);
bindWidget("post", post);
bindWidget("submit", pb);
}

void save(){
Wt::log("debug") << "Expecting this line to appear";
return;
}
};

    (1-1/1)