Wt::Ext::FormField Class Reference

An abstract base class for form fields. More...

#include <Ext/FormField>

Inheritance diagram for Wt::Ext::FormField:

Inheritance graph
[legend]

List of all members.

Public Types

enum  MessageLocation { FancyToolTip, PlainToolTip, Below, Besides }
 The location of the validation error message. More...

Public Member Functions

void setErrorMessageLocation (MessageLocation location)
 Set the location of the validation error message.
void setValidator (WValidator *validator)
 Set a validator.
WValidatorvalidator () const
 Get the validator.
virtual WValidator::State validate ()
 Validate the field.
WLabellabel () const
 Get the label associate with this formfield.
virtual void refresh ()
 Refresh the widget.

Protected Member Functions

 FormField (WContainerWidget *parent=0)
 Create a form field.

Friends

class Wt::WLabel


Detailed Description

An abstract base class for form fields.

Member Enumeration Documentation

enum Wt::Ext::FormField::MessageLocation

The location of the validation error message.

Enumerator:
FancyToolTip  Display in a fancy (JavaScript) tool tip.
PlainToolTip  Display in a plain HTML tool tip.
Below  Display below the field.
Besides  Display next to the field.


Member Function Documentation

void Wt::Ext::FormField::setValidator ( WValidator validator  ) 

Set a validator.

The validator will be used for both client side and server side validation (if it is, or inherits from, one of the four validators provided by Wt: WDateValidator, WDoubleValidator, WIntValidator, WLengthValidator, WRegExpValidator).

If the validator has no parent yet, ownership of the validator is transferred to the form field.

See also:
validate()

WLabel * Wt::Ext::FormField::label (  )  const

Get the label associate with this formfield.

Returns the label (if there is one) that acts as a proxy for this widget.

See also:
WLabel::setBuddy(Ext::FormField *)

void Wt::Ext::FormField::refresh (  )  [virtual]

Refresh the widget.

The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.

The widget must actualize its contents in response.

Reimplemented from Wt::WWebWidget.

Reimplemented in Wt::Ext::ComboBox.


The documentation for this class was generated from the following files:
Generated on Mon Apr 14 15:15:01 2008 for Wt by doxygen 1.5.3