[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action ...

Christian Bauer christian at hibernate.org
Thu Jun 21 07:05:49 EDT 2007


  User: cbauer  
  Date: 07/06/21 07:05:49

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/core/action    
                        NodeBrowser.java DocumentHome.java
                        WikiIdentity.java CommentHome.java
  Log:
  Make it deploy and run on latest Seam CVS, still some bugs
  
  Revision  Changes    Path
  1.16      +5 -3      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeBrowser.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeBrowser.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeBrowser.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- NodeBrowser.java	12 Jun 2007 13:04:04 -0000	1.15
  +++ NodeBrowser.java	21 Jun 2007 11:05:49 -0000	1.16
  @@ -3,6 +3,8 @@
   import org.jboss.seam.annotations.*;
   import org.jboss.seam.ScopeType;
   import org.jboss.seam.Component;
  +import org.jboss.seam.faces.FacesMessages;
  +import org.jboss.seam.faces.FacesManager;
   import org.jboss.seam.log.Log;
   import org.jboss.seam.contexts.Contexts;
   import org.jboss.seam.core.*;
  @@ -58,7 +60,7 @@
       public void setNodeId(Long nodeId) { this.nodeId = nodeId; }
   
       @In
  -    protected org.jboss.seam.core.Redirect redirect;
  +    protected org.jboss.seam.faces.Redirect redirect;
   
       @In
       protected NodeDAO nodeDAO;
  @@ -140,13 +142,13 @@
                       FacesMessages messages = (FacesMessages)Component.getInstance("facesMessages");
   
                       log.debug("switching to entry-point conversation");
  -                    entryPoint.switchConversation();
  +                    FacesManager.instance().switchConversation(entryPoint.getId());
   
                       log.debug("propagating faces messages from the ended conversation into the destination conversation");
                       Contexts.getConversationContext().set("org.jboss.seam.core.facesMessages", messages);
                   } else {
                       log.debug("the entry-point of this conversation is gone, redirecting to wiki start page");
  -                    Manager.instance().redirect("/display.xhtml", new HashMap<String,Object>(), true);
  +                    FacesManager.instance().redirect("/display.xhtml", new HashMap<String,Object>(), true);
                   }
               } else {
                   log.debug("entry-point of this conversation has been a non-conversational page we remembered");
  
  
  
  1.16      +11 -0     jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DocumentHome.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- DocumentHome.java	27 Apr 2007 10:34:08 -0000	1.15
  +++ DocumentHome.java	21 Jun 2007 11:05:49 -0000	1.16
  @@ -10,6 +10,9 @@
   import org.jboss.seam.ScopeType;
   import org.jboss.seam.contexts.Contexts;
   
  +import java.util.List;
  +import java.util.ArrayList;
  +
   @Name("documentHome")
   @Scope(ScopeType.CONVERSATION)
   public class DocumentHome extends NodeHome<Document> {
  @@ -162,4 +165,12 @@
           Boolean showPluginPrefs = (Boolean)Contexts.getConversationContext().get("showPluginPreferences");
           return showPluginPrefs != null ? showPluginPrefs : false;
       }
  +
  +    public List<String> autoCompleteLink(Object incompleteLink) {
  +        System.out.printf("################# COMPLETE THIS: " + incompleteLink);
  +        return new ArrayList<String>() {{
  +            add("Foo");
  +            add("Bar");
  +        }};
  +    }
   }
  
  
  
  1.8       +2 -2      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiIdentity.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: WikiIdentity.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiIdentity.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- WikiIdentity.java	21 Apr 2007 08:34:36 -0000	1.7
  +++ WikiIdentity.java	21 Jun 2007 11:05:49 -0000	1.8
  @@ -1,11 +1,11 @@
   package org.jboss.seam.wiki.core.action;
   
  -import static org.jboss.seam.InterceptionType.NEVER;
   import static org.jboss.seam.ScopeType.SESSION;
   import static org.jboss.seam.annotations.Install.APPLICATION;
   
   import org.jboss.seam.security.Identity;
   import org.jboss.seam.annotations.*;
  +import org.jboss.seam.annotations.intercept.BypassInterceptors;
   import org.jboss.seam.wiki.core.model.User;
   import org.jboss.seam.wiki.core.model.Directory;
   import org.jboss.seam.wiki.core.model.Node;
  @@ -19,7 +19,7 @@
    */
   @Name("org.jboss.seam.security.identity")
   @Scope(SESSION)
  - at Intercept(NEVER)
  + at BypassInterceptors
   @Install(precedence=APPLICATION)
   @Startup
   public class WikiIdentity extends Identity {
  
  
  
  1.6       +1 -1      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CommentHome.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- CommentHome.java	20 Jun 2007 01:30:36 -0000	1.5
  +++ CommentHome.java	21 Jun 2007 11:05:49 -0000	1.6
  @@ -88,7 +88,7 @@
           comment.setDocument(entityManager.merge(currentDocument));
   
           // Null out the property so that the @Email validator doesn't fall over it...
  -        // I hate JSF and it's "let's set an empty string" behavior
  +        // I hate JSF and its "let's set an empty string" behavior
           comment.setFromUserEmail(
               comment.getFromUserEmail()!=null && comment.getFromUserEmail().length()>0
                   ? comment.getFromUserEmail()
  
  
  



More information about the jboss-cvs-commits mailing list