Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFDefault.formlib.widgets.TupleTextAreaWidget Class Reference
Inheritance diagram for CMFDefault.formlib.widgets.TupleTextAreaWidget:
Inheritance graph
[legend]
Collaboration diagram for CMFDefault.formlib.widgets.TupleTextAreaWidget:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__

Private Member Functions

def _toFieldValue
def _toFormValue

Detailed Description

Definition at line 79 of file widgets.py.


Constructor & Destructor Documentation

def CMFDefault.formlib.widgets.TupleTextAreaWidget.__init__ (   self,
  context,
  field,
  request 
)

Definition at line 84 of file widgets.py.

00084 
00085     def __init__(self, context, field, request):
00086         super(TupleTextAreaWidget, self).__init__(context, request)


Member Function Documentation

def CMFDefault.formlib.widgets.TupleTextAreaWidget._toFieldValue (   self,
  input 
) [private]

Definition at line 87 of file widgets.py.

00087 
00088     def _toFieldValue(self, input):
00089         input = super(TupleTextAreaWidget, self)._toFieldValue(input)
00090         if isinstance(input, basestring):
00091             input = tuple([ l.strip()
00092                             for l in input.splitlines() if l.strip() ])
00093 
00094         if input == ():
00095             return self.context.missing_value
00096 
00097         return input

def CMFDefault.formlib.widgets.TupleTextAreaWidget._toFormValue (   self,
  value 
) [private]

Definition at line 98 of file widgets.py.

00098 
00099     def _toFormValue(self, value):
00100         if value is not None:
00101             value = u'\n'.join(value)
00102         return super(TupleTextAreaWidget, self)._toFormValue(value)
00103 

Here is the caller graph for this function:


The documentation for this class was generated from the following file: