def updateString(self): if not self.value: if self.dataWidget: self.dataWidget.disable() return txt = formatString( self.bone.formatString, self.value["dest"], self.bone.destStructure, prefix=["dest"], language=self.language ) if self.dataWidget: txt = formatString( txt, self.dataWidget.serializeForDocument(), self.bone.dataStructure, prefix=["rel"], language=self.language ) self.destWidget["value"] = txt
def unserialize(self, value=None): self.value = value if value: txt = formatString( self.bone.formatString, value["dest"], self.bone.destStructure, prefix=["dest"], language=self.language ) if self.bone.dataStructure and value["rel"]: txt = formatString( txt, value["rel"], self.bone.dataStructure, prefix=["rel"], language=self.language ) else: txt = None self.appendChild(html5.TextNode(txt or conf["emptyValue"]), replace=True)
def unserialize(self, value=None): self.value = value if value: txt = formatString( self.bone.boneStructure["format"], value, self.bone.boneStructure["using"], language=self.language, ) else: txt = None self.replaceChild(html5.TextNode(txt or conf["emptyValue"]))
def updateString(self): if not self.value: if self.dataWidget: self.dataWidget.disable() return txt = formatString( self.bone.formatString, self.value, self.bone.boneStructure, language=self.language, ) self.destWidget["value"] = txt
def unserialize(self, value=None): self.value = value if value: txt = formatString( self.bone.boneStructure["format"], value, self.bone.boneStructure["using"], language=self.language, prefix=[ 'dest' ] #use dest prefix! < rel and record use the same format dest.XXX ) else: txt = None self.replaceChild(html5.TextNode(txt or conf["emptyValue"]))