1 the DB type is set with the valueType in the manifest:
valueType: "JSON"
It can be either "INT", "DATETIME", "STRING" "TEXT" and "JSON"
string is stored as nvarchar, text is stored as ntext, json is also stored as ntext, but atomatically serialized to a dynamic object
2 you use a tree-picker instead, as the media picker is focused on providing a simple ui for selecting images, uploading and creating folders, we cant reliably support custom media types for this UI, so a standard treepicker is recommended instead, its availble as dialogService.treePicker(options)
Documentation is a bit off. Some times it says that hideLabel is part of the propertyEditor and other times as part of the editor element. What is the right thing? :)
Ran into this problem too, could the documentation at http://umbraco.github.io/Belle/#/tutorials/CreatingAPropertyEditor be updated to include the valueType: "JSON" property? Is there a repo for the github.io site I can contribute the change to? I couldn't find it after a quick glance through the repos on github.
Could it be the documentation is wrong. When i use JSON as the dataType, it is stored as NVARCHAR(500) and not NTEXT. Are others seeing this issue as well.
I had to delete the datatype in the backoffice and create it again after adding valueType: "JSON" to the manifest, the datatype record in the database doesn't get updated on manifest changes.
@Joshua, I also experience that problem. So if I want to save a JSON-value larger than 500 chars, I get an System.Data.SqlClient.SqlException: "String or binary data would be truncated".
I tried to change the valueType to STRING and TEXT, but no difference. All values are saved in [dataNvarchar]-column. I also recreated both the property and the datatype after this value was changed in manifest
I'm experiencing this problem on an Umbraco 7.2.1 installation with one custom property editor still, with a valueType of JSON. I'm triple-checking my code at this point to find any inconsistencies between it and other property editors, though, just in case it's a bug in the code.
Creating a property editor in Umbraco 7
Since this is the first time I'm working with Umbraco 7, I have a few questions about property editors. (Using the latest nightly 7.0.0 build 158)
Comment author was deleted
Have you seen Per's latest demo, think it covers some of your questions
https://github.com/perploug/UkFest-AngularJS-Demo/blob/master/App_Plugins/People/package.manifest
1 the DB type is set with the valueType in the manifest:
valueType: "JSON"
It can be either "INT", "DATETIME", "STRING" "TEXT" and "JSON"
string is stored as nvarchar, text is stored as ntext, json is also stored as ntext, but atomatically serialized to a dynamic object
2 you use a tree-picker instead, as the media picker is focused on providing a simple ui for selecting images, uploading and creating folders, we cant reliably support custom media types for this UI, so a standard treepicker is recommended instead, its availble as dialogService.treePicker(options)
http://umbraco.github.io/Belle/#/api/umbraco.services.dialogService
3 that should work, investigating why it doesnt currently
Oh man have I long been looking for what a valueType can contain :O
Right, so this should be the right syntax, will get a full overview up of the manifest today:
Thanks Per, it works!
I'll look into using tree-picker
And a but more background info here:
http://umbraco.github.io/Belle/#/tutorials/manifest
Documentation is a bit off. Some times it says that hideLabel is part of the propertyEditor and other times as part of the editor element. What is the right thing? :)
Comment author was deleted
would say editor :)
Comment author was deleted
@anders where is it mentoined otherwise?
In the sample manifest here: http://umbraco.github.io/Belle/#/tutorials/manifest
}
Ran into this problem too, could the documentation at http://umbraco.github.io/Belle/#/tutorials/CreatingAPropertyEditor be updated to include the valueType: "JSON" property? Is there a repo for the github.io site I can contribute the change to? I couldn't find it after a quick glance through the repos on github.
edit: valueType, not viewType
Could it be the documentation is wrong. When i use JSON as the dataType, it is stored as NVARCHAR(500) and not NTEXT. Are others seeing this issue as well.
I had to delete the datatype in the backoffice and create it again after adding valueType: "JSON" to the manifest, the datatype record in the database doesn't get updated on manifest changes.
edit: valueType, not viewType.
@Joshua, I also experience that problem. So if I want to save a JSON-value larger than 500 chars, I get an System.Data.SqlClient.SqlException: "String or binary data would be truncated".
I tried to change the valueType to STRING and TEXT, but no difference. All values are saved in [dataNvarchar]-column. I also recreated both the property and the datatype after this value was changed in manifest
I'm getting the same error now, because of a long json string. Have any of you fixed it?
figured out that my package.manifest file was flawed. This tag "valueType: "JSON"" should be inside the editor-tag.
I am also experiencing this with valueType JSON, where I need more than 500 characters. Any fix or workaround that can be recommended?
Hi Kyle,
modify the dataNvarchar column to be nvarchar(MAX) in database. I think this would help you.
It's an issue before Version 7.2.0:
http://issues.umbraco.org/issue/U4-5063
Best regards
Sören
Soren,
I'm experiencing this problem on an Umbraco 7.2.1 installation with one custom property editor still, with a valueType of JSON. I'm triple-checking my code at this point to find any inconsistencies between it and other property editors, though, just in case it's a bug in the code.
Ok, nevermind. There was a very obvious and embarassing bug on my end that I somehow overlooked in my package manifest. >_>;
All's well.
Hi Guys
I have same issue. I tried above steps. It doesn't work.
So, I changed cmsDataType Table column value of my custom datatype from Nvarchar to Ntext. Its working fine.
Thanks
is working on a reply...