0

How can I get id of urlMapping when using pretty faces through the Seam3 @ViewConfig interface?

In pretty-config.xml id is specified on url-mapping element.

<url-mapping id="foo">
   <pattern value="/page/foo/">
   <view-id value="..." /> 
</url-mapping>

With @URLMapping annotation provided by Pretty Faces i can use id attribute.

@URLMapping(id = "foo", pattern = "/page/foo", viewId = "...")
public class FooBean {
    // some code here
}

But @UrlMapping annotation provided by Seam faces doesn't have any id attribute so I wonder what will be id of this mapping.

@ViewConfig
public interface PagesConfig {
   static enum Pages {
        @ViewPattern("...")
        @UrlMapping(pattern = "/page/foo")
        FOO,
    }

    static enum AnotherPages {
        @ViewPattern("...")
        @UrlMapping(pattern = "/page/foo2")
        FOO,
    }
}
pseudo
  • 836
  • 1
  • 11
  • 20
  • Well I figured out that Seam probably sets mapping id based on @ViewPattern. This behaviour is really unpleasant because it makes mapping id dependent on file location. Is there a way to specify it myself? – pseudo Jun 11 '12 at 22:06
  • 2
    I think you report this as an issue in JIRA - https://jira.jboss.org/jira/browse/SEAMFACES - I don't think it is a supported feature. – Lincoln Jun 14 '12 at 14:16

0 Answers0