def getDbTableStructure(self,):
		""" returns a dictionary of dictionaries containing the structure of the table. :
			
		{str fieldName:{str property:value}}
		
		properties are at least : str label, int width, str type, bool userField, bool null
		
		userField : userField fields are fields of projects manager choice
		
		systemField : systemField fields are fields unuseful to users
		
		DbTableStructure is cached in self._DbTableStructure - initDbTableStructureSave initializes it
		
		"""
		
		
		if not self._DbTableStructure or self._deleteCache:
		
			self._DbTableStructure = {}
			
			if not self._fieldsListRequest: # caches the request
				self._fieldsListRequest = FSZSQLMethod(self,DB_TABLE_FIELDS_ZSQLFile)
				self._fieldsListRequest.connection = self.connection
				#_fieldsListRequest.connection.manage_open_connection()
			
			tableName = self.getTableName()
			
			fieldsListResult = self._fieldsListRequest(tableName=self.getTableName())
			
			
			for field in fieldsListResult:
				fieldId = field['field']
				fieldDefs = {}
				fieldDefs['userField'] = fieldId.startswith('_') 
				fieldDefs['systemField'] = fieldId.startswith('__')
				#fieldDefs['foreign_key'] = False # TODO
				#fieldDefs['auto_num'] = False # TODO
				fieldDefs['width'] = DB_TYPE_TO_LEN[field['type']]
				fieldDefs['null'] = field['not_null']
				fieldDefs['type'] = field['type']
				#fieldDefs['unique'] = False # TODO
				fieldDefs['label'] = outils.labelFromId(fieldId)
				fieldDefs['on_public_form'] = False

				
				self._DbTableStructure[fieldId]=fieldDefs
			
			#fieldslistRequest.connection.manage_close_connection()
			
			
		return self._DbTableStructure
	def getTablePropertiesFromRequest(self,REQUEST):
		""" creates from request a dictionnary of fields and parameters {fieldName str:{fieldParameter str: parameterValue div}} """
		
		form = REQUEST.form
				
		tablePropertiesDicts = {}

		# parses the request datas

		for finput in form:
			# field parameters
			if finput.find('.')>-1:
				parameter = finput.split('.')
				fieldParam = parameter[0]
				paramParam = parameter[1]
				# parameter[0] : field name, parameter[1] : property, form[input] : param value
				
				
				if not(tablePropertiesDicts.has_key(fieldParam)):
					tablePropertiesDicts[fieldParam]={'label':outils.labelFromId(fieldParam)}
				
				# property value from parameter value :
				if paramParam in ["primary_key","null","auto_num","on_public_form"]:
					valueParam = True
				elif paramParam in ["width"]:
					if not form[finput]:
						valueParam=None
					else:
						valueParam = int(form[finput])
				else:
					valueParam = form[finput]
				
				tablePropertiesDicts[fieldParam][paramParam]=valueParam
		
		
		return tablePropertiesDicts
	def labelFromId(self,label):
		""" """
		return outils.labelFromId(label)
	def _setFieldSettings(self,field,**kwargs):
		
		settingsDictionnary = {'required':kwargs.get('null',False),'title':kwargs.get('title',outils.labelFromId(field.__name__)),'unicode':False}
		
		width = kwargs.get('width',None)
		
		# VALIDATION CONSTRAINTS : a ameliorer !!!
		if width:
			if field.has_value('end'): # pour les entiers qui peuvent avoir un maximum
				settingsDictionnary['start']= 0 - (2 ** (2**width)) / 2 -1
				settingsDictionnary['end']= (2 ** (2**width)) / 2 +1
				settingsDictionnary['display_maxwidth'] = (2 ** (2**width))/10+1
	
			elif field.has_value('max_length'):
				settingsDictionnary['max_length'] = width
				if field.meta_type in ["TextAreaField","RawTextAreaField"]:
					settingsDictionnary['width']=40
					settingsDictionnary['height']=width/40+1
				else:
					settingsDictionnary['display_maxwidth'] = width
		
		'''
		primary_key = kwargs.get('null',False)
		
		if primary_key:
			# primary keys are stored as a reference form property
			#referenceFormObject.manage_changeProperties(
			#	{"primary_keys":referenceFormObject.primary_keys + (fieldName,)})
		'''
		
		unique = kwargs.get('unique',False)
		if unique: # TODO
			settingsDictionnary['external_validator']="verifyUnicityConstraint"
		
		auto_num = kwargs.get('auto_num',False)
		if auto_num:
			settingsDictionnary['override_default']="sequelAutoNum"
		
		for setting in settingsDictionnary:
			field.values[setting] = settingsDictionnary[setting]
	
		return field.values