Re: Does prettyfaces 3.3.0 support EL2 method params for the action?

Splash Forums PrettyFaces Users Does prettyfaces 3.3.0 support EL2 method params for the action? Re: Does prettyfaces 3.3.0 support EL2 method params for the action?

#21430

This is not currently supported in PrettyFaces 3.x. It is already possible in PrettyFaces 4.x with a little more configuration if you are using CDI (http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html) – but it does not look like you are?)

Install 4.0.0-SNAPSHOT:

https://github.com/ocpsoft/prettyfaces/wiki/Snapshots (use version 4.0.0-SNAPSHOT)

You will also need to add a Rewrite extensions for CDI and Faces:

<dependency>
<groupId>com.ocpsoft.rewrite</groupId>
<artifactId>rewrite-integration-cdi</artifactId>
<version>1.0.0.Alpha4</version>
</dependency>
<dependency>
<groupId>com.ocpsoft.rewrite</groupId>
<artifactId>rewrite-integration-faces</artifactId>
<version>1.0.0.Alpha4</version>
</dependency>

Then you need to implement a custom Rewrite provider: (PrettyFaces 4.0.0 is based on Rewrite, which is included automatically if you are using Maven – you just need to add the extensions above)

Perform steps 3 and 4 here:

http://ocpsoft.com/rewrite/

Then you need to add your custom rule:

.addRule(Join.path("/item/").to("/item/edit.jsf")
.perform(PhaseAction.retrieveFrom(
El.retrievalMethod("#{itemController.editAction(item)}"))));

I hope this helps, sorry we don’t support it in 3.x :) can only go so fast.

~Lincoln