{"action":"created","issue":{"url":"https://api.github.com/repos/framework-one/fw1/issues/327","labels_url":"https://api.github.com/repos/framework-one/fw1/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/framework-one/fw1/issues/327/comments","events_url":"https://api.github.com/repos/framework-one/fw1/issues/327/events","html_url":"https://github.com/framework-one/fw1/issues/327","id":74378504,"number":327,"title":"FW1 3.0 issue with injected properties in beans not present when called using DI/1","user":{"login":"sneiland","id":632619,"avatar_url":"https://avatars.githubusercontent.com/u/632619?v=3","gravatar_id":"","url":"https://api.github.com/users/sneiland","html_url":"https://github.com/sneiland","followers_url":"https://api.github.com/users/sneiland/followers","following_url":"https://api.github.com/users/sneiland/following{/other_user}","gists_url":"https://api.github.com/users/sneiland/gists{/gist_id}","starred_url":"https://api.github.com/users/sneiland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sneiland/subscriptions","organizations_url":"https://api.github.com/users/sneiland/orgs","repos_url":"https://api.github.com/users/sneiland/repos","events_url":"https://api.github.com/users/sneiland/events{/privacy}","received_events_url":"https://api.github.com/users/sneiland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-08T14:20:00Z","updated_at":"2015-05-08T21:24:59Z","closed_at":null,"body":"In setupApplication() we use the injectProperties method of the bean factory to set some config variables based off logic we only want to be run once on app start, as opposed to using variables.framework.diConfig.\r\n```\r\ngetBeanFactory().injectProperties(\"someService\", getSomeConfigAtStartup() );\r\n```\r\nIn the controller that calls the service if we try to use the di/1 method for referencing the service like this the injected properties are not set.\r\n\r\n```\r\ncomponent accessors=\"true\" {\r\n\tproperty someService;\r\n\r\n\tfunction init (fw) {\r\n\t\tvariables.fw = arguments.fw;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tfunction default(rc){\r\n\t\trc.test = variables.someService.someMethod();\r\n\t}\r\n}\r\n```\r\n\r\nHowever if we use getDefaultBeanFactory() to get the service bean then they are set.\r\n\r\n```\r\ncomponent accessors=\"true\" {\r\n\r\n\tfunction init (fw) {\r\n\t\tvariables.fw = arguments.fw;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tfunction default(rc){\r\n\t\trc.test = variables.fw.getDefaultBeanFactory().getBean(\"someService\").someMethod();\r\n\t}\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/framework-one/fw1/issues/comments/100372783","html_url":"https://github.com/framework-one/fw1/issues/327#issuecomment-100372783","issue_url":"https://api.github.com/repos/framework-one/fw1/issues/327","id":100372783,"user":{"login":"cfGothChic","id":277699,"avatar_url":"https://avatars.githubusercontent.com/u/277699?v=3","gravatar_id":"","url":"https://api.github.com/users/cfGothChic","html_url":"https://github.com/cfGothChic","followers_url":"https://api.github.com/users/cfGothChic/followers","following_url":"https://api.github.com/users/cfGothChic/following{/other_user}","gists_url":"https://api.github.com/users/cfGothChic/gists{/gist_id}","starred_url":"https://api.github.com/users/cfGothChic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfGothChic/subscriptions","organizations_url":"https://api.github.com/users/cfGothChic/orgs","repos_url":"https://api.github.com/users/cfGothChic/repos","events_url":"https://api.github.com/users/cfGothChic/events{/privacy}","received_events_url":"https://api.github.com/users/cfGothChic/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T21:24:59Z","updated_at":"2015-05-08T21:24:59Z","body":"Yes, it's during the automatic invocation of the error action."}}