[seam-issues] [JBoss JIRA] (SEAMFACES-244) ViewConfig ViewPattern "closest match" does not work

Andries Ehlers (JIRA) jira-events at lists.jboss.org
Tue Apr 3 09:10:48 EDT 2012


Andries Ehlers created SEAMFACES-244:
----------------------------------------

             Summary: ViewConfig ViewPattern "closest match" does not work
                 Key: SEAMFACES-244
                 URL: https://issues.jboss.org/browse/SEAMFACES-244
             Project: Seam Faces
          Issue Type: Bug
          Components: View Configuration
    Affects Versions: 3.1.0.Final
         Environment: Kubuntu, JBoss 7.1.0.Final
            Reporter: Andries Ehlers


I have a scenario where I want all pages in a /secured/home/ folder to be visible when a user is logged in.
All other pages under /secured/* can only be visible if the user is also active.  I thus have the following ViewConfig

{code:title=MyViewConfig.java|borderStyle=solid}
@ViewConfig
public interface Pages {
    static enum Pages1 {
        @ViewPattern("/pages/secured/home/*")
        @LoginView("/pages/public/login.xhtml?faces-redirect=true")
        @AccessDeniedView("/pages/public/login.xhtml?faces-redirect=true")
        @FacesRedirect
        @LoggedIn
        HOME_PAGE,

	@ViewPattern("/pages/secured/*")
        @LoginView("/pages/public/login.xhtml?faces-redirect=true")
        @AccessDeniedView("/pages/public/login.xhtml?faces-redirect=true")
        @FacesRedirect
	@ActiveUser
        @LoggedIn
        ACTIVE_USER_PAGES;
  }
}
{code}

Based on the Seam Faces documentation: {quote}If conflicting annotations are found, the annotation paired with the most specific matching view pattern takes precedence.{quote} as seen here: [http://docs.jboss.org/seam/3/faces/latest/reference/en-US/html/viewconfig.html#viewconfig.enum].

This does not seem to work, because even though I specified a more specific path for all pages under /secured/home, the @ActiveUser annotation is still called (ie the ACTIVE_USER_PAGES ViewPattern is used), resulting in an AccessDenied redirection even though it should have just displayed the page in /secured/home.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list