views:

22

answers:

2

In a seam-gen generated application I added the login-required attribute, to force a user login. After that the CSS-Styles from richfaces aren't loaded neither in the login page itself nor at the other pages after successful authentication. (The application is unusable)

<page view-id="*" login-required="true">    
    <navigation>
    <rule if-outcome="home">
       <redirect view-id="/home.xhtml" />
    </rule>
   </navigation>
</page>

I returned to the standard settings in components.xml after I faced this issue.

   <drools:rule-base name="securityRules">
      <drools:rule-files>
         <value>/security.drl</value>
      </drools:rule-files>
   </drools:rule-base>

   <security:rule-based-permission-resolver security-rules="#{securityRules}"/>
   <security:identity authenticate-method="#{authenticator.authenticate}" />

Seam Version 2.1.2

Any Ideas what I could do to get the Styles back or an alternative to force the user to login on all pages? Thanks

A: 

Your CSS files require login too. Can you add them as exceptions to your current rule that all files require login?

Alternatively you can just protect all html files.

Thorbjørn Ravn Andersen
Thanks for your repsponse. I know this behaviour, but why aren't the styles delivered after successful authentication?
stacker
Tried forcing the browser to reload completely after logging in?
Thorbjørn Ravn Andersen
+1  A: 

Seam in Action book says

The same page cannot be configured in both the global page descriptor and the fine-grained descriptor. In fact, there can be only be a single page configuration per view ID.

So i think it occurs because some page shares more than one configuration.

Arthur Ronald F D Garcia
Thanks for your response, I found that section in the book. Does it mean SomePage.page.xml has a conflict with settings in WEB-INF/pages.xml ?
stacker
@stacker May have. You can create a single Test case by using SeamTest with two settings (one global and the other one local) where both conflit view-id
Arthur Ronald F D Garcia