test inject in view

19 views
Skip to first unread message

matiasxx

unread,
Jun 3, 2013, 11:10:14 AM6/3/13
to swiz-fr...@googlegroups.com
Hi all,

I'm using swiz 1.4, great framework but i have a problem with an Injection.
I have declare in my Bean <modelo:RedTapeModel id="redTapeModel"> and i Inject this in my main view. I verify that is injected because i use [PostContruct] and lunch a method that showme some Alert that works fine.

I want to use <modelo:RedTapeModel id="redTapeModel"> in my login view because it has a login(username, password) method, so i inject this using:
[Inject(source="redTapeModel")]
public var modelo:RedTapeModel;

When i try to use "modelo" in mi Login view to use login(username, password), "modelo" is null.
My question is why starts ok and when i try to use it again is null or how can i test in my view if the inject is ok

Thanks in advance


matiasxx

unread,
Jun 3, 2013, 1:15:04 PM6/3/13
to swiz-fr...@googlegroups.com
I made it work.

My problem was a typing one.
Inside tag <swiz:SwizConfig viewPackage="sistema.view*">  i forgot a dot after view (right way "sistema.view.*) !!!
One week for this...


Regards,
Reply all
Reply to author
Forward
0 new messages