vi.widgets.edit
Module Contents
Classes
Functions
|
Converts a flat dictionary containing dotted properties into a multi-dimensional one. |
- vi.widgets.edit.parseHashParameters(src, prefix='')
Converts a flat dictionary containing dotted properties into a multi-dimensional one.
- Example:
{ “a”:”a”, “b.a”:”ba”,”b.b”:”bb” } -> { “a”:”a”, “b”:{“a”:”ba”,”b”:”bb”} }
- If a dictionary contains only numeric indexes, it will be converted to a list:
{ “a.0.a”:”a0a”, “a.0.b”:”a0b”,a.1.a”:”a1a” } -> { “a”:[{“a”:”a0a”,”b”:”a0b”},{“a”:”a1a”}] }
- class vi.widgets.edit.EditWidget(module, applicationType, key=0, node=None, skelType=None, clone=False, hashArgs=None, context=None, logAction='Entry saved!', skel=None, *args, **kwargs)
Bases:
flare.html5.Div
- appList = 'list'
- appHierarchy = 'hierarchy'
- appTree = 'tree'
- appSingleton = 'singleton'
- __editIdx_ = 0
- onDetach()
- onAttach()
- onChange(event)
- onBoneChange(bone)
- showErrorMsg(req=None, code=None)
Removes all currently visible elements and displays an error message
- reloadData()
- _save(data)
Creates the actual NetworkService request used to transmit our data. If data is None, it fetches a clean add/edit form.
- Parameters:
data (dict or None) – The values to transmit or None to fetch a new, clean add/edit form.
- clear()
Removes all visible bones/forms/fieldsets.
- closeOrContinue(sender=None)
- doCloneHierarchy(sender=None)
- cloneComplete(req)
- setData(request=None, data=None, askHierarchyCloning=True)
Rebuilds the UI according to the skeleton received from server
- Parameters:
request (NetworkService) – A finished NetworkService request
data (dict) – The data received
- doSave(closeOnSuccess=False, *args, **kwargs)
Starts serializing and transmitting values to the server.