Re: DynaView Error & Loop

Splash Forums PrettyFaces Users DynaView Error & Loop Re: DynaView Error & Loop



Ah, thanks Lincoln! This is starting to make a lot more sense now. :-)

Looking back at your earlier comment:

This would be an issue possibly because ADF may be invoking itself first (and crashing), which does not give prettyfaces a chance to do its work properly and send the proper request back to ADF.

Yep, nailed it.

At the point in time where we hit the ADF ControllerException, PrettyFaces has yet to do this:


— Invoke #{bean.getPath} and Calculate new ViewID

— FORWARD to new ViewID “/faces/pages/community.jspx”

Which explains why clemmonsm’s attempt to insert the controller state token:

//return “/faces/pages/neighborhood.jspx?_adf.ctrl-state=” + request.getParameterValues(“_adf.ctrl-state”)[0];

Was unsuccessful.

The deal is that at the point of the failure, we are not processing the dynamic view id (has yet to be calculated). Instead, ADF sees the special PrettyFaces dynamic view id (“/com.ocpsoft.DynaView.jsf”), which of course does not contain the _adf.ctrl-state query parameter that ADF requires.

One thing (ie. hack) that might be interesting to play around with would be to see what happens if we reverse the order of the PrettyFaces and ADF phase listeners. Note: I am not suggesting that this is a proper fix/workaround or that it will even have any real impact. My guess: we’ll still hit the same exception after the forward returns, though possible that results will be more interesting. Just thinking it might be an worthwhile data point to collect.


How do you feel about hacking your test case? :-)

Since you are on JSF 1.2, ordering of faces-config.xml loading is determined by jar file names. Temporarily munging the PrettyFaces jar file name to something like “aaprettyfaces.jar” should force the PrettyFaces phase listener to be registered/called before any of the ADF phase listeners.

This may just cause other unrelated ordering problems to arise, but might be worth exploring.

If you do decide to test this out, don’t forget that you might need to uncomment your code that tacks on the _adf.ctrl-state query parameter. (Though it is possible that your PrettyFacesAdfProcessor will cover this case for you.)

And, yeah, again, not a fix – just a debugging tool to gather more info.

Regarding getting a proper fix from ADF, assuming we are unable to identify some workaround: I suspect that is going to require interaction with Oracle Support. Don’t suppose you have access?