Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using UI-O-Matic and I would like to save json in one of my custom table properties. I created a Custom Property View:
<ul ui-sortable="sortableOptions" ng-model="property.value" class="textstring-row-set"> <li ng-repeat="command in property.value" class="textstring-row-field"> <input class="umbEditorTextField" type="text" ng-model="command.key" /> <input class="umbEditorTextField" type="text" ng-model="command.value" /> <input class="umbEditorTextField" type="text" ng-model="command.description" /> <i class="icon icon-add" ng-click="addListItem($index)"></i> <i class="icon icon-delete" ng-click="removeListItem($index)"></i> <i class="icon icon-navigation handle"></i> </li> </ul>
And in my controller, I want $scope.property.value to be this json format:
'[{ "key": "command one", "value": "value one", "description": "description one" }]'
The view works fine, but when I try to save the page on create, I get an 'Unexpected character encountered' from Newtonsoft.Json.JsonTextReader.
Is this not the correct way to store JSON in my property with UI-O-Matic? Or do I need to extend it to take JSON as a property value?
ok I think found my problem. After searching the field editor views in UIOMATIC, I found $scope.valuesloaded, which I must call to make sure $scope.property.value has been populated when I try to use it!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Using JSON BLOB in string property
I'm using UI-O-Matic and I would like to save json in one of my custom table properties. I created a Custom Property View:
And in my controller, I want $scope.property.value to be this json format:
The view works fine, but when I try to save the page on create, I get an 'Unexpected character encountered' from Newtonsoft.Json.JsonTextReader.
Is this not the correct way to store JSON in my property with UI-O-Matic? Or do I need to extend it to take JSON as a property value?
ok I think found my problem. After searching the field editor views in UIOMATIC, I found $scope.valuesloaded, which I must call to make sure $scope.property.value has been populated when I try to use it!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.