0

weeks ago we are migrating our project from JSF 1.2 to JSF 2.0 and we are already comparing MyFaces and Mojarra implementations.

I've almost done a prototype on Mojarra 2.1.7 and it works quite well, but when trying to make it work with MyFaces impl (2.1.6) it doesn't (pom modified to not mix Mojarra and MF implementations).

The fact is that when I make an ajax request it rerenders the view, but when I try to make another action with request (ajax, navigation) it does nothing.

In FireBugs, after the second action it throws this error:

<partial-response>
   <error>
      <error-name>java.lang.IllegalStateException</error-name>
      <error-message><![CDATA[java.lang.NullPointerException: state]]></error-message>
      </error>
</partial-response>

My beans are ViewScoped and I'm using Primefaces components(if it helps...), so I don't know why is the state null after first ajax request. Anyone knows the solution?

Thanks, Carlos

Cal30
  • 1
  • After doing some modifications and research, I found that Partial State Saving doesn't work well with ViewScoped beans. It's explained here http://stackoverflow.com/questions/10337015/should-partial-state-saving-be-set-to-false – Cal30 Nov 08 '13 at 10:50
  • Those problems will only manifest when you use `binding` attribute on a view scoped bean property. At their own, as long as you don't use `binding`, partial state saving and view scoped beans work perfectly. – BalusC Nov 08 '13 at 11:18
  • Please note in MyFaces the latest version is considered the best version so far. My advice: use the latest MyFaces jars (2.1.13 or 2.2.0-beta). – lu4242 Nov 08 '13 at 17:16

0 Answers0