[jboss-user] [JBoss Seam] - Re: page specific login-required=

codelion do-not-reply at jboss.com
Wed Mar 7 21:03:09 EST 2007


Here is a beginning patch, is this something I should continue or drop?

### Eclipse Workspace Patch 1.0
  | #P jboss-seam
  | Index: src/main/org/jboss/seam/core/Pages.java
  | ===================================================================
  | RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Pages.java,v
  | retrieving revision 1.102
  | diff -u -r1.102 Pages.java
  | --- src/main/org/jboss/seam/core/Pages.java	25 Feb 2007 22:38:21 -0000	1.102
  | +++ src/main/org/jboss/seam/core/Pages.java	8 Mar 2007 02:01:14 -0000
  | @@ -22,6 +22,7 @@
  |  import javax.faces.context.FacesContext;
  |  import javax.servlet.http.HttpServletRequest;
  |  
  | +import org.dom4j.Attribute;
  |  import org.dom4j.DocumentException;
  |  import org.dom4j.Element;
  |  import org.jboss.seam.Component;
  | @@ -860,7 +861,11 @@
  |        
  |        page.setNoConversationViewId( element.attributeValue("no-conversation-view-id") );
  |        page.setConversationRequired( "true".equals( element.attributeValue("conversation-required") ) );
  | -      page.setLoginRequired( "true".equals( element.attributeValue("login-required") ) );
  | +      Attribute loginRequiredAttribute = element.attribute("login-required");
  | +      if (loginRequiredAttribute != null)
  | +      {
  | +         page.setLoginRequired( "true".equals( loginRequiredAttribute.getValue() ) );
  | +      }
  |        page.setScheme( element.attributeValue("scheme") );
  |        
  |        Action action = parseAction(element, "action");
  | Index: src/main/org/jboss/seam/pages/Page.java
  | ===================================================================
  | RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/pages/Page.java,v
  | retrieving revision 1.14
  | diff -u -r1.14 Page.java
  | --- src/main/org/jboss/seam/pages/Page.java	22 Feb 2007 15:12:22 -0000	1.14
  | +++ src/main/org/jboss/seam/pages/Page.java	8 Mar 2007 02:01:14 -0000
  | @@ -16,6 +16,7 @@
  |  public final class Page
  |  {
  |     private final String viewId;
  | +   private final boolean specificViewId;
  |     private String description;
  |     private Integer timeout;
  |     private String noConversationViewId;
  | @@ -28,6 +29,7 @@
  |     private Navigation defaultNavigation;
  |     private boolean conversationRequired;
  |     private boolean loginRequired;
  | +   private boolean loginRequiredExplicitelySet;
  |     private ConversationControl conversationControl = new ConversationControl();
  |     private TaskControl taskControl = new TaskControl();
  |     private ProcessControl processControl = new ProcessControl();
  | @@ -54,11 +56,14 @@
  |        this.viewId = viewId;
  |        if (viewId!=null)
  |        {
  | +         specificViewId = !viewId.endsWith("*");
  |           int loc = viewId.lastIndexOf('.');
  |           if ( loc>0 && viewId.startsWith("/") )
  |           {
  |              this.setResourceBundleName( viewId.substring(1, loc) );
  |           }
  | +      } else {
  | +         specificViewId = false;
  |        }
  |     }
  |     
  | @@ -268,6 +273,7 @@
  |     public void setLoginRequired(boolean loginRequired)
  |     {
  |        this.loginRequired = loginRequired;
  | +      loginRequiredExplicitelySet = true;
  |     }
  |     
  |     public String getScheme()

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026075#4026075

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026075



More information about the jboss-user mailing list