{"action":"created","issue":{"url":"https://api.github.com/repos/ermouth/jQuery.my/issues/15","labels_url":"https://api.github.com/repos/ermouth/jQuery.my/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/ermouth/jQuery.my/issues/15/comments","events_url":"https://api.github.com/repos/ermouth/jQuery.my/issues/15/events","html_url":"https://github.com/ermouth/jQuery.my/issues/15","id":111562053,"number":15,"title":"Dynamically assign ui in JSON stored manifest?","user":{"login":"tmikaeld","id":907195,"avatar_url":"https://avatars.githubusercontent.com/u/907195?v=3","gravatar_id":"","url":"https://api.github.com/users/tmikaeld","html_url":"https://github.com/tmikaeld","followers_url":"https://api.github.com/users/tmikaeld/followers","following_url":"https://api.github.com/users/tmikaeld/following{/other_user}","gists_url":"https://api.github.com/users/tmikaeld/gists{/gist_id}","starred_url":"https://api.github.com/users/tmikaeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmikaeld/subscriptions","organizations_url":"https://api.github.com/users/tmikaeld/orgs","repos_url":"https://api.github.com/users/tmikaeld/repos","events_url":"https://api.github.com/users/tmikaeld/events{/privacy}","received_events_url":"https://api.github.com/users/tmikaeld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-15T07:45:27Z","updated_at":"2015-10-15T09:08:43Z","closed_at":null,"body":"I've been trying to solve this, but I'm all out of ideas.\r\n\r\nI'm trying to dynamically assign selectors for the form since these are rendered by the server.\r\n\r\n````\r\n    \"ui\":{\r\n    \t\"#Text1\": { bind: \"Text1\" },\r\n    \t\"#Setting6\": { bind: \"Setting6\" },\r\n        \"#Setting7\": { bind: \"Setting7\" }\r\n    }\r\n````\r\nSo this is the target selectors, but i cannot use code here afaik to get the attribute data from the selector dynamically.\r\n\r\nThe selector where get the data from looks like this:\r\n\r\n````\r\n<div class=\"editable header\" data-fieldname=\"Text1\" data-fieldtype=\"header\" data-setting2=\"Setting7\" data-setting1=\"Setting6\"></div>\r\n````\r\n\r\nThe only \"solution\" i've come up with is to extend manifest after the JSON have been loaded form store, but that ruins the portability of the manifest.\r\n\r\n````\r\nmanifest.ui = { }\r\nmanifest.ui[\"#\"+$('.editable.header').data('fieldname')] = {bind: $('.editable.header').data('fieldname')}\r\nmanifest.ui[\"#\"+$('.editable.header').data(\"setting1\")] = {bind: $('.editable.header').data(\"setting1\")}\r\nmanifest.ui[\"#\"+$('.editable.header').data(\"setting2\")] = {bind: $('.editable.header').data(\"setting2\")}\r\n````\r\n\r\nAny other ways to retrieve it dynamically directly in the manifest?"},"comment":{"url":"https://api.github.com/repos/ermouth/jQuery.my/issues/comments/148325258","html_url":"https://github.com/ermouth/jQuery.my/issues/15#issuecomment-148325258","issue_url":"https://api.github.com/repos/ermouth/jQuery.my/issues/15","id":148325258,"user":{"login":"ermouth","id":1540047,"avatar_url":"https://avatars.githubusercontent.com/u/1540047?v=3","gravatar_id":"","url":"https://api.github.com/users/ermouth","html_url":"https://github.com/ermouth","followers_url":"https://api.github.com/users/ermouth/followers","following_url":"https://api.github.com/users/ermouth/following{/other_user}","gists_url":"https://api.github.com/users/ermouth/gists{/gist_id}","starred_url":"https://api.github.com/users/ermouth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ermouth/subscriptions","organizations_url":"https://api.github.com/users/ermouth/orgs","repos_url":"https://api.github.com/users/ermouth/repos","events_url":"https://api.github.com/users/ermouth/events{/privacy}","received_events_url":"https://api.github.com/users/ermouth/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T09:08:43Z","updated_at":"2015-10-15T09:08:43Z","body":"Oh, to add. You can set params:{strict:true} for child manifest you generate using init, to skip unjson traverser. It can give you millisecond or two during child form initialization."}}