Reply To: Injection not working in postbacks (with two named parameters)

Splash Forums PrettyFaces Users Injection not working in postbacks (with two named parameters) Reply To: Injection not working in postbacks (with two named parameters)

#24055

Okay, Christian and I were able to find the root of the problem. It looks like you are attempting to use the OmniFaces “Extensionless URLs” feature, which appears to completely break PrettyFaces. They do not actually do this correctly, which will in fact also break things like the CDI conversation scope and the JSF2.2 WindowScope.

I would remove the following configuration from your web.xml, and use PrettyFaces for this instead:

	<context-param>
		<param-name>org.omnifaces.FACES_VIEWS_SCAN_PATHS</param-name>
		<param-value>/*.xhtml</param-value>
	</context-param>

You can do the same thing in rewrite/prettyfaces using a rule like this (from the rewrite examples – http://ocpsoft.org/rewrite/examples/#section-2):

public class ExampleConfigurationProvider extends HttpConfigurationProvider
{
   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      return ConfigurationBuilder.begin()
          .addRule(Join.path("/{page}").to("/{page}.xhtml"))
          .where("page").matches("\\w+"); // customize this matches pattern for your needs
   }
}