Logo Search packages:      
Sourcecode: zope-formulator version File versions  Download package

def Formulator::Form::Form::render_view (   self,
  dict = None 
) [inherited]

Render contents (default simplistic way).

Definition at line 322 of file Form.py.

00322                                     :
        """Render contents (default simplistic way).
        """
        dict = dict or {}
        result = StringIO()
        w = result.write
        for group in self.get_groups():
            w('<h2>%s</h2>\n' % group)
            w('<table border="0" cellspacing="0" cellpadding="2">\n')
            for field in self.get_fields_in_group(group):
                if dict.has_key(field.id):
                    value = dict[field.id]
                else:
                    value = None
                w('<tr>\n')
                w('<td>%s</td>\n' % field.get_value('title'))
                w('<td>%s</td>\n' % field.render_view(value))
                w('</tr>\n')
            w('</table>\n')
        return result.getvalue()

    security.declareProtected('View', 'validate')
    def validate(self, REQUEST):


Generated by  Doxygen 1.6.0   Back to index