Reply To: Dynaview with cdi expression and method

Splash Forums Rewrite Users Dynaview with cdi expression and method Reply To: Dynaview with cdi expression and method



I need an active JSF lifecycle because the method getViewIdForUrl uses the url to fetch an article entity from the database. The article entity contains the jsf view for the article.

The prettyfaces compatability module (rewrite-config-prettyfaces-2.0.5.jar) can read the dynaview configuration and it works. I don’t know if this module uses pretty rewrite or that it contains the “old” pretty faces code to create the required functionality. It’s a large jar with a lot of classes.

This was my last try to let it work (but it doesn’t work):

    ConfigurationRuleBuilderCustom rule = config.addRule();
    Condition condition = Direction.isInbound().and(Path.matches("/{url}"));

//    ConfigurationRuleBuilderPerform perform = rule.perform(operation);
    El getView = El.retrievalMethod("#{cmsBB.getViewIdForUrl}");
    PhaseAction phaseAction = PhaseAction.retrieveFrom(getView);

    Operation forwardOperation = new HttpOperation() {
      public void performHttp(HttpServletRewrite event, EvaluationContext context) {
        String to;
        to = cmsBB.getDynaView();, context);

    ConfigurationRuleBuilderPerform perform = rule.perform(phaseAction);
    ConfigurationRuleParameterWhere where = perform.where("url");
    PhaseBinding phaseBinding ="cmsBB.url"));
    Binding binding = phaseBinding;

To better understand all classes I created local variables for a lot of objects, but when everything works I will use the short syntax with method chaining.