Reply To: @Paramter and null-values

Splash Forums Rewrite Users @Parameter and null-values Reply To: @Paramter and null-values


If you want host:port/customerapplication/customer to work, you need a rule for that 🙂 since host:port/customerapplication/customer/X has an extra required segment according to your join rule.

You need both of these for what you want:

@Join(path = "/customer", to = "/jsf/customer.xhtml")
@Join(path = "/customer/{customerId}", to = "/jsf/customer.xhtml")

I don’t believe we have an aggregate @Joins annotation, but you could use this one until the next release (I think we should add it.)

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.ocpsoft.rewrite.annotation.Join;

public @interface Joins
   Join[] value();

Then just do this on your class:

  @Join(path = "/customer", to = "/jsf/customer.xhtml"),
  @Join(path = "/customer/{customerId}", to = "/jsf/customer.xhtml")

Let me know if this works for you. (Otherwise you’ll need two classes, one for each Join annotation.