Example #1
0
 def collect_fields(self,sfdict,*layouts):
     fields = []
     list_index = 0
     for layout in layouts:
         for elem in layout.walk():
             if elem.field is not None:
                 sf = sfdict.get(elem.field,None)
                 if sf is None:
                     sf = self.create_field(elem.field)
                     sfdict[elem.field] = sf
                 elem.list_index = list_index
                 list_index += sf.list_values_count
                 fields.append(sf)
     return fields
Example #2
0
 def add(f):
     fields.append(f)
     if f not in all_fields:
         all_fields.append(f)