46 #ifndef __WTX_TEMPLATEFORMVIEW_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 47 #define __WTX_TEMPLATEFORMVIEW_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 49 #include <Wt/WTemplateFormView.h> 65 :
public Wt::WTemplateFormView
82 std::unique_ptr<Wt::WWidget> createFormWidget( Wt::WFormModel::Field f );
93 std::unique_ptr<Wt::WWidget> createEditWidget( Wt::WFormModel::Field f );
99 virtual void updateView( Wt::WFormModel *model );
100 virtual void updateViewField( Wt::WFormModel *model, Wt::WFormModel::Field field );
101 virtual void updateViewValue( Wt::WFormModel *model, Wt::WFormModel::Field field, Wt::WFormWidget *edit );
102 virtual bool updateViewValue( Wt::WFormModel *model, Wt::WFormModel::Field field, Wt::WWidget *edit );
103 virtual void updateModel( Wt::WFormModel *model );
104 virtual void updateModelField( Wt::WFormModel *model, Wt::WFormModel::Field field );
105 virtual void updateModelValue( Wt::WFormModel *model, Wt::WFormModel::Field field, Wt::WFormWidget *edit );
106 virtual bool updateModelValue( Wt::WFormModel *model, Wt::WFormModel::Field field, Wt::WWidget *edit );
112 virtual void bindString(
const std::string &varName,
const Wt::WString &value, Wt::TextFormat textFormat=Wt::TextFormat::XHTML );
113 virtual void bindWidget(
const std::string &varName, std::unique_ptr< Wt::WWidget > widget );
114 virtual std::unique_ptr< Wt::WWidget > removeWidget( Wt::WWidget *widget )
override;
115 virtual bool conditionValue(
const std::string &name )
const;
116 virtual void resolveString(
const std::string &varName,
const std::vector< Wt::WString > &args, std::ostream &result );
117 virtual void handleUnresolvedVariable(
const std::string &varName,
const std::vector< Wt::WString > &args, std::ostream &result );
118 virtual WWidget * resolveWidget(
const std::string &varName );
119 virtual bool resolveFunction(
const std::string &name,
const std::vector< Wt::WString > &args, std::ostream &result );
120 virtual void refresh()
override;
121 virtual void renderTemplate( std::ostream &result );
125 void show(
const std::string & functionName,
const std::string & varName,
const std::vector< Wt::WString > & args = std::vector<Wt::WString>() )
128 std::cout << __FILE__ <<
":" << __LINE__ <<
" " << functionName <<
": " << varName << std::endl;
129 for(
auto arg : args )
130 std::cout << __FILE__ <<
":" << __LINE__ <<
" --" << arg << std::endl;
140 #endif // __WTX_TEMPLATEFORMVIEW_H___