[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/lastmodified ...

Christian Bauer christian at hibernate.org
Fri Aug 17 09:00:32 EDT 2007


  User: cbauer  
  Date: 07/08/17 09:00:32

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/plugin/lastmodified  
                        LastModifiedDocuments.java
                        LastModifiedDocumentsPreferences.java
  Log:
  Major refactoring of core data schema and some new features
  
  Revision  Changes    Path
  1.2       +6 -5      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/lastmodified/LastModifiedDocuments.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LastModifiedDocuments.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/lastmodified/LastModifiedDocuments.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- LastModifiedDocuments.java	2 Apr 2007 18:25:05 -0000	1.1
  +++ LastModifiedDocuments.java	17 Aug 2007 13:00:32 -0000	1.2
  @@ -1,12 +1,13 @@
   package org.jboss.seam.wiki.plugin.lastmodified;
   
  -import org.jboss.seam.annotations.*;
  +import org.jboss.seam.Component;
   import org.jboss.seam.ScopeType;
  -import org.jboss.seam.wiki.core.model.Document;
  +import org.jboss.seam.annotations.*;
   import org.jboss.seam.wiki.core.dao.NodeDAO;
  +import org.jboss.seam.wiki.core.model.Document;
   
  -import java.util.List;
   import java.io.Serializable;
  +import java.util.List;
   
   @Name("lastModifiedDocumentsPlugin")
   @Scope(ScopeType.PAGE)
  @@ -15,7 +16,7 @@
       @In
       NodeDAO nodeDAO;
   
  -    @In("#{lastModifiedDocumentsPreferences.properties['numberOfItems']}")
  +    @In("#{lastModifiedDocumentsPreferences.numberOfItems}")
       private Long numberOfItems;
   
       private List<Document>lastModifiedDocuments;
  @@ -25,7 +26,7 @@
           return lastModifiedDocuments;
       }
   
  -    @Observer("Preferences.lastModifiedDocumentsPreferences")
  +    @Observer("PreferenceComponent.refresh.lastModifiedDocumentsPreferences")
       public void loadDocuments() {
           lastModifiedDocuments = nodeDAO.findDocumentsOrderByLastModified(Long.valueOf(numberOfItems).intValue());
       }
  
  
  
  1.4       +19 -6     jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/lastmodified/LastModifiedDocumentsPreferences.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LastModifiedDocumentsPreferences.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/lastmodified/LastModifiedDocumentsPreferences.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- LastModifiedDocumentsPreferences.java	12 Jun 2007 12:30:00 -0000	1.3
  +++ LastModifiedDocumentsPreferences.java	17 Aug 2007 13:00:32 -0000	1.4
  @@ -1,14 +1,14 @@
   package org.jboss.seam.wiki.plugin.lastmodified;
   
  +import org.hibernate.validator.NotNull;
  +import org.hibernate.validator.Range;
  +import org.jboss.seam.ScopeType;
   import org.jboss.seam.annotations.Name;
  -import org.jboss.seam.annotations.Scope;
   import org.jboss.seam.annotations.Observer;
  +import org.jboss.seam.annotations.Scope;
   import org.jboss.seam.wiki.preferences.Preference;
  -import org.jboss.seam.wiki.preferences.PreferenceVisibility;
   import org.jboss.seam.wiki.preferences.PreferenceSupport;
  -import org.jboss.seam.ScopeType;
  -import org.hibernate.validator.Range;
  -import org.hibernate.validator.NotNull;
  +import org.jboss.seam.wiki.preferences.PreferenceVisibility;
   
   import java.io.Serializable;
   
  @@ -21,7 +21,9 @@
       public String getCurrentInstanceVariable() { return "currentDocument"; }
   
       @Observer("PreferenceEditor.refresh.lastModifiedDocumentsPreferences")
  -    public void refreshProperties() { super.refreshProperties(); }
  +    public void refreshProperties() {
  +        super.refreshProperties();
  +    }
   
       @Preference(description = "01. Number of items shown in list", visibility = PreferenceVisibility.INSTANCE)
       @Range(min = 3l, max = 25l)
  @@ -36,4 +38,15 @@
       @NotNull
       private Long documentTitleLength;
   
  +    public Long getNumberOfItems() {
  +        return numberOfItems;
  +    }
  +
  +    public Boolean getShowUsernames() {
  +        return showUsernames;
  +    }
  +
  +    public Long getDocumentTitleLength() {
  +        return documentTitleLength;
  +    }
   }
  
  
  



More information about the jboss-cvs-commits mailing list