Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting null from FacesContext.getCurrentInstance().getPartialViewContext() while making mock object  RSS feed

Rahul max
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to JSF, I am getting a NullPointerException when I am trying to call FacesContext.getCurrentInstance().getPartialViewContext() from my code.
I am working on testing some module built on jsf, so I build a mock object of FacesContext using myfaces.
My code looks like-

facesContext=new MockFacesContext20();

Please help me with some example...!
Is there a way to initialize a mock FacesContext object with custom PartialViewContext??
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!