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

Christian Bauer christian at hibernate.org
Thu Sep 6 11:54:28 EDT 2007


  User: cbauer  
  Date: 07/09/06 11:54:28

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/core/action  
                        DocumentHome.java NodeHistory.java
  Log:
  Creator/history footer on documents
  
  Revision  Changes    Path
  1.26      +7 -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.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- DocumentHome.java	2 Sep 2007 09:39:45 -0000	1.25
  +++ DocumentHome.java	6 Sep 2007 15:54:28 -0000	1.26
  @@ -75,6 +75,7 @@
       private boolean enabledPreview = false;
       private boolean pushOnFeeds = false;
       private boolean pushOnSiteFeed = false;
  +    private List<Node> historicalNodes;
   
       /* -------------------------- Basic Overrides ------------------------------ */
   
  @@ -251,4 +252,10 @@
           return numOfNodes != null && numOfNodes > 0;
       }
   
  +    public List<Node> getHistoricalNodes() {
  +        if (historicalNodes == null)
  +            historicalNodes = getNodeDAO().findHistoricalNodes(getInstance());
  +        return historicalNodes;
  +    }
  +
   }
  
  
  
  1.11      +8 -0      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHistory.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeHistory.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHistory.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- NodeHistory.java	2 Sep 2007 14:54:31 -0000	1.10
  +++ NodeHistory.java	6 Sep 2007 15:54:28 -0000	1.11
  @@ -53,6 +53,10 @@
       public Long getNodeId() { return nodeId; }
       public void setNodeId(Long nodeId) { this.nodeId = nodeId; }
   
  +    Long historicalNodeId;
  +    public Long getHistoricalNodeId() { return historicalNodeId; }
  +    public void setHistoricalNodeId(Long historicalNodeId) { this.historicalNodeId = historicalNodeId; }
  +
       private Document currentNode;
       public Node getCurrentNode() { return currentNode;    }
   
  @@ -95,8 +99,12 @@
       }
   
       public void diff() {
  +        init(); // TODO: Why doesn't Seam execute my page action but instead s:link action="diff" in a fake RENDER RESPONSE?!?
           displayedHistoricalNode = null;
   
  +        if (historicalNodeId == null) return;
  +        selectedHistoricalNode = (Document)nodeDAO.findHistoricalNode(historicalNodeId);
  +
           String[] a = selectedHistoricalNode.getContent().split("\n");
           String[] b = currentNode.getContent().split("\n");
   
  
  
  



More information about the jboss-cvs-commits mailing list