|
Wt
4.10.4
|
A model class keeping information about database columns that are to be used in the model/view logic. More...
#include <Wt/Form/Dbo/FormModelBase.h>
Public Member Functions | |
| FormModelBase () | |
| Constructor. | |
| const std::vector< std::string > & | dboFields () const |
| Returns the Dbo columns used in this model. | |
Public Member Functions inherited from Wt::WFormModel | |
| WFormModel () | |
| Constructor. | |
| void | addField (Field field, const WString &info=WString::Empty) |
| Adds a field. | |
| void | removeField (Field field) |
| Removes a field. | |
| std::vector< Field > | fields () const |
| Returns the fields. | |
| virtual void | reset () |
| Resets the model. | |
| virtual bool | validate () |
| Validates the current input. | |
| bool | valid () const |
| Returns the current overall validation state. | |
| void | setVisible (Field field, bool visible) |
| Sets whether a field is visible. | |
| virtual bool | isVisible (Field field) const |
| Returns whether a field is visible. | |
| void | setReadOnly (Field field, bool readOnly) |
| Sets whether a field is read-only. | |
| virtual bool | isReadOnly (Field field) const |
| Returns whether a field is read only. | |
| virtual WString | label (Field field) const |
| Returns a field label. | |
| virtual void | setValue (Field field, const cpp17::any &value) |
| Sets the field value. | |
| virtual const cpp17::any & | value (Field field) const |
| Returns the field value. | |
| virtual WString | valueText (Field field) const |
| Returns the field value text. | |
| virtual void | setValidator (Field field, const std::shared_ptr< WValidator > &validator) |
| Sets a validator. | |
| virtual std::shared_ptr< WValidator > | validator (Field field) const |
| Returns a validator. | |
| virtual bool | validateField (Field field) |
| Validates a field. | |
| virtual void | setValidated (Field field, bool validated) |
| Sets whether a field has been validated. | |
| virtual bool | isValidated (Field field) const |
| Returns whether the field has been validated yet. | |
| const WValidator::Result & | validation (Field field) const |
| Returns the result of a validation. | |
| virtual void | setValidation (Field field, const WValidator::Result &result) |
| Sets the validation result for a field. | |
Public Member Functions inherited from Wt::WObject | |
| void | addChild (std::unique_ptr< WObject > child) |
| Add a child WObject whose lifetime is determined by this WObject. | |
| template<typename Child > | |
| Child * | addChild (std::unique_ptr< Child > child) |
| Add a child WObject, returning a raw pointer. | |
| std::unique_ptr< WObject > | removeChild (WObject *child) |
| Remove a child WObject, so its lifetime is no longer determined by this WObject. | |
| template<typename Child > | |
| std::unique_ptr< Child > | removeChild (Child *child) |
| Remove a child WObject, so its lifetime is no longer determined by this WObject. | |
| virtual const std::string | id () const |
| Returns the (unique) identifier for this object. | |
| virtual void | setObjectName (const std::string &name) |
| Sets an object name. | |
| virtual std::string | objectName () const |
| Returns the object name. | |
| void | resetLearnedSlots () |
| Resets learned stateless slot implementations. | |
| template<class T > | |
| void | resetLearnedSlot (void(T::*method)()) |
| Resets a learned stateless slot implementation. | |
| template<class T > | |
| WStatelessSlot * | implementStateless (void(T::*method)()) |
| Declares a slot to be stateless and learn client-side behaviour on first invocation. | |
| template<class T > | |
| WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
| Declares a slot to be stateless and learn client-side behaviour in advance. | |
| void | isNotStateless () |
| Marks the current function as not stateless. | |
| template<class T > | |
| WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
| Provides a JavaScript implementation for a method. | |
Public Member Functions inherited from Wt::Core::observable | |
| observable () noexcept | |
| Default constructor. | |
| virtual | ~observable () |
| Destructor. | |
| template<typename... Args, typename C > | |
| auto | bindSafe (void(C::*method)(Args...)) noexcept |
| Protects a method call against object destruction. | |
| template<typename... Args, typename C > | |
| auto | bindSafe (void(C::*method)(Args...) const) const noexcept |
| Protects a const method call against object destruction. | |
| template<typename Function > | |
| auto | bindSafe (const Function &function) noexcept |
| Protects a function against object destruction. | |
Protected Member Functions | |
| void | insertDboField (Wt::WFormModel::Field field) |
| Adds a Dbo column as a field. | |
Protected Member Functions inherited from Wt::WObject | |
| virtual WStatelessSlot * | getStateless (Method method) |
| On-demand stateless slot implementation. | |
Additional Inherited Members | |
Public Types inherited from Wt::WFormModel | |
| typedef const char * | Field |
| A type to identify a field. | |
Public Types inherited from Wt::WObject | |
| typedef void(WObject::* | Method) () |
| Typedef for a WObject method without arguments. | |
A model class keeping information about database columns that are to be used in the model/view logic.
| Wt::Form::Dbo::FormModelBase::FormModelBase | ( | ) |
Constructor.