CppCMS
|
This class is the base class for any form or form widget used in CppCMS. More...
#include <cppcms/form.h>
Public Member Functions | |
virtual void | render (form_context &context)=0 |
virtual void | load (http::context &context)=0 |
virtual bool | validate ()=0 |
virtual void | clear ()=0 |
virtual void | parent (base_form *subform)=0 |
virtual base_form * | parent ()=0 |
This class is the base class for any form or form widget used in CppCMS.
It provides basic, abstract operations that every widget or form should implement.
virtual void cppcms::base_form::clear | ( | ) | [pure virtual] |
Clear the form from all user provided data.
Implemented in cppcms::widgets::select_base, cppcms::widgets::select_multiple, cppcms::widgets::numeric< T >, cppcms::widgets::base_widget, and cppcms::form.
virtual void cppcms::base_form::load | ( | http::context & | context | ) | [pure virtual] |
Load the form information from the provided http::context context. A user can call this function to load all information from the raw POST/GET data into the internal widget representation.
Implemented in cppcms::widgets::submit, cppcms::widgets::file, cppcms::widgets::select_base, cppcms::widgets::select_multiple, cppcms::widgets::checkbox, cppcms::widgets::numeric< T >, cppcms::widgets::base_text, and cppcms::form.
virtual void cppcms::base_form::parent | ( | base_form * | subform | ) | [pure virtual] |
Set the parent of this form. Used internally. You should not use it.
Implemented in cppcms::widgets::base_widget, and cppcms::form.
virtual base_form* cppcms::base_form::parent | ( | ) | [pure virtual] |
Get the parent of this form. If this is the topmost form, NULL is returned.
Implemented in cppcms::widgets::base_widget, and cppcms::form.
virtual void cppcms::base_form::render | ( | form_context & | context | ) | [pure virtual] |
Render the widget to the output set in cppcms::form_context::out() according to the control flags set in cppcms::form_flags. Usually this function is called directly by the template rendering functions.
Implemented in cppcms::widgets::hidden, cppcms::widgets::base_widget, and cppcms::form.
virtual bool cppcms::base_form::validate | ( | ) | [pure virtual] |
Validate the form according to defined rules. If all checks are OK, true is returned. If some widget or form fails, false is returned.
Implemented in cppcms::widgets::file, cppcms::widgets::select_base, cppcms::widgets::select_multiple, cppcms::widgets::regex_field, cppcms::widgets::password, cppcms::widgets::numeric< T >, cppcms::widgets::base_text, cppcms::widgets::base_widget, and cppcms::form.