[seam-commits] Seam SVN: r7363 - in trunk/examples/wiki: src/etc/META-INF and 5 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Feb 5 02:35:56 EST 2008
Author: christian.bauer at jboss.com
Date: 2008-02-05 02:35:56 -0500 (Tue, 05 Feb 2008)
New Revision: 7363
Modified:
trunk/examples/wiki/src/etc/META-INF/persistence-dev-war.xml
trunk/examples/wiki/src/etc/META-INF/persistence-prod-war.xml
trunk/examples/wiki/src/etc/ehcache.xml
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml
trunk/examples/wiki/view/themes/default/css/jiraIssueList.css
trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css
trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css
Log:
Improvied jiraIssueList UI and enabled caching again
Modified: trunk/examples/wiki/src/etc/META-INF/persistence-dev-war.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/persistence-dev-war.xml 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/src/etc/META-INF/persistence-dev-war.xml 2008-02-05 07:35:56 UTC (rev 7363)
@@ -41,13 +41,9 @@
<!-- Enable EHCache and register the JMX monitoring MBean -->
<property name="hibernate.cache.provider_class" value="org.jboss.seam.wiki.util.MonitoringEHCacheProvider"/>
- <!-- TODO: The cache causes lots of unexpected stale query data problems, need to investigate -->
- <property name="hibernate.cache.use_query_cache" value="false"/>
- <property name="hibernate.cache.use_second_level_cache" value="false"/>
+ <property name="hibernate.cache.use_query_cache" value="true"/>
+ <property name="hibernate.cache.use_second_level_cache" value="true"/>
- <property name="hibernate.ejb.classcache.org.jboss.seam.wiki.core.model.WikiNode"
- value="read-write, WikiNode"/>
-
<property name="hibernate.ejb.classcache.org.jboss.seam.wiki.core.preferences.WikiPreferenceValue"
value="read-write, WikiPreference"/>
Modified: trunk/examples/wiki/src/etc/META-INF/persistence-prod-war.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/persistence-prod-war.xml 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/src/etc/META-INF/persistence-prod-war.xml 2008-02-05 07:35:56 UTC (rev 7363)
@@ -36,13 +36,9 @@
<!-- Enable EHCache and register the JMX monitoring MBean -->
<property name="hibernate.cache.provider_class" value="org.jboss.seam.wiki.util.MonitoringEHCacheProvider"/>
- <!-- TODO: The cache causes lots of unexpected stale query data problems, need to investigate -->
- <property name="hibernate.cache.use_query_cache" value="false"/>
- <property name="hibernate.cache.use_second_level_cache" value="false"/>
+ <property name="hibernate.cache.use_query_cache" value="true"/>
+ <property name="hibernate.cache.use_second_level_cache" value="true"/>
- <property name="hibernate.ejb.classcache.org.jboss.seam.wiki.core.model.WikiNode"
- value="read-write, WikiNode"/>
-
<property name="hibernate.ejb.classcache.org.jboss.seam.wiki.core.preferences.WikiPreferenceValue"
value="read-write, WikiPreference"/>
Modified: trunk/examples/wiki/src/etc/ehcache.xml
===================================================================
--- trunk/examples/wiki/src/etc/ehcache.xml 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/src/etc/ehcache.xml 2008-02-05 07:35:56 UTC (rev 7363)
@@ -103,15 +103,6 @@
diskPersistent="false"
overflowToDisk="false"/>
- <cache name="WikiNode"
- maxElementsInMemory="1000"
- eternal="false"
- overflowToDisk="false"
- timeToIdleSeconds="1000"
- timeToLiveSeconds="6000"
- diskPersistent="false"
- memoryStoreEvictionPolicy="LRU"/>
-
<cache name="WikiPreference"
maxElementsInMemory="20000"
eternal="false"
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-02-05 07:35:56 UTC (rev 7363)
@@ -54,7 +54,7 @@
.createQuery("select n from WikiNode n where n.id = :id")
.setParameter("id", nodeId)
.setHint("org.hibernate.comment", "Find wikinode by id")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -68,7 +68,7 @@
.createQuery("select n from WikiNode n where n.id in (:idList)")
.setParameter("idList", ids)
.setHint("org.hibernate.comment", "Find wikinodes by id list")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getResultList();
}
@@ -83,7 +83,7 @@
.setParameter("areaNumber", areaNumber)
.setParameter("wikiname", wikiname)
.setHint("org.hibernate.comment", "Find node in area")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -115,7 +115,7 @@
.createQuery(queryString.toString())
.setHint("org.hibernate.comment", "Find wikinode children order by "+orderBy.name())
.setParameter("parent", node)
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.setFirstResult(firstResult)
.setMaxResults(maxResults)
.getResultList();
@@ -126,7 +126,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.parent = :parent")
.setHint("org.hibernate.comment", "Find wikinode children directories")
.setParameter("parent", dir)
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getResultList();
}
@@ -136,7 +136,7 @@
.createQuery("select c from WikiComment c where c.id = :id")
.setParameter("id", commentId)
.setHint("org.hibernate.comment", "Find comment by id")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -174,7 +174,7 @@
org.hibernate.Query nsQuery = getSession(true).createQuery(queryString.toString());
nsQuery.setParameter("doc", document);
nsQuery.setComment("Find wikicomments (tree)");
- nsQuery.setCacheable(true);
+ nsQuery.setCacheable(false);
nsQuery.setResultTransformer(
new ResultTransformer() {
public Object transformTuple(Object[] objects, String[] aliases) {
@@ -214,7 +214,7 @@
nsQuery.setParameter("nsLeft", root.getNodeInfo().getNsLeft());
nsQuery.setParameter("nsRight", root.getNodeInfo().getNsRight());
nsQuery.setComment("Find wikicomments subtree");
- nsQuery.setCacheable(true);
+ nsQuery.setCacheable(false);
nsQuery.setResultTransformer(
new ResultTransformer() {
public Object transformTuple(Object[] objects, String[] aliases) {
@@ -237,7 +237,7 @@
.createQuery("select f from WikiFile f where f.id = :id")
.setParameter("id", fileId)
.setHint("org.hibernate.comment", "Find wikifile by id")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -256,7 +256,7 @@
.setParameter("areaNumber", areaNumber)
.setParameter("wikiname", wikiname)
.setHint("org.hibernate.comment", "Find wikifile in area")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -270,7 +270,7 @@
.createQuery("select d from WikiDocument d where d.id = :id")
.setParameter("id", documentId)
.setHint("org.hibernate.comment", "Find document by id")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -286,7 +286,7 @@
.createQuery("select d.defaultFile from WikiDirectory d where d = :dir")
.setParameter("dir", directory)
.setHint("org.hibernate.comment", "Find default file")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -301,7 +301,7 @@
.createQuery("select doc from WikiDocument doc, WikiDirectory d where d = :dir and doc.id = d.defaultFile.id")
.setParameter("dir", directory)
.setHint("org.hibernate.comment", "Find default doc")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -317,7 +317,7 @@
return restrictedEntityManager.createQuery(query.toString())
.setParameter("dir", directory)
.setHint("org.hibernate.comment", "Find documents of directory")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getResultList();
}
@@ -332,7 +332,7 @@
.setParameter("areaNumber", areaNumber)
.setParameter("wikiname", wikiname)
.setHint("org.hibernate.comment", "Find document in area")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -350,7 +350,7 @@
return (List<WikiDocument>)restrictedEntityManager
.createQuery(query.toString())
.setHint("org.hibernate.comment", "Find documents order by " + orderBy.name())
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.setMaxResults(maxResults)
.getResultList();
}
@@ -362,7 +362,7 @@
" where sibling.parent = current.parent and current = :current and not sibling = :current" +
" and sibling."+ byProperty.name() + " " + (previousOrNext ? "<=" : ">=") + "current."+ byProperty.name() +
" order by sibling." +byProperty + " " + (previousOrNext ? "desc" : "asc") )
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.setMaxResults(1)
.setParameter("current", currentDocument)
.getSingleResult();
@@ -378,7 +378,7 @@
.createQuery("select u from WikiUpload u where u.id = :id")
.setParameter("id", uploadId)
.setHint("org.hibernate.comment", "Find upload by id")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -394,7 +394,7 @@
return restrictedEntityManager.createQuery(query.toString())
.setParameter("dir", directory)
.setHint("org.hibernate.comment", "Find uploads of directory")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getResultList();
}
@@ -404,7 +404,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.id = :id")
.setParameter("id", directoryId)
.setHint("org.hibernate.comment", "Find directory by id")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -440,7 +440,7 @@
.setParameter("areaNumber", areaNumber)
.setParameter("wikiname", wikiname)
.setHint("org.hibernate.comment", "Find directory in area")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -462,7 +462,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed, WikiDirectory r where r.parent is null and d.parent = r and d.wikiname = :wikiname")
.setParameter("wikiname", wikiname)
.setHint("org.hibernate.comment", "Find area by wikiname")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -476,7 +476,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed, WikiDirectory r where r.parent is null and d.parent = r and d.areaNumber = :areaNumber")
.setParameter("areaNumber", areaNumber)
.setHint("org.hibernate.comment", "Find area by area number")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-02-05 07:35:56 UTC (rev 7363)
@@ -63,7 +63,7 @@
return (WikiDirectory) em
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.parent is null")
.setHint("org.hibernate.comment", "Loading wikiRoot")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
throw new RuntimeException("You need to INSERT at least one parentless directory into the database", ex);
@@ -79,7 +79,7 @@
.createQuery("select d from WikiDocument d where d.id = :id")
.setParameter("id", Preferences.getInstance(WikiPreferences.class).getDefaultDocumentId())
.setHint("org.hibernate.comment", "Loading wikiStart")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (EntityNotFoundException ex) {
} catch (NoResultException ex) {
@@ -101,7 +101,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.id = :id")
.setParameter("id", wikiroot.getId())
.setHint("org.hibernate.comment", "Loading wikiRootRestricted")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
throw new RuntimeException("You need to INSERT at least one parentless directory into the database", ex);
@@ -118,7 +118,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.wikiname = :name and d.parent.parent is null")
.setParameter("name", WikiUtil.convertToWikiName(memberAreaName) )
.setHint("org.hibernate.comment", "Loading memberArea")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
FacesMessages.instance().addFromResourceBundleOrDefault(
@@ -141,7 +141,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.wikiname = :name and d.parent.parent is null")
.setParameter("name", WikiUtil.convertToWikiName(trashAreaName) )
.setHint("org.hibernate.comment", "Loading trashArea")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
FacesMessages.instance().addFromResourceBundleOrDefault(
@@ -164,7 +164,7 @@
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.wikiname = :name and d.parent.parent is null")
.setParameter("name", WikiUtil.convertToWikiName(helpAreaName) )
.setHint("org.hibernate.comment", "Loading trashArea")
- .setHint("org.hibernate.cacheable", true)
+ .setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
FacesMessages.instance().addFromResourceBundleOrDefault(
Modified: trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml 2008-02-05 07:35:56 UTC (rev 7363)
@@ -19,8 +19,7 @@
rendered="#{not empty jiraIssueList.issues and jiraIssueList.issues.size() > 0}"
styleClass="datatable jiraIssueListTable"
columnClasses="onePercentColumn alignCenter priorityColumn,
- defaultColumn alignLeft summaryColumn wrapWhitespace,
- tenPercentColumn alignLeft componentsColumn"
+ defaultColumn alignLeft summaryColumn wrapWhitespace"
rowClasses="rowOdd, rowEven"
cellpadding="0" cellspacing="0" border="0">
@@ -29,22 +28,23 @@
</h:column>
<h:column>
+
+ <s:div styleClass="jiraIssueComponents smallFont">
+ <ui:repeat var="comp" value="#{i.componentNames}">
+ <h:outputText value="#{comp}"/>
+ <h:outputText rendered="#{i.componentNames.indexOf(comp) < i.componentNames.size()-1}"
+ value=",  "/>
+ </ui:repeat>
+ <h:outputText value=" " rendered="#{empty i.componentNames}"/>
+ </s:div>
+
<h:outputLink value="#{preferences.get('JiraIssueList', currentMacro).url}/browse/#{i.key}">
<h:outputText
value="(#{i.key})  #{wiki:truncateString(i.summary, preferences.get('JiraIssueList', currentMacro).truncateSummary, '...')}"/>
</h:outputLink>
- </h:column>
- <h:column>
- <ui:repeat var="comp" value="#{i.componentNames}">
- <h:outputText value="#{comp}"/>
- <h:outputText rendered="#{i.componentNames.indexOf(comp) < i.componentNames.size()-1}"
- value=",  "/>
- </ui:repeat>
- <h:outputText value=" " rendered="#{empty i.componentNames}"/>
</h:column>
-
</h:dataTable>
</div>
Modified: trunk/examples/wiki/view/themes/default/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/jiraIssueList.css 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/view/themes/default/css/jiraIssueList.css 2008-02-05 07:35:56 UTC (rev 7363)
@@ -6,7 +6,9 @@
.jiraIssueListTable .summaryColumn {}
-.jiraIssueListTable .componentsColumn {}
+.jiraIssueListTable .jiraIssueComponents {
+ text-align: right;
+}
.jiraIssueListEmpty {
padding: 5px;
Modified: trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css 2008-02-05 07:35:56 UTC (rev 7363)
@@ -6,7 +6,9 @@
.jiraIssueListTable .summaryColumn {}
-.jiraIssueListTable .componentsColumn {}
+.jiraIssueListTable .jiraIssueComponents {
+ text-align: right;
+}
.jiraIssueListEmpty {
padding: 5px;
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css 2008-02-05 00:39:32 UTC (rev 7362)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css 2008-02-05 07:35:56 UTC (rev 7363)
@@ -6,7 +6,9 @@
.jiraIssueListTable .summaryColumn {}
-.jiraIssueListTable .componentsColumn {}
+.jiraIssueListTable .jiraIssueComponents {
+ text-align: right;
+}
.jiraIssueListEmpty {
border-left: 1px solid #d3d2d1;
More information about the seam-commits
mailing list