Table of Contents

Class: SetField qm/fields.py

A field containing zero or more instances of some other field.

All contents must be of the same field type. A set field may not contain sets.

The default field value is set to an empty set.

Base Classes   
Field
    object
Methods   
FormatValueAsHtml
FormatValueAsText
GetHelp
GetHtmlHelp
GetSubfields
GetValueFromDomNode
MakeDomNodeForValue
ParseFormValue
ParseTextValue
Validate
__init__
  FormatValueAsHtml 
FormatValueAsHtml (
        self,
        server,
        value,
        style,
        name=None,
        )

  FormatValueAsText 
FormatValueAsText (
        self,
        value,
        columns=72,
        )

  GetHelp 
GetHelp ( self )

  GetHtmlHelp 
GetHtmlHelp ( self,  edit=0 )

  GetSubfields 
GetSubfields ( self )

  GetValueFromDomNode 
GetValueFromDomNode (
        self,
        node,
        attachment_store,
        )

Exceptions   
qm.QMException, qm.error( "dom wrong tag for field", name = self.GetName(), right_tag = "set", wrong_tag = node.tagName )
  MakeDomNodeForValue 
MakeDomNodeForValue (
        self,
        value,
        document,
        )

  ParseFormValue 
ParseFormValue (
        self,
        request,
        name,
        attachment_stores,
        )

  ParseTextValue 
ParseTextValue ( self,  value )

Exceptions   
qm.QMException, qm.error("invalid set value", start = value [ tok [ 2 ] [ 1 ] : ] )
  Validate 
Validate ( self,  value )

Exceptions   
ValueError, qm.error("empty set field value", field_title = self.GetTitle() )
  __init__ 
__init__ (
        self,
        contained,
        not_empty_set="false",
        )

Create a set field.

The name of the contained field is taken as the name of this field.

contained
An Field instance describing the elements of the set.
not_empty_set
If true, this field may not be empty, i.e. the value of this field must contain at least one element.
raises
ValueError if contained is a set field.
raises
TypeError if contained is not a Field.
Exceptions   
TypeError, "A set must contain another field."
ValueError, "A set field may not contain a set field."

Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1