(self, field, key, value, REQUEST,
                        sub_field_property_dict, render_prefix=None)
return result
Render dynamically a subfield
Render dynamically a subfield
Render dynamically a subfield
def render_sub_field(self, field, key, value, REQUEST,
                        sub_field_property_dict, render_prefix=None):
      """
      Render dynamically a subfield
      """
      for parameter in ('title', 'required', 'size'):
        REQUEST.set(KEYWORD % parameter, sub_field_property_dict[parameter])
      REQUEST.set(KEYWORD % 'default', "")
      REQUEST.set(KEYWORD % 'first_item', 0)
      REQUEST.set(KEYWORD % 'items', sub_field_property_dict['item_list'])
      sub_widget = self.sub_widget[sub_field_property_dict['field_type']]
      if sub_field_property_dict.get('editable', 1):
        result = sub_widget.render(field,
                                   field.generate_subfield_key(
                                     sub_field_property_dict['key'], key=key),
                                   sub_field_property_dict['value'],
                                   REQUEST=REQUEST)
      else:
        result = sub_widget.render_view(field,
                                        sub_field_property_dict['value'],
                                        REQUEST)
      for parameter in ('title', 'required', 'size', 'default', 'first_item',
                        'items'):
        # As it doesn't seem possible to delete value in the REQUEST,
        # use a marker
        REQUEST.set(KEYWORD % parameter, MARKER)
      return result
def render_sub_field ( self , field , key , value , REQUEST , sub_field_property_dict , render_prefix = None ) : for parameter in ( 'title' , 'required' , 'size' ) : REQUEST . set ( KEYWORD % parameter , sub_field_property_dict [ parameter ] ) REQUEST . set ( KEYWORD % 'default' , "" ) REQUEST . set ( KEYWORD % 'first_item' , 0 ) REQUEST . set ( KEYWORD % 'items' , sub_field_property_dict [ 'item_list' ] ) sub_widget = self . sub_widget [ sub_field_property_dict [ 'field_type' ] ] if sub_field_property_dict . get ( 'editable' , 1 ) : result = sub_widget . render ( field , field . generate_subfield_key ( sub_field_property_dict [ 'key' ] , key = key ) , sub_field_property_dict [ 'value' ] , REQUEST = REQUEST ) else : result = sub_widget . render_view ( field , sub_field_property_dict [ 'value' ] , REQUEST ) for parameter in ( 'title' , 'required' , 'size' , 'default' , 'first_item' , 'items' ) : # As it doesn't seem possible to delete value in the REQUEST, # use a marker REQUEST . set ( KEYWORD % parameter , MARKER ) return result