Anonymous
My feedback
-
932 votes
To accelerate the development of this particular feature we are seeking user support through crowdfunding.
Want to learn more? Send us an email at breezeadmin@ideablade.com and we’ll send you details on how you can participate.
Thanks for helping us make BreezeJS the best open source project on the planet!
Anonymous supported this idea ·
-
341 votes
Anonymous supported this idea ·
-
124 votes
An error occurred while saving the comment Anonymous supported this idea ·
-
7 votes
Anonymous supported this idea ·
As a workaround in the meantime, you could create global "enums" from your metadata like this:
manager.fetchMetadata()
.then(function (data) {
// extract all enums als global objects
ko.utils.arrayForEach(data.schema.enumType, function (c) {
window[c.name] = {};
ko.utils.arrayForEach(c.member, function (m) {
window[c.name][m.name] = m.value;
});
});
});
So if you had an enum called "Status", you would now have a global object that you can call:
var currentStatus = Status.Done; //returns the value as defined in the server side enum