Kaydet (Commit) 8a9e404b authored tarafından Javier Fernandez's avatar Javier Fernandez

PyWebWizard: Fixing bugs and implementation of mising features.

Setting the parent GroupConfig root to the children.

Change-Id: Ie066c76d4c14d9adc3e09da494aef90cf50596d5
üst 63339c48
...@@ -20,6 +20,11 @@ from .Configuration import Configuration ...@@ -20,6 +20,11 @@ from .Configuration import Configuration
class ConfigGroup(object): class ConfigGroup(object):
root = None
def __init__(self):
self.root = None
def writeConfiguration(self, configurationView, param): def writeConfiguration(self, configurationView, param):
for name,data in inspect.getmembers(self): for name,data in inspect.getmembers(self):
if name.startswith(param): if name.startswith(param):
...@@ -43,9 +48,13 @@ class ConfigGroup(object): ...@@ -43,9 +48,13 @@ class ConfigGroup(object):
propertyName = field[len(prefix):] propertyName = field[len(prefix):]
child = getattr(self, field) child = getattr(self, field)
if isinstance(child, ConfigGroup): if isinstance(child, ConfigGroup):
child.setRoot(self.root);
child.readConfiguration(configView.getByName(propertyName), child.readConfiguration(configView.getByName(propertyName),
prefix) prefix)
else: else:
value = configView.getByName(propertyName) value = configView.getByName(propertyName)
if value is not None: if value is not None:
setattr(self,field, value) setattr(self,field, value)
def setRoot(self, newRoot):
self.root = newRoot
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment