How to properly wire variable?

asked 2014-03-24 09:23:32 +0800

demizon gravatar image demizon
169 1 6


I got following problem...lets say i have viewmodel class MyVM defined like this:

public class MyVM{

    private ModulsManager modulsManager;

getAll() {modulsList = modulsManager.getAll();

addHlayout() {MyHlayout myHlayout = new MyHlayout();

MyHlayout class:

public class MyHlayout extends Hlayout {

    private ModulsManager modulsManager;
MyHlayout() {        


When I use modulsManager in viewmodel everything works well. But when I use it on MyHlayout class I am getting null pointer exception error. Anyone can help me how to fix this?


delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-03-24 09:23:32 +0800

Seen: 36 times

Last updated: Mar 24 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More