how to call method after injection complete?

10 views
Skip to first unread message

santiago

unread,
Apr 27, 2014, 1:48:37 AM4/27/14
to gran...@googlegroups.com
Hi Guys, Is there any event was dispatched while injection complete just like Parsley? since I encounter an issue of null pointer while I try to use a instance(which is injected) just after flex UIComponent's creationComplete event.

Vitaliy Parfenov

unread,
Apr 29, 2014, 4:24:36 AM4/29/14
to gran...@googlegroups.com
Yes, you need to use [PostConstruct] metadata on your method. [PostConstruct] is called after all injections and internal initializations have been done so it can been used to do some custom initialization of a component instance.

   
[PostConstruct]
public function init():void {
   
// ...
}



воскресенье, 27 апреля 2014 г., 11:48:37 UTC+6 пользователь santiago написал:

santiago wong

unread,
May 2, 2014, 3:43:00 AM5/2/14
to gran...@googlegroups.com
thank you very much, it did help.


--

---
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Granite Data Services Forum".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse graniteds+...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages