Author: christian.bauer(a)jboss.com
Date: 2008-02-03 10:01:48 -0500 (Sun, 03 Feb 2008)
New Revision: 7347
Added:
trunk/examples/wiki/view/themes/sfwkorg/img/icon.check.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.jira.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.log.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.news.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.updates.gif
Removed:
trunk/examples/wiki/view/includes/languageSelector.xhtml
trunk/examples/wiki/view/themes/default/css/languageSelector.css
Modified:
trunk/examples/wiki/build.xml
trunk/examples/wiki/src/etc/META-INF/components-dev.xml
trunk/examples/wiki/src/etc/META-INF/components-prod.xml
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/web.xml
trunk/examples/wiki/src/etc/messages_blogDirectory_en.properties
trunk/examples/wiki/src/etc/messages_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryCount.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
trunk/examples/wiki/src/test/log4j.xml
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/FAQData.dbunit.xml
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
trunk/examples/wiki/view/adminHome_d.xhtml
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/dirDisplay_m.xhtml
trunk/examples/wiki/view/docDisplay_d.xhtml
trunk/examples/wiki/view/docDisplay_m.xhtml
trunk/examples/wiki/view/docHistory_d.xhtml
trunk/examples/wiki/view/includes/commentForm.xhtml
trunk/examples/wiki/view/includes/commentsDisplay.xhtml
trunk/examples/wiki/view/includes/directorySelector.xhtml
trunk/examples/wiki/view/includes/ownerSelector.xhtml
trunk/examples/wiki/view/includes/userControl.xhtml
trunk/examples/wiki/view/includes/userInfo.xhtml
trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml
trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml
trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml
trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml
trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml
trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml
trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml
trunk/examples/wiki/view/plugins/tags/plugin.xhtml
trunk/examples/wiki/view/search_d.xhtml
trunk/examples/wiki/view/tagDisplay_d.xhtml
trunk/examples/wiki/view/themes/default/css/blogArchive.css
trunk/examples/wiki/view/themes/default/css/blogDirectory.css
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/default/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
trunk/examples/wiki/view/uploadCreate_d.xhtml
trunk/examples/wiki/view/userHome_d.xhtml
trunk/examples/wiki/view/userInfo_d.xhtml
Log:
JBSEAM-2569 - Delete action in dir menu, fixed blogDirectory plugin, various other
bugfixes
Modified: trunk/examples/wiki/build.xml
===================================================================
--- trunk/examples/wiki/build.xml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/build.xml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -155,7 +155,6 @@
deprecation="${javac.deprecation}"
nowarn="${javac.nowarn}">
<src path="${src.java.dir}"/>
- <exclude
name="org/jboss/seam/wiki/plugin/blogdirectory/**"/>
</javac>
<!-- Copy resources (mapping files, properties, etc.) to classes -->
Modified: trunk/examples/wiki/src/etc/META-INF/components-dev.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -37,6 +37,7 @@
<!-- Wiki is in debug mode -->
<component name="wikiInit"
class="org.jboss.seam.wiki.WikiInit" precedence="30">
+ <property name="adminContact">+41 123 123 123,
admin(a)my.address</property>
<property name="debug">true</property>
</component>
Modified: trunk/examples/wiki/src/etc/META-INF/components-prod.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -18,5 +18,9 @@
http://jboss.com/products/seam/transaction
http://jboss.com/products/seam/transaction-2.0.xsd
http://jboss.com/products/seam/components
http://jboss.com/products/seam/components-2.0.xsd">
+ <component name="wikiInit"
class="org.jboss.seam.wiki.WikiInit" precedence="30">
+ <property
name="adminContact">christian.bauer(a)gmail.com</property>
+ <property name="debug">false</property>
+ </component>
</components>
\ No newline at end of file
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -87,6 +87,13 @@
<page view-id="/dirDisplay*">
<param name="directoryId"
value="#{directoryHome.nodeId}"/>
+ <navigation>
+ <rule if-outcome="removed">
+ <redirect view-id="/dirDisplay_#{skin}.xhtml">
+ <param name="directoryId"
value="#{directoryHome.nodeId}"/>
+ </redirect>
+ </rule>
+ </navigation>
</page>
<page view-id="/dirEdit*"
no-conversation-view-id="/wiki.xhtml">
@@ -355,13 +362,14 @@
<http-error error-code="404"/>
</exception>
- <!-- TODO: This breaks unit tests...
<exception>
+ <end-conversation/>
<redirect view-id="/message.xhtml">
- <message severity="ERROR">Exception:
#{org.jboss.seam.exception.message}</message>
+ <message severity="ERROR">
+ #{messages['lacewiki.msg.FatalError']}
(#{wikiInit.adminContact})
+ </message>
</redirect>
</exception>
- -->
</pages>
Modified: trunk/examples/wiki/src/etc/WEB-INF/web.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -107,6 +107,17 @@
<url-pattern>/servlets/feeds/*</url-pattern>
</servlet-mapping>
+ <!-- In-place upgrades
+ <servlet>
+ <servlet-name>Upgrade Servlet</servlet-name>
+
<servlet-class>org.jboss.seam.wiki.core.ui.UpgradeServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Upgrade Servlet</servlet-name>
+ <url-pattern>/servlets/upgrade/*</url-pattern>
+ </servlet-mapping>
+ -->
+
<!-- Misc Settings -->
<!-- Session timeout: half hour (careful, large and long sessions need heap
size>-->
Modified: trunk/examples/wiki/src/etc/messages_blogDirectory_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_blogDirectory_en.properties 2008-02-03 14:18:57
UTC (rev 7346)
+++ trunk/examples/wiki/src/etc/messages_blogDirectory_en.properties 2008-02-03 15:01:48
UTC (rev 7347)
@@ -14,3 +14,5 @@
blogDirectory.label.In=in
blogDirectory.label.Tagged=tagged
blogDirectory.label.NoBlogEntriesFound=No blog entries found.
+blogDirectory.label.Tag=Tag
+blogDirectory.label.Tags=Tags
\ No newline at end of file
Modified: trunk/examples/wiki/src/etc/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/messages_en.properties 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/etc/messages_en.properties 2008-02-03 15:01:48 UTC (rev 7347)
@@ -247,7 +247,9 @@
lacewiki.button.dirDisplay.Refresh=Re<u>f</u>resh
lacewiki.button.dirDisplay.Refresh.accesskey=F
lacewiki.button.dirDisplay.View=View
+lacewiki.button.dirDisplay.ViewNewWindow=View (New Window)
lacewiki.button.dirDisplay.Edit=Edit
+lacewiki.button.dirDisplay.Delete=Delete
# Tag Display
@@ -641,7 +643,7 @@
lacewiki.msg.ImportOk=Created file '{0}' in current directory.
lacewiki.msg.OptimisticLockError=Someone modified the same record while you were editing
it. Your workspace has been closed.
lacewiki.msg.AccessDenied=Access Denied
-lacewiki.msg.FatalError=An unrecoverable error occured!
+lacewiki.msg.FatalError=An unrecoverable error occured, please check the application log
or contact the administrator!
lacewiki.msg.Trash.Emptied=All items in the trash have been permanently deleted.
lacewiki.msg.AutomaticallyGeneratedFeed=Aggregated Feed
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java 2008-02-03 14:18:57 UTC
(rev 7346)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java 2008-02-03 15:01:48 UTC
(rev 7347)
@@ -32,6 +32,7 @@
@Logger
static Log log;
+ private String adminContact;
private boolean debug;
@In(required = false)
@@ -55,8 +56,9 @@
StatisticsService mBean = new StatisticsService();
mBean.setSessionFactoryJNDIName("SessionFactories/laceWikiSF");
ManagementFactory.getPlatformMBeanServer().registerMBean(mBean,
hibernateMBeanName);
+
+ Events.instance().raiseEvent("Wiki.started");
- Events.instance().raiseEvent("Wiki.started");
log.info("Started LaceWiki");
}
@@ -68,6 +70,14 @@
ManagementFactory.getPlatformMBeanServer().unregisterMBean(hibernateMBeanName);
}
+ public String getAdminContact() {
+ return adminContact;
+ }
+
+ public void setAdminContact(String adminContact) {
+ this.adminContact = adminContact;
+ }
+
public boolean isDebug() {
return debug;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -7,7 +7,6 @@
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
@@ -40,9 +39,6 @@
@In
private Hash hashUtil;
- @In
- private Identity identity;
-
@In("#{preferences.get('UserManagement')}")
UserManagementPreferences prefs;
@@ -75,7 +71,7 @@
public boolean authenticate() {
- User user = getUserForCredentials(identity.getUsername(),
identity.getPassword());
+ User user = getUserForCredentials(Identity.instance().getUsername(),
Identity.instance().getPassword());
if (user == null) return false;
setRolesAndAccessLevels(user);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -14,7 +14,7 @@
import java.util.List;
@Name("breadcrumbFactory")
-(a)Scope(ScopeType.CONVERSATION)
+(a)Scope(ScopeType.PAGE)
public class Breadcrumb implements Serializable {
@Logger
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -125,6 +125,31 @@
return null; // Prevent navigation
}
+ public String remove(Long commentId) {
+ setNodeId(commentId);
+ initEditor();
+ if (isManaged()) {
+
+ // Additional permission required besides NodeHome.remove()
+ if (!Identity.instance().hasPermission("Comment",
"delete", getInstance().getParent()) ) {
+ throw new AuthorizationException("You don't have permission for
this operation");
+ }
+
+ // Remove feed entry before removing comment
+ feedDAO.removeFeedEntry(
+ feedDAO.findFeeds(getInstance()),
+ feedDAO.findFeedEntry(getInstance())
+ );
+
+ remove();
+ getEntityManager().clear();
+ Events.instance().raiseEvent("Comment.commentListRefresh");
+ }
+
+ return null; // Prevent navigation
+ }
+
+
@Override
protected NodeRemover getNodeRemover() {
return (CommentNodeRemover)Component.getInstance(CommentNodeRemover.class);
@@ -261,6 +286,8 @@
public void rate(Long commentId, int rating) {
+ getLog().debug("rating comment with id: " + commentId + " as
" + rating);
+
// Only the owner of the document can rate comments of that document
if (
!currentUser.getId().equals(documentHome.getInstance().getCreatedBy().getId()) ) {
throw new AuthorizationException("You don't have permission for this
operation");
@@ -268,47 +295,28 @@
// Guest can't rate
if (currentUser.isGuest()) {
- throw new IllegalStateException("Guests can't rate comments");
+ throw new IllegalStateException("User interface bug, guests can't
rate comments");
}
setId(commentId);
if (isManaged()) {
- if (getInstance().getRating() != 0)
- return; // Already rated
- if (getInstance().getCreatedBy().getId() == currentUser.getId())
- return; // Can't rate my own stuff
+ if (getInstance().getRating() != 0) {
+ throw new IllegalStateException("User interface bug, can't rate
comment that was already rated");
+ }
+ if (getInstance().getCreatedBy().getId().equals(currentUser.getId())) {
+ throw new IllegalStateException("User interface bug, a user
can't rate his/her own comments");
+ }
getInstance().setRating(rating);
}
}
- public void cancel() {
+ public String cancel() {
endConversation();
+ return "redirectToDocument";
}
- public void remove(Long commentId) {
- setNodeId(commentId);
- initEditor();
- if (isManaged()) {
-
- // Additional permission required besides NodeHome.remove()
- if (!Identity.instance().hasPermission("Comment",
"delete", getInstance().getParent()) ) {
- throw new AuthorizationException("You don't have permission for
this operation");
- }
-
- // Remove feed entry before removing comment
- feedDAO.removeFeedEntry(
- feedDAO.findFeeds(getInstance()),
- feedDAO.findFeedEntry(getInstance())
- );
-
- remove();
- getEntityManager().clear();
- Events.instance().raiseEvent("Comment.commentListRefresh");
- }
- }
-
@RequestParameter("showCommentForm")
public void showCommentForm(Boolean requestParam) {
if (requestParam != null && requestParam && !showForm) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -6,15 +6,13 @@
*/
package org.jboss.seam.wiki.core.action;
+import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.Component;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.international.Messages;
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.annotations.security.Restrict;
+import org.jboss.seam.international.Messages;
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
import org.jboss.seam.wiki.core.model.*;
@@ -23,9 +21,14 @@
import javax.faces.application.FacesMessage;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
import static javax.faces.application.FacesMessage.SEVERITY_WARN;
-import static javax.faces.application.FacesMessage.SEVERITY_ERROR;
import java.util.*;
+/**
+ * TODO: This class is turning into a maintenance nightmare, split
+ * directory browser and editor functionality.
+ *
+ * @author Christian Bauer
+ */
@Name("directoryHome")
@Scope(ScopeType.CONVERSATION)
public class DirectoryHome extends NodeHome<WikiDirectory, WikiDirectory> {
@@ -40,13 +43,13 @@
protected Clipboard clipboard;
@In
+ @Out(scope = ScopeType.CONVERSATION) // Helps us use this home with page and
conversation contexts
protected Pager pager;
/* -------------------------- Internal State ------------------------------ */
private boolean hasFeed;
- @DataModel(value = "childNodesList", scope = ScopeType.PAGE)
private List<WikiNode> childNodes;
private Map<WikiNode, Boolean> selectedNodes = new
HashMap<WikiNode,Boolean>();
@@ -78,12 +81,8 @@
public WikiDirectory afterNodeFound(WikiDirectory dir) {
super.afterNodeFound(dir);
- // Hm, not pretty but we can't have a @Factory here or Seam
- // complains that subclass has duplicate factory
- if (!Contexts.getPageContext().isSet("childNodesList")) {
- getLog().debug("refreshing child nodes after node found");
- refreshChildNodes(dir);
- }
+ getLog().debug("refreshing child nodes after node found");
+ refreshChildNodes(dir);
return dir;
}
@@ -272,11 +271,13 @@
/* -------------------------- Public Features ------------------------------ */
- @Observer(value = "PersistenceContext.filterReset", create = false)
+ @Observer(value = {"PersistenceContext.filterReset",
"Node.refreshList"}, create = false)
public void refreshChildNodes() {
if (isManaged()) {
getLog().debug("refreshing child nodes of the current instance");
refreshChildNodes(getInstance());
+ } else {
+ getLog().debug("not refreshing child nodes, instance is not managed:
" + getInstance());
}
}
@@ -527,4 +528,26 @@
refreshChildNodes();
}
+ public boolean isRemovable(WikiNode node) {
+
+ // Check if the current directory is the trash area, delete doesn't make
sense here
+ WikiDirectory trashArea =
(WikiDirectory)Component.getInstance("trashArea");
+ if (trashArea.getId().equals(getInstance().getId()))
+ return false;
+
+ // Check permissions TODO: This duplicates the check
+ if (!Identity.instance().hasPermission("Node", "edit",
node))
+ return false;
+
+ NodeRemover remover;
+ if (node.isInstance(WikiDocument.class)) {
+ remover = (NodeRemover) Component.getInstance(DocumentNodeRemover.class);
+ } else if (node.isInstance(WikiUpload.class)) {
+ remover = (NodeRemover) Component.getInstance(UploadNodeRemover.class);
+ } else {
+ return false;
+ }
+ return remover.isRemovable(node);
+ }
+
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2008-02-03
14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -45,7 +45,7 @@
return root;
}
- @Observer(value = { "Nodes.menuStructureModified",
"PersistenceContext.filterReset" }, create = false)
+ @Observer(value = { "Node.updated", "Node.removed",
"PersistenceContext.filterReset" }, create = false)
public void refreshRoot() {
log.debug("Loading menu items tree");
root = wikiNodeDAO.findMenuItemTree(
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-03
14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -259,17 +259,15 @@
String outcome = super.update();
if (outcome != null) {
Events.instance().raiseEvent("PreferenceEditor.flushAll");
- Events.instance().raiseEvent("Nodes.menuStructureModified");
+ Events.instance().raiseEvent("Node.updated");
}
return outcome;
}
public boolean isRemovable() {
- if (!isManaged()) return false;
- if (getNodeRemover() != null) {
- return getNodeRemover().isRemovable(getInstance());
- }
- return true;
+ return isManaged() &&
+ getNodeRemover() != null &&
+ getNodeRemover().isRemovable(getInstance());
}
@Override
@@ -282,11 +280,22 @@
getNodeRemover().removeDependencies(getInstance());
String outcome = super.remove();
if (outcome != null) {
- Events.instance().raiseEvent("Nodes.menuStructureModified");
+ Events.instance().raiseEvent("Node.removed");
}
return outcome;
}
+ public String remove(Long nodeId) {
+ getLog().debug("requested node remove with id: " + nodeId);
+ setNodeId(nodeId);
+ initEditor();
+ String outcome = remove();
+ if (outcome != null) {
+ Events.instance().raiseEvent("Node.refreshList");
+ }
+ return outcome;
+ }
+
public String trash() {
if (!isRemovable()) return null;
@@ -298,6 +307,7 @@
getEntityManager().flush();
trashedMessage();
+ Events.instance().raiseEvent("Node.removed");
return "removed";
}
@@ -347,19 +357,19 @@
}
protected void checkPersistPermissions() {
- getLog().trace("checking persist permissions");
+ getLog().debug("checking persist permissions");
if (!isPersistAllowed(getInstance(), getParentNode()))
throw new AuthorizationException("You don't have permission for this
operation");
}
protected void checkUpdatePermissions() {
- getLog().trace("checking update permissions");
+ getLog().debug("checking update permissions");
if (!isUpdateAllowed(getInstance(), getParentNode()))
throw new AuthorizationException("You don't have permission for this
operation");
}
protected void checkRemovePermissions() {
- getLog().trace("checking remove permissions");
+ getLog().debug("checking remove permissions");
if (!isRemoveAllowed(getInstance(), getParentNode()))
throw new AuthorizationException("You don't have permission for this
operation");
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java 2008-02-03
14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Pager.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -89,4 +89,15 @@
return numOfRecords != null && page > 0;
}
+ public int getQueryFirstResult() {
+ return new Long(getPage() * getPageSize()).intValue();
+ }
+
+ public int getQueryMaxResults() {
+ return new Long(getPageSize()).intValue();
+ }
+
+ public String toString() {
+ return "Pager - Records: " + getNumOfRecords() + " Page size:
" + getPageSize();
+ }
}
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-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -8,9 +8,8 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.annotations.*;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
import org.jboss.seam.wiki.core.model.LinkProtocol;
@@ -31,16 +30,37 @@
@Name("wikiNodeFactory")
public class WikiNodeFactory implements Serializable {
- @In
- protected EntityManager entityManager;
+ @Logger
+ Log log;
- @In
- protected EntityManager restrictedEntityManager;
+ @Observer("Wiki.started")
+ public void checkPreferences() {
+
+ log.info("checking wiki preferences...");
+/* TODO: needs to be disabled in testing
+ // We need a fake user so we can retrieve preferences without a request, on
startup
+ Contexts.getEventContext().set("currentPreferencesUser", new User());
+ Long rootId = loadWikiRoot().getId();
+ Long memberId = loadMemberArea().getId();
+ Long helpId = loadHelpArea().getId();
+ Long trashId = loadTrashArea().getId();
+
+ assert !rootId.equals(memberId);
+ assert !rootId.equals(helpId);
+ assert !rootId.equals(trashId);
+ assert !memberId.equals(helpId);
+ assert !memberId.equals(trashId);
+ assert !helpId.equals(trashId);
+ */
+ }
+
@Factory(value = "wikiRoot", scope = ScopeType.PAGE, autoCreate = true)
public WikiDirectory loadWikiRoot() {
+ log.debug("loading wiki root");
+ EntityManager em =
(EntityManager)Component.getInstance("entityManager");
try {
- return (WikiDirectory) entityManager
+ 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)
@@ -50,10 +70,12 @@
}
}
- @Factory(value = "wikiStart", scope = ScopeType.PAGE, autoCreate = true)
+ @Factory(value = "wikiStart", scope = ScopeType.CONVERSATION, autoCreate =
true)
public WikiDocument loadWikiStart() {
+ log.debug("loading wiki start into current conversation");
+ EntityManager em =
(EntityManager)Component.getInstance("restrictedEntityManager");
try {
- return (WikiDocument) restrictedEntityManager
+ return (WikiDocument) em
.createQuery("select d from WikiDocument d where d.id =
:id")
.setParameter("id",
Preferences.getInstance(WikiPreferences.class).getDefaultDocumentId())
.setHint("org.hibernate.comment", "Loading
wikiStart")
@@ -71,10 +93,11 @@
// Loads the same instance into a different persistence context
@Factory(value = "restrictedWikiRoot", scope = ScopeType.PAGE, autoCreate =
true)
public WikiDirectory loadWikiRootRestricted() {
+ log.debug("loading wiki root into restricted PC");
+ EntityManager em =
(EntityManager)Component.getInstance("restrictedEntityManager");
WikiDirectory wikiroot = (WikiDirectory)
Component.getInstance("wikiRoot");
-
try {
- return (WikiDirectory) restrictedEntityManager
+ return (WikiDirectory) em
.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")
@@ -87,9 +110,11 @@
@Factory(value = "memberArea", scope = ScopeType.PAGE, autoCreate = true)
public WikiDirectory loadMemberArea() {
+ log.debug("loading member area");
+ EntityManager em =
(EntityManager)Component.getInstance("entityManager");
String memberAreaName =
Preferences.getInstance(WikiPreferences.class).getMemberArea();
try {
- return (WikiDirectory) entityManager
+ return (WikiDirectory) em
.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")
@@ -108,9 +133,11 @@
@Factory(value = "trashArea", scope = ScopeType.PAGE, autoCreate = true)
public WikiDirectory loadTrashArea() {
+ log.debug("loading trash area");
+ EntityManager em =
(EntityManager)Component.getInstance("entityManager");
String trashAreaName =
Preferences.getInstance(WikiPreferences.class).getTrashArea();
try {
- return (WikiDirectory) entityManager
+ return (WikiDirectory) em
.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")
@@ -129,9 +156,11 @@
@Factory(value = "helpArea", scope = ScopeType.PAGE, autoCreate = true)
public WikiDirectory loadHelpArea() {
+ log.debug("loading help area");
+ EntityManager em =
(EntityManager)Component.getInstance("entityManager");
String helpAreaName =
Preferences.getInstance(WikiPreferences.class).getHelpArea();
try {
- return (WikiDirectory) entityManager
+ return (WikiDirectory) em
.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")
@@ -150,9 +179,11 @@
@Factory(value = "linkProtocolMap", scope = ScopeType.CONVERSATION,
autoCreate = true)
public Map<String, LinkProtocol> loadLinkProtocols() {
+ log.debug("loading link protocol map");
+ EntityManager em =
(EntityManager)Component.getInstance("entityManager");
Map<String, LinkProtocol> linkProtocols = new TreeMap<String,
LinkProtocol>();
//noinspection unchecked
- List<Object[]> result = entityManager
+ List<Object[]> result = em
.createQuery("select lp.prefix, lp from LinkProtocol lp order by
lp.prefix asc")
.setHint("org.hibernate.comment", "Loading link
protocols")
.setHint("org.hibernate.cacheable", true)
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2008-02-03
14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiNode.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -27,7 +27,7 @@
public abstract class WikiNode<N extends WikiNode> implements Comparable {
public static enum SortableProperty {
- name, createdOn, lastModifiedOn, rating;
+ name, createdOn, lastModifiedOn, rating
}
@Id
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -189,6 +189,7 @@
}
private Set<PreferenceValue> loadUserValues(String entityName, User user) {
+ if (user.getId() == null) return Collections.EMPTY_SET;
List<WikiPreferenceValue> values =
entityManager.createQuery(
"select wp from WikiPreferenceValue wp" +
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -1,170 +1,214 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
package org.jboss.seam.wiki.plugin.blogdirectory;
+import org.hibernate.Hibernate;
+import org.hibernate.Query;
+import org.hibernate.SQLQuery;
+import org.hibernate.Session;
+import org.hibernate.transform.ResultTransformer;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
-import org.jboss.seam.wiki.core.model.WikiDirectory;
-import org.jboss.seam.wiki.core.model.WikiNode;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.transform.Transformers;
-import org.hibernate.transform.AliasToBeanResultTransformer;
+import org.jboss.seam.wiki.core.action.Pager;
import javax.persistence.EntityManager;
import java.util.List;
-import java.util.ArrayList;
+/**
+ * @author Christian Bauer
+ */
@Name("blogDAO")
@AutoCreate
public class BlogDAO {
@In
- protected EntityManager restrictedEntityManager;
+ EntityManager restrictedEntityManager;
+ @In
+ Integer currentAccessLevel;
+
+ // Too bad, but we really need a SQL query here... better use SQL queries for ALL
queries in this DAO and generalize things
+ private String[] getWikiDocumentSQLColumnNames() {
+ return new String[]{
+ "doc2.NODE_ID",
+ "doc2.OBJ_VERSION", "doc2.PARENT_NODE_ID",
"doc2.RATING",
+ "doc2.AREA_NR", "doc2.NAME", "doc2.WIKINAME",
"doc2.CREATED_BY_USER_ID", "doc2.CREATED_ON",
"doc2.WRITE_PROTECTED",
+ "doc2.LAST_MODIFIED_BY_USER_ID", "doc2.LAST_MODIFIED_ON",
"doc2.READ_ACCESS_LEVEL", "doc2.WRITE_ACCESS_LEVEL",
+ "doc1.FILE_REVISION",
+ "doc.NAME_AS_TITLE", "doc.ENABLE_COMMENTS",
"doc.ENABLE_COMMENT_FORM", "doc.ENABLE_COMMENTS_ON_FEEDS",
+ "doc.HEADER", "doc.HEADER_MACROS",
"doc.CONTENT", "doc.CONTENT_MACROS", "doc.FOOTER",
"doc.FOOTER_MACROS"
+ };
+ }
+
+ private String getblogEntryFromClause(String tag) {
+ StringBuilder clause = new StringBuilder();
+ clause.append("from WIKI_DOCUMENT doc").append(" ");
+ clause.append("inner join WIKI_FILE doc1 on
doc.NODE_ID=doc1.NODE_ID").append(" ");
+ clause.append("inner join WIKI_NODE doc2 on
doc.NODE_ID=doc2.NODE_ID").append(" ");
+ if (tag != null && tag.length() > 0) clause.append("inner join
WIKI_TAG t on t.FILE_ID = doc1.NODE_ID").append(" ");
+ return clause.toString();
+ }
+
+ private String getBlogEntryWhereClause(WikiDocument ignoreDoc, Integer year, Integer
month, Integer day, String tag) {
+ StringBuilder clause = new StringBuilder();
+ clause.append("where doc2.PARENT_NODE_ID in").append(" (");
+ clause.append("select distinct dir1.NODE_ID from WIKI_DIRECTORY dir1,
WIKI_DIRECTORY dir2").append(" ");
+ clause.append("where dir1.NS_THREAD = dir2.NS_THREAD").append("
");
+ clause.append("and dir1.NS_LEFT between dir2.NS_LEFT and
dir2.NS_RIGHT").append(" ");
+ clause.append("and dir2.NS_THREAD=:nsThread and dir2.NS_LEFT>=:nsLeft and
dir2.NS_RIGHT<=:nsRight");
+ clause.append(") ");
+ clause.append("and doc.HEADER_MACROS like
'%blogEntry%'").append(" ");
+ clause.append("and doc2.READ_ACCESS_LEVEL <=
:currentAccessLevel").append(" ");
+ if (ignoreDoc != null && ignoreDoc.getId() != null)
clause.append("and doc.NODE_ID<>:ignoreDoc").append(" ");
+ if (tag != null && tag.length()>0)
clause.append("and t.TAG = :tag").append(" ");
+ if (year != null) clause.append("and year(doc2.CREATED_ON) =
:limitYear").append(" ");
+ if (month != null) clause.append("and month(doc2.CREATED_ON) =
:limitMonth").append(" ");
+ if (day != null) clause.append("and day(doc2.CREATED_ON) =
:limitDay").append(" ");
+ return clause.toString();
+ }
+
+ private void bindBlogEntryWhereClause(Query query, WikiDirectory startDir,
WikiDocument ignoreDoc,
+ Integer year, Integer month, Integer day,
String tag) {
+ query.setParameter("nsThread", startDir.getNodeInfo().getNsThread());
+ query.setParameter("nsLeft", startDir.getNodeInfo().getNsLeft());
+ query.setParameter("nsRight", startDir.getNodeInfo().getNsRight());
+ query.setParameter("currentAccessLevel", currentAccessLevel);
+
+ if (ignoreDoc != null && ignoreDoc.getId() != null)
query.setParameter("ignoreDoc", ignoreDoc);
+ if (tag != null && tag.length()>0)
query.setParameter("tag", tag);
+ if (year != null) query.setParameter("limitYear", year);
+ if (month != null) query.setParameter("limitMonth", month);
+ if (day != null) query.setParameter("limitDay", day);
+ }
+
public List<BlogEntry> findBlogEntriesWithCommentCount(WikiDirectory startDir,
WikiDocument ignoreDoc,
- String orderByProperty,
- boolean orderDescending,
- long firstResult,
- long maxResults,
+ Pager pager,
Integer year,
Integer month,
Integer day,
- final String tag) {
+ String tag) {
StringBuilder queryString = new StringBuilder();
- queryString.append("select d as entryDocument").append(",
");
- queryString.append("(select count(c) from WikiComment c where c.file = d)
as commentCount").append(" ");
+ queryString.append("select").append(" ");
+ for (int i = 0; i < getWikiDocumentSQLColumnNames().length; i++) {
+ queryString.append(getWikiDocumentSQLColumnNames()[i]);
+ if (i != getWikiDocumentSQLColumnNames().length-1) queryString.append(",
");
+ }
+ queryString.append(", count(c3.NODE_ID) as
COMMENT_COUNT").append(" ");
+ queryString.append(getblogEntryFromClause(tag));
+ queryString.append("left outer join WIKI_NODE c1 on doc.NODE_ID =
c1.PARENT_NODE_ID").append(" ");
+ queryString.append("left outer join WIKI_COMMENT c2 on c1.NODE_ID =
c2.NODE_ID").append(" ");
+ queryString.append("left outer join WIKI_COMMENT c3 on c2.NS_THREAD =
c3.NS_THREAD").append(" ");
+ queryString.append(getBlogEntryWhereClause(ignoreDoc, year, month, day, tag));
- queryString.append("from WikiDocument d fetch all properties where
d.parent.id in").append(" ");
- queryString.append("(");
- queryString.append("select d1.id from
").append(startDir.getTreeSuperclassEntityName()).append(" d1, ");
- queryString.append(startDir.getTreeSuperclassEntityName()).append(" d2
");
- queryString.append("where d1.nsThread = :thread and d2.nsThread =
:thread").append(" ");
- queryString.append("and d1.nsLeft between d2.nsLeft and
d2.nsRight").append(" ");
- queryString.append("and d2.nsLeft >= :startLeft and d2.nsRight <=
:startRight").append(" ");
- queryString.append(")");
+ queryString.append("group by").append(" ");
+ for (int i = 0; i < getWikiDocumentSQLColumnNames().length; i++) {
+ queryString.append(getWikiDocumentSQLColumnNames()[i]);
+ if (i != getWikiDocumentSQLColumnNames().length-1) queryString.append(",
");
+ }
+ queryString.append(" ");
+ queryString.append("order by doc2.CREATED_ON desc");
- if (ignoreDoc != null && ignoreDoc.getId() != null)
- queryString.append("and not d = :ignoreDoc").append("
");
+ SQLQuery query = getSession().createSQLQuery(queryString.toString());
- queryString.append("and not d.macros like
'%blogDirectory%'").append(" ");
- queryString.append("and not d.macros like
'%feedTeasers%'").append(" ");
+ bindBlogEntryWhereClause(query, startDir, ignoreDoc, year, month, day, tag);
- if (year != null) queryString.append("and year(d.createdOn) =
:limitYear").append(" ");
- if (month != null) queryString.append("and month(d.createdOn) =
:limitMonth").append(" ");
- if (day != null) queryString.append("and day(d.createdOn) =
:limitDay").append(" ");
- if (tag != null && tag.length()>0) queryString.append("and d.tags
like :tag").append(" ");
+ query.setComment("Finding all blogEntry documents recursively in dir: "
+ startDir.getName());
+ query.addEntity(WikiDocument.class);
+ query.addScalar("COMMENT_COUNT", Hibernate.LONG);
+ query.setFirstResult( pager.getQueryFirstResult() );
+ query.setMaxResults( pager.getQueryMaxResults() );
- queryString.append("order by d.").append(orderByProperty).append("
");
- queryString.append( orderDescending ? "desc" :
"asc").append("");
-
- Query nestedSetQuery = getSession().createQuery(queryString.toString());
- nestedSetQuery.setParameter("thread", startDir.getNsThread());
- nestedSetQuery.setParameter("startLeft", startDir.getNsLeft());
- nestedSetQuery.setParameter("startRight", startDir.getNsRight());
- if (ignoreDoc != null && ignoreDoc.getId() != null)
- nestedSetQuery.setParameter("ignoreDoc", ignoreDoc);
-
- if (year != null) nestedSetQuery.setParameter("limitYear", year);
- if (month != null) nestedSetQuery.setParameter("limitMonth", month);
- if (day != null) nestedSetQuery.setParameter("limitDay", day);
- if (tag != null && tag.length()>0)
nestedSetQuery.setParameter("tag", "%" + tag + "%");
-
- nestedSetQuery.setFirstResult( new Long(firstResult).intValue() );
- nestedSetQuery.setMaxResults( new Long(maxResults).intValue() );
- nestedSetQuery.setResultTransformer(
- new AliasToBeanResultTransformer(BlogEntry.class) {
+ query.setResultTransformer(
+ new ResultTransformer() {
public Object transformTuple(Object[] result, String[] aliases) {
- WikiDocument doc = (WikiDocument)result[0];
- if (tag == null || doc.isTagged(tag)) {
- return super.transformTuple(result, aliases);
- }
- return null;
+ BlogEntry be = new BlogEntry();
+ be.setEntryDocument( (WikiDocument)result[0]);
+ be.setCommentCount( (Long)result[1] );
+ return be;
}
- public List transformList(List list) {
- List listWithoutNulls = new ArrayList();
- for (Object o : super.transformList(list)) if (o != null)
listWithoutNulls.add(o);
- return listWithoutNulls;
- }
+ public List transformList(List list) { return list; }
}
);
- return (List<BlogEntry>)nestedSetQuery.list();
+ return (List<BlogEntry>)query.list();
+
}
- public Long countBlogEntries(WikiNode startNode, WikiNode ignoreNode, Integer year,
Integer month, Integer day, String tag) {
- return countBlogEntries(startNode, ignoreNode, false, false, false, year, month,
day, tag).get(0).getNumOfEntries();
+ public Long countBlogEntries(WikiDirectory startDir, WikiDocument ignoreDoc, Integer
year, Integer month, Integer day, String tag) {
+ return countBlogEntries(startDir, ignoreDoc, false, false, false, year, month,
day, tag).get(0).getNumOfEntries();
}
- public List<BlogEntryCount> countAllBlogEntriesGroupByYearMonth(WikiNode
startNode, WikiNode ignoreNode, String tag) {
- return countBlogEntries(startNode, ignoreNode, true, true, false, null, null,
null, tag);
+ public List<BlogEntryCount> countAllBlogEntriesGroupByYearMonth(WikiDirectory
startDir, WikiDocument ignoreDoc, String tag) {
+ return countBlogEntries(startDir, ignoreDoc, true, true, false, null, null, null,
tag);
}
- private List<BlogEntryCount> countBlogEntries(WikiNode startNode, WikiNode
ignoreNode,
- boolean projectYear, boolean
projectMonth, boolean projectDay,
+ private List<BlogEntryCount> countBlogEntries(WikiDirectory startDir,
WikiDocument ignoreDoc,
+ final boolean projectYear, final boolean
projectMonth, final boolean projectDay,
Integer limitYear, Integer limitMonth,
Integer limitDay,
String tag) {
+ // Sanity input check
+ if (projectDay && (!projectMonth || !projectYear))
+ throw new IllegalArgumentException("Can't project on day without
months or year");
+ if (projectMonth && !projectYear)
+ throw new IllegalArgumentException("Can't project on month without
year");
+
StringBuilder queryString = new StringBuilder();
- queryString.append("select count(n1.id) as numOfEntries");
-
- if (projectYear) queryString.append(",
").append("year(n1.createdOn) as year");
- if (projectMonth) queryString.append(",
").append("month(n1.createdOn) as month");
- if (projectDay) queryString.append(", ").append("day(n1.createdOn)
as day");
-
+ queryString.append("select count(doc.NODE_ID) as
NUM_OF_ENTRIES").append(" ");
+ if (projectYear) queryString.append(",
").append("year(doc2.CREATED_ON) as YEAR");
+ if (projectMonth) queryString.append(",
").append("month(doc2.CREATED_ON) as MONTH");
+ if (projectDay) queryString.append(",
").append("day(doc2.CREATED_ON) as DAY");
queryString.append(" ");
- /*
- queryString.append("from
").append(startNode.getTreeSuperclassEntityName()).append(" n1, ");
- queryString.append(startNode.getTreeSuperclassEntityName()).append(" n2
");
- */
- queryString.append("where n1.nsThread = :thread and n2.nsThread =
:thread").append(" ");
- queryString.append("and n1.nsLeft between n2.nsLeft and
n2.nsRight").append(" ");
- queryString.append("and n2.nsLeft > :startLeft and n2.nsRight <
:startRight").append(" ");
- queryString.append("and n2.class = :clazz").append(" ");
- queryString.append("and not n1.macros like
'%blogDirectory%'").append(" ");
- if (ignoreNode.getId() != null)
- queryString.append("and not n1 = :ignoreNode").append("
");
+ queryString.append(getblogEntryFromClause(tag));
+ queryString.append(getBlogEntryWhereClause(ignoreDoc, limitYear, limitMonth,
limitDay, tag));
- if (limitYear != null) queryString.append("and year(n1.createdOn) =
:limitYear").append(" ");
- if (limitMonth!= null) queryString.append("and month(n1.createdOn) =
:limitMonth").append(" ");
- if (limitDay != null) queryString.append("and day(n1.createdOn) =
:limitDay").append(" ");
+ if (projectYear || projectMonth || projectDay) queryString.append("group
by").append(" ");
+ if (projectYear) queryString.append("year(doc2.CREATED_ON)");
+ if (projectMonth) queryString.append(", month(doc2.CREATED_ON)");
+ if (projectDay) queryString.append(", day(doc2.CREATED_ON)");
- if (tag != null && tag.length()>0) queryString.append("and
n1.tags like :tag").append(" ");
+ if (projectYear || projectMonth || projectDay) queryString.append("order
by").append(" ");
+ if (projectYear) queryString.append("YEAR desc");
+ if (projectMonth) queryString.append(", MONTH desc");
+ if (projectDay) queryString.append(", DAY desc");
- if (projectYear || projectMonth || projectDay) queryString.append("group
by").append(" ");
- if (projectYear) queryString.append("year(n1.createdOn)");
- if (projectMonth) queryString.append(", month(n1.createdOn)");
- if (projectDay) queryString.append(", day(n1.createdOn)");
- queryString.append(" ");
+ SQLQuery query = getSession().createSQLQuery(queryString.toString());
- if (projectYear || projectMonth || projectDay) queryString.append("order
by").append(" ");
- if (projectYear) queryString.append("year(n1.createdOn) desc");
- if (projectMonth) queryString.append(", month(n1.createdOn) desc");
- if (projectDay) queryString.append(", day(n1.createdOn) desc");
- queryString.append(" ");
+ bindBlogEntryWhereClause(query, startDir, ignoreDoc, limitYear, limitMonth,
limitDay, tag);
- Query nestedSetQuery = getSession().createQuery(queryString.toString());
- /*
- nestedSetQuery.setParameter("thread", startNode.getNsThread());
- nestedSetQuery.setParameter("startLeft", startNode.getNsLeft());
- nestedSetQuery.setParameter("startRight", startNode.getNsRight());
- */
- nestedSetQuery.setParameter("clazz", "DOCUMENT"); // TODO:
Hibernate can't bind the discriminator? Not even with Hibernate.CLASS type...
- if (ignoreNode.getId() != null)
- nestedSetQuery.setParameter("ignoreNode", ignoreNode);
- if (limitYear != null) nestedSetQuery.setParameter("limitYear",
limitYear);
- if (limitMonth!= null) nestedSetQuery.setParameter("limitMonth",
limitMonth);
- if (limitDay != null) nestedSetQuery.setParameter("limitDay",
limitDay);
- if (tag != null && tag.length()>0)
nestedSetQuery.setParameter("tag", "%" + tag + "%");
+ query.setComment("Finding blogEntry counts");
+ query.addScalar("NUM_OF_ENTRIES", Hibernate.LONG);
+ if (projectYear) query.addScalar("YEAR", Hibernate.INTEGER);
+ if (projectMonth) query.addScalar("MONTH", Hibernate.INTEGER);
+ if (projectDay) query.addScalar("DAY", Hibernate.INTEGER);
-
nestedSetQuery.setResultTransformer(Transformers.aliasToBean(BlogEntryCount.class));
+ query.setResultTransformer(
+ new ResultTransformer() {
+ public Object transformTuple(Object[] result, String[] aliases) {
+ BlogEntryCount beCount = new BlogEntryCount();
+ beCount.setNumOfEntries( (Long)result[0] );
+ if (projectYear) beCount.setYear( (Integer)result[1] );
+ if (projectMonth) beCount.setMonth( (Integer)result[2] );
+ if (projectDay) beCount.setDay( (Integer)result[3] );
+ return beCount;
+ }
+ public List transformList(List list) { return list; }
+ }
+ );
- return nestedSetQuery.list();
+ return (List<BlogEntryCount>) query.list();
}
private Session getSession() {
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -9,19 +9,22 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.action.Pager;
import org.jboss.seam.wiki.util.WikiUtil;
-import org.jboss.seam.wiki.preferences.Preferences;
import java.io.Serializable;
import java.util.*;
+/**
+ * @author Christian Bauer
+ */
@Name("blogDirectory")
-(a)Scope(ScopeType.PAGE)
+(a)Scope(ScopeType.CONVERSATION)
public class BlogDirectory implements Serializable {
@In
@@ -36,7 +39,11 @@
@In
WikiDocument currentDocument;
- private Integer page = 0;
+ @In("#{preferences.get('Blog', currentMacro)}")
+ BlogPreferences prefs;
+
+ private Pager pager;
+
private Integer year;
private Integer month;
private Integer day;
@@ -44,10 +51,14 @@
@RequestParameter
public void setPage(Integer page) {
- if (page != null) {
- this.page = page;
- }
+ if (pager == null) pager = new Pager(prefs.getPageSize());
+ pager.setPage(page);
}
+
+ public Pager getPager() {
+ return pager;
+ }
+
@RequestParameter
public void setYear(Integer year) {
this.year = year;
@@ -65,67 +76,44 @@
this.tag = tag;
}
- private long numOfBlogEntries;
- private long totalNumOfBlogEntries;
private List<BlogEntry> blogEntries;
private List<BlogEntryCount> blogEntryCountsByYearAndMonth;
// Need to expose this as a datamodel so Seam can convert our map to a collection of
Map.Entry objects
@DataModel
private Map<Date, List<BlogEntry>> recentBlogEntries;
- private long pageSize;
- private long recentBlogEntriesCount;
-
- @Create
- public void initialize() {
- initializePreferences();
- refreshBlogEntries();
- }
-
- // Lazier than @In, would be too many injections because of c:forEach iteration on
blog entry list
- private void initializePreferences() {
- // TODO: Uhm, we have several macros that use this backend bean... that
doesn't work
- pageSize = Preferences.getInstance(BlogPreferences.class,
"currentMacro").getPageSize();
- recentBlogEntriesCount = Preferences.getInstance(BlogPreferences.class,
"currentMacro").getRecentEntriesItems();
- }
-
- private void queryNumOfBlogEntries() {
- numOfBlogEntries = blogDAO.countBlogEntries(currentDirectory, currentDocument,
year, month, day, tag);
- }
-
- private void queryBlogEntries() {
+ @Observer(value = {"PersistenceContext.filterReset"}, create = false)
+ public void loadBlogEntries() {
+ pager.setPageSize(prefs.getPageSize());
+ pager.setNumOfRecords(blogDAO.countBlogEntries(currentDirectory, currentDocument,
year, month, day, tag));
+ if (pager.getNumOfRecords() == 0) {
+ blogEntries = Collections.EMPTY_LIST;
+ return;
+ }
blogEntries =
blogDAO.findBlogEntriesWithCommentCount(
currentDirectory,
currentDocument,
- "createdOn",
- true,
- page * pageSize,
- pageSize,
+ pager,
year, month, day,
tag
);
}
- private void queryBlogEntryCountsByYearAndMonth() {
+
+ @Observer(value = {"Macro.render.blogArchive",
"PersistenceContext.filterReset"}, create = false)
+ public void loadBlogEntryCountsByYearAndMonth() {
blogEntryCountsByYearAndMonth =
blogDAO.countAllBlogEntriesGroupByYearMonth(currentDirectory, currentDocument, tag);
- for (BlogEntryCount blogEntryCount : blogEntryCountsByYearAndMonth) {
- totalNumOfBlogEntries = totalNumOfBlogEntries +
blogEntryCount.getNumOfEntries();
- }
}
@Factory(value = "recentBlogEntries")
- @Observer("PreferenceComponent.refresh.blogRecentEntriesPreferences")
- public void queryRecentBlogEntries() {
- initializePreferences();
+ @Observer(value = {"Macro.render.blogRecentEntries",
"PersistenceContext.filterReset"}, create = false)
+ public void loadRecentBlogEntries() {
List<BlogEntry> recentBlogEntriesNonAggregated =
blogDAO.findBlogEntriesWithCommentCount(
currentDirectory,
currentDocument,
- "createdOn",
- true,
- 0,
- recentBlogEntriesCount,
+ new Pager(prefs.getRecentEntriesItems()),
null, null, null,
null
);
@@ -153,99 +141,22 @@
}
}
- @Observer("PreferenceComponent.refresh.blogDirectoryPreferences")
- public void refreshBlogEntries() {
- initializePreferences();
- blogEntries = new ArrayList<BlogEntry>();
- queryNumOfBlogEntries();
- if (numOfBlogEntries != 0){
- queryBlogEntries();
- }
- }
-
- public long getTotalNumOfBlogEntries() {
- if (blogEntryCountsByYearAndMonth == null) {
- queryBlogEntryCountsByYearAndMonth();
- }
- return totalNumOfBlogEntries;
- }
-
- public long getNumOfBlogEntries() {
- return numOfBlogEntries;
- }
-
public List<BlogEntry> getBlogEntries() {
+ if (blogEntries == null) loadBlogEntries();
return blogEntries;
}
public List<BlogEntryCount> getBlogEntryCountsByYearAndMonth() {
- if (blogEntryCountsByYearAndMonth == null) {
- queryBlogEntryCountsByYearAndMonth();
- }
+ if (blogEntryCountsByYearAndMonth == null) loadBlogEntryCountsByYearAndMonth();
return blogEntryCountsByYearAndMonth;
}
- public int getNextPage() {
- return page + 1;
- }
-
- public int getPreviousPage() {
- return page - 1;
- }
-
- public int getFirstPage() {
- return 0;
- }
-
- public long getFirstRow() {
- return page * pageSize + 1;
- }
-
- public long getLastRow() {
- return (page * pageSize + pageSize) > numOfBlogEntries
- ? numOfBlogEntries
- : page * pageSize + pageSize;
- }
-
- public long getLastPage() {
- long lastPage = (numOfBlogEntries / pageSize);
- if (numOfBlogEntries % pageSize == 0) lastPage--;
- return lastPage;
- }
-
- public boolean isNextPageAvailable() {
- return blogEntries != null && numOfBlogEntries > ((page * pageSize) +
pageSize);
- }
-
- public boolean isPreviousPageAvailable() {
- return blogEntries != null && page > 0;
- }
-
public String getDateUrl() {
- return dateAsString(year, month, day);
+ return WikiUtil.dateAsString(year, month, day);
}
public String getTagUrl() {
return tag != null && tag.length()>0 ? "/Tag/" +
WikiUtil.encodeURL(tag) : "";
}
- // Utilities
-
- public static String dateAsString(Integer year, Integer month, Integer day) {
- StringBuilder dateUrl = new StringBuilder();
- if (year != null) dateUrl.append("/").append(year);
- if (month != null) dateUrl.append("/").append(padInteger(month, 2));
- if (day != null) dateUrl.append("/").append(padInteger(day, 2));
- return dateUrl.toString();
- }
-
- private static String padInteger(Integer raw, int padding) {
- String rawInteger = raw.toString();
- StringBuilder paddedInteger = new StringBuilder( );
- for ( int padIndex = rawInteger.length() ; padIndex < padding; padIndex++ ) {
- paddedInteger.append('0');
- }
- return paddedInteger.append( rawInteger ).toString();
- }
-
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntry.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntry.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntry.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -1,3 +1,9 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
package org.jboss.seam.wiki.plugin.blogdirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
@@ -3,9 +9,15 @@
import java.io.Serializable;
+import java.util.List;
+import java.util.ArrayList;
+/**
+ * @author Christian Bauer
+ */
public class BlogEntry implements Serializable {
WikiDocument entryDocument;
Long commentCount;
+ List<String> tags;
public BlogEntry() {}
@@ -36,6 +48,11 @@
this.commentCount = commentCount;
}
+ public List<String> getTagsAsList() {
+ if (tags == null) tags = new ArrayList<String>(entryDocument.getTags());
+ return tags;
+ }
+
public String toString() {
return "BlogEntry: " + entryDocument + " Comments: " +
commentCount;
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryCount.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryCount.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryCount.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -1,5 +1,16 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
package org.jboss.seam.wiki.plugin.blogdirectory;
+import org.jboss.seam.wiki.util.WikiUtil;
+
+/**
+ * @author Christian Bauer
+ */
public class BlogEntryCount {
Long numOfEntries;
@@ -9,31 +20,40 @@
public BlogEntryCount() {}
- public BlogEntryCount(Long numOfEntries, Integer year, Integer month, Integer day) {
- this.numOfEntries = numOfEntries;
- this.year = year;
- this.month = month;
- this.day = day;
- }
-
public Long getNumOfEntries() {
return numOfEntries;
}
+ public void setNumOfEntries(Long numOfEntries) {
+ this.numOfEntries = numOfEntries;
+ }
+
public Integer getYear() {
return year;
}
+ public void setYear(Integer year) {
+ this.year = year;
+ }
+
public Integer getMonth() {
return month;
}
+ public void setMonth(Integer month) {
+ this.month = month;
+ }
+
public Integer getDay() {
return day;
}
+ public void setDay(Integer day) {
+ this.day = day;
+ }
+
public String getAsString() {
- return BlogDirectory.dateAsString(year, month, day);
+ return WikiUtil.dateAsString(year, month, day);
}
public String toString() {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-02-03
14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -90,6 +90,23 @@
return a + b;
}
+ public static String padInteger(Integer raw, int padding) {
+ String rawInteger = raw.toString();
+ StringBuilder paddedInteger = new StringBuilder( );
+ for ( int padIndex = rawInteger.length() ; padIndex < padding; padIndex++ ) {
+ paddedInteger.append('0');
+ }
+ return paddedInteger.append( rawInteger ).toString();
+ }
+
+ public static String dateAsString(Integer year, Integer month, Integer day) {
+ StringBuilder dateUrl = new StringBuilder();
+ if (year != null) dateUrl.append("/Year/").append(year);
+ if (month != null)
dateUrl.append("/Month/").append(WikiUtil.padInteger(month, 2));
+ if (day != null)
dateUrl.append("/Day/").append(WikiUtil.padInteger(day, 2));
+ return dateUrl.toString();
+ }
+
// Display all roles for a particular access level
public static Role.AccessLevel resolveAccessLevel(Integer accessLevel) {
List<Role.AccessLevel> accessLevels =
(List<Role.AccessLevel>)Component.getInstance("accessLevelsList");
@@ -119,9 +136,7 @@
StringBuilder url = new StringBuilder();
url.append(Component.getInstance("basePath")).append("/service/Feed/atom").append(feed.getURL());
if (comments != null && comments.length() >0) {
- try {
-
url.append("/Comments/").append(FeedServlet.Comments.valueOf(comments));
- } catch (IllegalArgumentException ex) {}
+
url.append("/Comments/").append(FeedServlet.Comments.valueOf(comments));
}
if (tag != null && tag.length() >0)
url.append("/Tag/").append(encodeURL(tag));
return url.toString();
Modified: trunk/examples/wiki/src/test/log4j.xml
===================================================================
--- trunk/examples/wiki/src/test/log4j.xml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/test/log4j.xml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -34,7 +34,7 @@
<!-- ############### Hibernate logging ################# -->
<category name="org.hibernate">
- <priority value="WARN"/>
+ <priority value="ERROR"/>
</category>
<!--
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/FAQData.dbunit.xml
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/FAQData.dbunit.xml 2008-02-03
14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/FAQData.dbunit.xml 2008-02-03
15:01:48 UTC (rev 7347)
@@ -23,10 +23,10 @@
NODE_ID="301" FILE_REVISION="0"/>
<WIKI_DOCUMENT
NODE_ID="301"
-
HEADER="[<=clearBackground]
[<=hideControls]
[<=hideComments]
[<=hideTags]
[<=hideCreatorHistory]
[<=faqBrowser]"
+
HEADER="[<=hideControls]
[<=hideComments]
[<=hideTags]
[<=hideCreatorHistory]
[<=faqBrowser]"
CONTENT="This is the FAQ start page."
FOOTER="[NULL]"
- HEADER_MACROS="clearBackground hideControls hideComments hideTags
hideCreatorHistory faqBrowser"
+ HEADER_MACROS="hideControls hideComments hideTags hideCreatorHistory
faqBrowser"
CONTENT_MACROS="[NULL]"
FOOTER_MACROS="[NULL]"
NAME_AS_TITLE="false" ENABLE_COMMENTS="false"
ENABLE_COMMENT_FORM="false" ENABLE_COMMENTS_ON_FEEDS="false"/>
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/browse/DisplayDirectories.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -42,6 +42,8 @@
assert dirHome.getChildNodes().size() == 1;
+ assert dirHome.isRemovable(dirHome.getChildNodes().get(0));
+
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
}.run();
@@ -68,6 +70,8 @@
assert dirHome.getChildNodes().size() == 1;
+ assert dirHome.isRemovable(dirHome.getChildNodes().get(0));
+
assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
}
}.run();
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -131,7 +131,7 @@
}
protected void invokeApplication() throws Exception {
- invokeMethod("#{commentHome.rate(11, 4)}");
+ invokeMethod("#{commentHome.rate(12, 4)}");
}
}.run();
@@ -144,7 +144,7 @@
protected void renderResponse() throws Exception {
WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
- assert dao.findWikiNode(11l).getRating() == 4;
+ assert dao.findWikiNode(12l).getRating() == 4;
}
}.run();
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-03
14:18:57 UTC (rev 7346)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/TrashTests.java 2008-02-03
15:01:48 UTC (rev 7347)
@@ -12,13 +12,9 @@
import org.jboss.seam.wiki.core.action.DirectoryHome;
import org.jboss.seam.wiki.core.action.UploadHome;
import org.jboss.seam.wiki.core.action.PreferenceEditor;
-import org.jboss.seam.wiki.core.model.WikiDirectory;
-import org.jboss.seam.wiki.core.model.WikiDocument;
-import org.jboss.seam.wiki.core.model.WikiFeed;
-import org.jboss.seam.wiki.core.model.FeedEntry;
+import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
-import org.jboss.seam.wiki.preferences.PreferenceProvider;
import org.jboss.seam.wiki.preferences.PreferenceValue;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceRegistry;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
@@ -331,6 +327,93 @@
}.run();
}
+ @Test
+ public void trashDocumentInDirBrowser() throws Exception {
+
+ new FacesRequest("/dirDisplay_d.xhtml") {
+
+ protected void beforeRequest() {
+ setParameter("directoryId", "2");
+ }
+
+ protected void invokeApplication() throws Exception {
+ DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
+ assert dirHome.getInstance().getId().equals(2l); // Init!
+ assert dirHome.getChildNodes().size() == 3;
+
+ boolean found = false;
+ for (WikiNode node : dirHome.getChildNodes()) found =
node.getId().equals(9l);
+ assert found;
+
+ DocumentHome docHome = (DocumentHome)getInstance(DocumentHome.class);
+ assert docHome.remove(9l).equals("removed");
+ }
+
+ // Feed entries should be gone
+ protected void renderResponse() throws Exception {
+ WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
+ WikiDocument document = nodeDAO.findWikiDocument(9l);
+
+ FeedDAO feedDAO = (FeedDAO)getInstance(FeedDAO.class);
+
+ List<WikiFeed> feeds = feedDAO.findFeeds(document);
+ assert feeds.size() == 0;
+ }
+ }.run();
+
+ loginAdmin();
+
+ new NonFacesRequest("/wiki.xhtml") {
+
+ protected void beforeRequest() {
+ setParameter("areaName", "Trash");
+ }
+
+ protected void renderResponse() throws Exception {
+ DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
+ assert dirHome.getInstance().getId().equals(17l); // Init!
+
+ assert dirHome.getChildNodes().size() == 1;
+ assert dirHome.getChildNodes().get(0).getId().equals(9l);
+
+ assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
+ }
+ }.run();
+
+ new FacesRequest("/dirDisplay_d.xhtml") {
+
+ protected void beforeRequest() {
+ setParameter("directoryId", "17");
+ }
+
+ protected void invokeApplication() throws Exception {
+ DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
+ assert dirHome.getInstance().getId().equals(17l); // Init!
+ dirHome.emptyTrash();
+ }
+ }.run();
+
+ new NonFacesRequest("/wiki.xhtml") {
+
+ protected void beforeRequest() {
+ setParameter("areaName", "Trash");
+ }
+
+ protected void renderResponse() throws Exception {
+ DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
+ assert dirHome.getInstance().getId().equals(17l); // Init!
+
+ assert dirHome.getChildNodes().size() == 0;
+
+ WikiNodeDAO dao = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
+ assert dao.findWikiNode(9l) == null;
+
+ assert getRenderedViewId().equals("/dirDisplay_d.xhtml");
+
+ }
+ }.run();
+ }
+
private void loginAdmin() throws Exception {
new FacesRequest() {
protected void invokeApplication() throws Exception {
Modified: trunk/examples/wiki/view/adminHome_d.xhtml
===================================================================
--- trunk/examples/wiki/view/adminHome_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/adminHome_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -6,7 +6,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:wiki="http://jboss.com/products/seam/wiki"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -5,6 +5,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
<ui:define
name="screenname">#{directoryHome.instance.name}</ui:define>
@@ -15,7 +16,7 @@
<s:link id="createDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.CreateSubdirectory.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.CreateSubdirectory']}"/>
<f:param name="directoryId"/>
@@ -24,14 +25,14 @@
<s:link id="editDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDirectory.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditDirectory']}"/>
</s:link>
<s:link id="createDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}"
- view="/docEdit_#{skin}.xhtml"
+ view="/docEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewDocument']}"/>
<f:param name="documentId"/>
@@ -40,7 +41,7 @@
<s:link id="uploadFile" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.UploadFile.accesskey']}"
- view="/uploadCreate_#{skin}.xhtml"
+ view="/uploadCreate_#{skin}.xhtml"
propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.UploadFile']}"/>
<f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
@@ -51,7 +52,7 @@
<s:fragment rendered="#{empty directoryHome.parentNode}">
<s:link id="createArea" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewArea.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewArea']}"/>
<f:param name="directoryId"/>
@@ -60,7 +61,7 @@
<s:link id="editRoot" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditWikiRoot.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditWikiRoot']}"/>
<f:param name="parentDirectoryId"/>
@@ -107,7 +108,7 @@
<s:fragment>
<h:panelGroup styleClass="undecoratedLink"
- rendered="#{childNodesList.size > 0 and
directoryHome.instance.id != wikiRoot.id}">
+ rendered="#{directoryHome.childNodes.size() > 0 and
directoryHome.instance.id != wikiRoot.id}">
<h:outputText
value="#{messages['lacewiki.label.Clipboard.Select']}: "/>
<h:outputLink value="#"
onclick="selectCheckBoxes('wikiFileSelect'); switchClipboardControl();"
tabindex="1">
<h:outputText
value="#{messages['lacewiki.label.Clipboard.All']}"/>
@@ -189,7 +190,8 @@
<h:outputText value="/"
styleClass="directorySeparator"/>
<ui:repeat var="directory"
value="#{directoryHome.instance.path}">
- <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{directory.name}" styleClass="directoryButton"
tabindex="1">
+ <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{directory.name}" propagation="none"
+ styleClass="directoryButton"
tabindex="1">
<f:param name="directoryId"
value="#{directory.id}"/>
</s:link>
@@ -198,7 +200,7 @@
</ui:repeat>
</h:panelGroup>
- <h:panelGroup rendered="#{childNodesList.size > 0}"
styleClass="smallFont">
+ <h:panelGroup rendered="#{directoryHome.childNodes.size() > 0}"
styleClass="smallFont">
<h:outputText
value="#{messages['lacewiki.label.dirDisplay.ShowItems']}: "/>
<h:selectOneMenu value="#{directoryHome.pager.pageSize}"
tabindex="1">
<f:selectItem itemLabel="5" itemValue="5"/>
@@ -215,8 +217,8 @@
</h:panelGrid>
- <s:div styleClass="directoryEmpty" rendered="#{childNodesList.size
== 0}">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="."
+ <s:div styleClass="directoryEmpty"
rendered="#{directoryHome.childNodes.size() == 0}">
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="." propagation="none"
rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
<f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
<h:panelGrid columns="2">
@@ -229,13 +231,13 @@
</s:div>
- <h:panelGrid columns="5" rendered="#{childNodesList.size > 0 and
directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
+ <h:panelGrid columns="5"
rendered="#{directoryHome.childNodes.size() > 0 and
directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
styleClass="pager pagerTop"
columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
cellpadding="0" cellspacing="0"
border="0">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.previousPageAvailable}">
<f:param name="page" value="0"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
@@ -244,7 +246,7 @@
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
rendered="#{!directoryHome.pager.previousPageAvailable}"/>
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.previousPageAvailable}">
<f:param name="page"
value="#{directoryHome.pager.previousPage}"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
@@ -260,7 +262,7 @@
#{directoryHome.pager.numOfRecords}
#{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
</s:span>
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.nextPageAvailable}">
<f:param name="page"
value="#{directoryHome.pager.nextPage}"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
@@ -269,7 +271,7 @@
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
rendered="#{!directoryHome.pager.nextPageAvailable}"/>
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.nextPageAvailable}">
<f:param name="page"
value="#{directoryHome.pager.lastPage}"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
@@ -281,8 +283,8 @@
</h:panelGrid>
<h:dataTable id="dirTable" var="node"
- value="#{childNodesList}"
- rendered="#{childNodesList.size > 0}"
+ value="#{directoryHome.childNodes}"
+ rendered="#{directoryHome.childNodes.size() > 0}"
styleClass="datatable topLeftBottomBorder smallFont"
headerClass="regularHeader rightBorder alignCenter"
columnClasses="onePercentColumn rightBorder alignCenter,
onePercentColumn rightBorder alignCenter,
@@ -311,7 +313,7 @@
</h:column>
<h:column>
<f:facet name="header">
- <s:link view="/dirDisplay_#{skin}.xhtml"
tabindex="1" accesskey="."
+ <s:link view="/dirDisplay_#{skin}.xhtml"
tabindex="1" accesskey="." propagation="none"
rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
<f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/icon.dirup.gif"
width="18" height="20"/>
@@ -354,22 +356,28 @@
<s:fragment
rendered="#{node.isInstance('WikiDirectory')}">
<s:fragment
rendered="#{s:hasPermission('Node','read',node)}">
- <s:link id="directoryLink"
value="#{wiki:truncateString(node.name, 40, '...')}"
+ <s:link id="directoryLink"
value="#{wiki:truncateString(node.name, 40, '...')}"
propagation="none"
view="/dirDisplay_#{skin}.xhtml"
tabindex="1">
<f:param name="directoryId"
value="#{node.id}"/>
</s:link>
<s:div id="directoryMenu"
styleClass="contextMenu">
<ul>
- <li class="undecoratedLink">
+ <li class="undecoratedLink
noWrapWhitespace">
<h:outputLink
value="#{wiki:renderURL(node)}">
<h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
</h:outputLink>
</li>
+ <li class="undecoratedLink
noWrapWhitespace">
+ <h:outputLink
value="#{wiki:renderURL(node)}" target="_blank">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
+ </h:outputLink>
+ </li>
+
<s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
<li class="undecoratedLink">
- <s:link
view="/dirEdit_#{skin}.xhtml">
+ <s:link view="/dirEdit_#{skin}.xhtml"
propagation="none">
<f:param name="directoryId"
value="#{node.id}"/>
<h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
</s:link>
@@ -400,15 +408,32 @@
<s:div id="documentMenu"
styleClass="contextMenu">
<ul>
- <li class="undecoratedLink">
+ <li class="undecoratedLink
noWrapWhitespace">
<h:outputLink
value="#{wiki:renderURL(node)}">
<h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
</h:outputLink>
</li>
+ <li class="undecoratedLink
noWrapWhitespace">
+ <h:outputLink
value="#{wiki:renderURL(node)}" target="_blank">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
+ </h:outputLink>
+ </li>
+
+ <s:fragment
rendered="#{directoryHome.isRemovable(node)}">
+ <a:jsFunction
name="deleteDocumentId#{node.id}"
+
action="#{documentHome.remove(node.id)}"/>
+ <li class="undecoratedLink
noWrapWhitespace">
+ <h:outputLink value="#"
+
onclick="deleteConfirmation('\\'#{node.name}\\'',
'deleteDocumentId#{node.id}')">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
+ </h:outputLink>
+ </li>
+ </s:fragment>
+
<s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink">
- <s:link
view="/docEdit_#{skin}.xhtml">
+ <li class="undecoratedLink
noWrapWhitespace">
+ <s:link view="/docEdit_#{skin}.xhtml"
propagation="none">
<f:param name="documentId"
value="#{node.id}"/>
<h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
</s:link>
@@ -437,15 +462,32 @@
<s:div id="uploadMenu"
styleClass="contextMenu">
<ul>
- <li class="undecoratedLink">
+ <li class="undecoratedLink
noWrapWhitespace">
<h:outputLink
value="#{wiki:renderURL(node)}">
<h:outputText
value="#{messages['lacewiki.button.dirDisplay.View']}"/>
</h:outputLink>
</li>
+ <li class="undecoratedLink
noWrapWhitespace">
+ <h:outputLink
value="#{wiki:renderURL(node)}" target="_blank">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
+ </h:outputLink>
+ </li>
+
+ <s:fragment
rendered="#{directoryHome.isRemovable(node)}">
+ <a:jsFunction
name="deleteUploadId#{node.id}"
+
action="#{uploadHome.remove(node.id)}"/>
+ <li class="undecoratedLink
noWrapWhitespace">
+ <h:outputLink value="#"
+
onclick="deleteConfirmation('\\'#{node.name}\\'',
'deleteUploadId#{node.id}')">
+ <h:outputText
value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
+ </h:outputLink>
+ </li>
+ </s:fragment>
+
<s:fragment
rendered="#{s:hasPermission('Node', 'edit', node)}">
- <li class="undecoratedLink">
- <s:link
view="/uploadEdit_#{skin}.xhtml">
+ <li class="undecoratedLink
noWrapWhitespace">
+ <s:link view="/uploadEdit_#{skin}.xhtml"
propagation="none">
<f:param name="uploadId"
value="#{node.id}"/>
<h:outputText
value="#{messages['lacewiki.button.dirDisplay.Edit']}"/>
</s:link>
@@ -516,13 +558,13 @@
</h:dataTable>
- <h:panelGrid columns="5" rendered="#{childNodesList.size > 0 and
directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
+ <h:panelGrid columns="5"
rendered="#{directoryHome.childNodes.size() > 0 and
directoryHome.pager.numOfRecords > directoryHome.pager.pageSize}"
styleClass="pager pagerBottom"
columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
cellpadding="0" cellspacing="0"
border="0">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.previousPageAvailable}">
<f:param name="page" value="0"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
@@ -531,7 +573,7 @@
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
rendered="#{!directoryHome.pager.previousPageAvailable}"/>
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.previousPageAvailable}">
<f:param name="page"
value="#{directoryHome.pager.previousPage}"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
@@ -547,7 +589,7 @@
#{directoryHome.pager.numOfRecords}
#{messages['lacewiki.label.dirDisplay.PagerElements']}"/>
</s:span>
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.nextPageAvailable}">
<f:param name="page"
value="#{directoryHome.pager.nextPage}"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
@@ -556,7 +598,7 @@
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
rendered="#{!directoryHome.pager.nextPageAvailable}"/>
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
target="_top"
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
propagation="none"
rendered="#{directoryHome.pager.nextPageAvailable}">
<f:param name="page"
value="#{directoryHome.pager.lastPage}"/>
<f:param name="pageSize"
value="#{directoryHome.pager.pageSize}"/>
Modified: trunk/examples/wiki/view/dirDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -16,7 +16,7 @@
<s:link id="createDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.CreateSubdirectory.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.CreateSubdirectory']}"/>
<f:param name="directoryId"/>
@@ -25,14 +25,14 @@
 
<s:link id="editDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDirectory.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditDirectory']}"/>
</s:link>
 
<s:link id="createDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewDocument.accesskey']}"
- view="/docEdit_#{skin}.xhtml"
+ view="/docEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewDocument']}"/>
<f:param name="documentId"/>
@@ -41,7 +41,7 @@
 
<s:link id="uploadFile" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.UploadFile.accesskey']}"
- view="/uploadCreate_#{skin}.xhtml"
+ view="/uploadCreate_#{skin}.xhtml"
propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.UploadFile']}"/>
<f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
@@ -53,7 +53,7 @@
<s:fragment rendered="#{empty directoryHome.parentNode}">
<s:link id="createArea" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.NewArea.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'create',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.NewArea']}"/>
<f:param name="directoryId"/>
@@ -62,7 +62,7 @@
<s:link id="editRoot" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditWikiRoot.accesskey']}"
- view="/dirEdit_#{skin}.xhtml"
+ view="/dirEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'edit',
directoryHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditWikiRoot']}"/>
<f:param name="parentDirectoryId"/>
@@ -81,14 +81,16 @@
<div class="directoryPathPanel">
- <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{wikiRoot.name}" styleClass="directoryButton"
tabindex="1">
+ <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{wikiRoot.name}" propagation="none"
+ styleClass="directoryButton" tabindex="1">
<f:param name="directoryId" value="#{wikiRoot.id}"/>
</s:link>
<h:outputText value="/" styleClass="directorySeparator"/>
<h:panelGroup>
<ui:repeat var="directory" value="#{breadcrumb}">
- <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{directory.name}" styleClass="directoryButton"
tabindex="1">
+ <s:link view="/dirDisplay_#{skin}.xhtml"
value="#{directory.name}" propagation="none"
+ styleClass="directoryButton" tabindex="1">
<f:param name="directoryId"
value="#{directory.id}"/>
</s:link>
<h:outputText value="/"
styleClass="directorySeparator" rendered="#{directory !=
directoryHome.instance}"/>
@@ -97,7 +99,7 @@
</div>
<s:div styleClass="directoryEmpty" rendered="#{empty
directoryHome.childNodes}">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="."
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="." propagation="none"
rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
<f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
<h:panelGrid columns="2">
@@ -123,7 +125,7 @@
<h:column>
<f:facet name="header">
- <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="."
+ <s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1"
accesskey="." propagation="none"
rendered="#{!empty directoryHome.parentNode and
s:hasPermission('Node','read',directoryHome.parentNode)}">
<f:param name="directoryId"
value="#{directoryHome.parentNode.id}"/>
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/icon.dirup.gif"
width="18" height="20"/>
@@ -151,7 +153,7 @@
<s:span rendered="#{node.isInstance('WikiDirectory')}">
<s:link id="browseDirectory"
value="#{wiki:truncateString(node.name, 40, '...')}"
- view="/dirDisplay_#{skin}.xhtml"
+ view="/dirDisplay_#{skin}.xhtml"
propagation="none"
rendered="#{s:hasPermission('Node','read',node)}"
tabindex="2">
<f:param name="directoryId"
value="#{node.id}"/>
</s:link>
@@ -166,7 +168,8 @@
</s:span>
<s:span rendered="#{node.isInstance('WikiUpload') and
s:hasPermission('Node', 'edit', node)}">
- <s:link id="editFile"
value="#{wiki:truncateString(node.name, 30, '...')}"
tabindex="2" view="/uploadEdit_#{skin}.xhtml">
+ <s:link id="editFile"
value="#{wiki:truncateString(node.name, 30, '...')}"
+ tabindex="2" view="/uploadEdit_#{skin}.xhtml"
propagation="none">
<f:param name="uploadId" value="#{node.id}"/>
<f:param name="parentDirectoryId"
value="#{directoryHome.instance.id}"/>
</s:link>
Modified: trunk/examples/wiki/view/docDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/docDisplay_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -29,7 +29,7 @@
<s:link id="createDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.CreateDocument.accesskey']}"
- view="/docEdit_#{skin}.xhtml"
+ view="/docEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'create',
documentHome.instance.parent)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.CreateDocument']}"/>
<f:param name="documentId" value=""/>
@@ -38,14 +38,14 @@
<s:link id="editDoc" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.EditDocument.accesskey']}"
- view="/docEdit_#{skin}.xhtml"
+ view="/docEdit_#{skin}.xhtml" propagation="none"
rendered="#{s:hasPermission('Node', 'edit',
documentHome.instance)}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditDocument']}"/>
</s:link>
<s:link id="showHistory" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.HistoryDocument.accesskey']}"
- view="/docHistory_#{skin}.xhtml"
+ view="/docHistory_#{skin}.xhtml" propagation="none"
rendered="#{documentHome.historicalFilesPresent}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.HistoryDocument']}"/>
<f:param name="fileId"
value="#{documentHome.nodeId}"/>
@@ -53,7 +53,7 @@
<s:link id="browseDir" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.BrowseDirectory.accesskey']}"
- view="/dirDisplay_#{skin}.xhtml">
+ view="/dirDisplay_#{skin}.xhtml"
propagation="none">
<h:outputText escape="false"
value="#{messages['lacewiki.button.BrowseDirectory']}"/>
<f:param name="directoryId"
value="#{documentHome.instance.parent.id}"/>
</s:link>
@@ -124,7 +124,7 @@
<s:div>
#{messages['lacewiki.label.docDisplay.Tags']}: 
<ui:repeat var="tag"
value="#{documentHome.instance.tagsAsList}">
- <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tag}">
+ <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tag}" propagation="none">
<f:param value="#{tag}" name="tag"/>
</s:link>
@@ -179,7 +179,7 @@
<h:outputText
value="(#{messages['lacewiki.label.docDisplay.InitialRevision']})"/>
</s:fragment>
 
- <s:link view="/docHistory_#{skin}.xhtml"
action="#{documentHistory.diff}">
+ <s:link view="/docHistory_#{skin}.xhtml"
action="#{documentHistory.diff}" propagation="none">
<h:outputText
value="#{messages['lacewiki.label.docDisplay.Diff']}"/>
<f:param name="fileId"
value="#{documentHome.instance.id}"/>
<f:param name="historicalFileId"
value="#{hfile.historicalFileId}"/>
@@ -207,14 +207,14 @@
<s:fragment rendered="#{not commentHome.showForm and
s:hasPermission('Comment', 'create', documentHome.instance)}">
- <s:link tabindex="102"
+ <s:link tabindex="102"
propagation="none"
action="#{commentHome.replyTo()}"
styleClass="buttonNonpersistent">
<f:param name="parentCommentId"
value="#{c.id}"/>
<h:outputText styleClass="buttonLabel"
value="#{messages['lacewiki.button.commentsDisplay.ReplyTo']}"/>
</s:link>
- <s:link tabindex="102"
+ <s:link tabindex="102"
propagation="none"
action="#{commentHome.quote()}"
styleClass="buttonNonpersistent">
<f:param name="parentCommentId"
value="#{c.id}"/>
Modified: trunk/examples/wiki/view/docDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_m.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/docDisplay_m.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -17,7 +17,8 @@
<s:link id="createDoc" styleClass="linkNavigation"
view="/docEdit_#{skin}.xhtml"
accesskey="#{messages['lacewiki.button.CreateDocument.accesskey']}"
- rendered="#{s:hasPermission('Node', 'create',
documentHome.instance.parent)}">
+ rendered="#{s:hasPermission('Node', 'create',
documentHome.instance.parent)}"
+ propagation="none">
<h:outputText escape="false"
value="#{messages['lacewiki.button.CreateDocument']}"/>
<f:param name="documentId" value=""/>
<f:param name="parentDirectoryId"
value="#{documentHome.instance.parent.id}"/>
@@ -25,20 +26,23 @@
 
<s:link id="editDoc" styleClass="linkNavigation"
view="/docEdit_#{skin}.xhtml"
accesskey="#{messages['lacewiki.button.EditDocument.accesskey']}"
- rendered="#{s:hasPermission('Node', 'edit',
documentHome.instance)}">
+ rendered="#{s:hasPermission('Node', 'edit',
documentHome.instance)}"
+ propagation="none">
<h:outputText escape="false"
value="#{messages['lacewiki.button.EditDocument']}"/>
</s:link>
 
<s:link id="showHistory" styleClass="linkNavigation"
accesskey="#{messages['lacewiki.button.HistoryDocument.accesskey']}"
view="/docHistory_#{skin}.xhtml"
- rendered="#{documentHome.historicalFilesPresent}">
+ rendered="#{documentHome.historicalFilesPresent}"
+ propagation="none">
<h:outputText escape="false"
value="#{messages['lacewiki.button.HistoryDocument']}"/>
<f:param name="fileId"
value="#{documentHome.nodeId}"/>
</s:link>
 
<s:link id="browseDir" styleClass="linkNavigation"
view="/dirDisplay_#{skin}.xhtml"
-
accesskey="#{messages['lacewiki.button.BrowseDirectory.accesskey']}">
+
accesskey="#{messages['lacewiki.button.BrowseDirectory.accesskey']}"
+ propagation="none">
<h:outputText escape="false"
value="#{messages['lacewiki.button.BrowseDirectory']}"/>
<f:param name="directoryId"
value="#{documentHome.instance.parent.id}"/>
</s:link>
@@ -176,7 +180,7 @@
<s:div>
#{messages['lacewiki.label.docDisplay.Tags']}: 
<ui:repeat var="tag"
value="#{documentHome.instance.tagsAsList}">
- <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tag}">
+ <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tag}" propagation="none">
<f:param value="#{tag}" name="tag"/>
</s:link>
Modified: trunk/examples/wiki/view/docHistory_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docHistory_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/docHistory_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -166,7 +166,8 @@
<s:div id="documentDisplayContainer"
rendered="#{not empty documentHistory.displayedHistoricalFile}"
styleClass="box">
- <s:div rendered="#{documentHistory.displayedHistoricalFile.name !=
documentHistory.currentFile.name}">
+ <s:div styleClass="diffChangedName"
+ rendered="#{documentHistory.displayedHistoricalFile.name !=
documentHistory.currentFile.name}">
<h:outputText value="Revision document name:
#{documentHistory.displayedHistoricalFile.name}"/>
<hr/>
</s:div>
Modified: trunk/examples/wiki/view/includes/commentForm.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentForm.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/includes/commentForm.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -1,4 +1,4 @@
-<s:div styleClass="box" style="margin-top:25px"
+<s:div styleClass="box"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
@@ -32,7 +32,7 @@
</s:fragment>
<s:link tabindex="102"
rendered="#{!commentHome.showForm}"
- action="#{commentHome.newComment()}"
+ action="#{commentHome.newComment()}"
propagation="none"
accesskey="#{messages['lacewiki.button.commentForm.PostComment.accesskey']}"
styleClass="buttonNonpersistent">
<h:outputText escape="false"
styleClass="buttonLabel"
Modified: trunk/examples/wiki/view/includes/commentsDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -1,4 +1,4 @@
-<s:span id="comments" styleClass="commentsDisplay"
+<s:div id="comments" styleClass="commentsDisplay"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
@@ -141,5 +141,5 @@
</h:panelGrid>
</s:div>
-</s:span>
+</s:div>
Modified: trunk/examples/wiki/view/includes/directorySelector.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directorySelector.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/includes/directorySelector.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -5,7 +5,6 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:wiki="http://jboss.com/products/seam/wiki"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<!--
<ui:param name="dialogId"
value="dialogDirectorySelection"/>
Deleted: trunk/examples/wiki/view/includes/languageSelector.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/languageSelector.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/includes/languageSelector.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -1,18 +0,0 @@
-<div id="languageSelector"
-
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:s="http://jboss.com/products/seam/taglib">
-
- <h:form>
- <h:panelGroup>
- <h:outputText styleClass="languageSelectorLabel"
value="#{messages['Language']}"/>:
-
- <h:commandLink styleClass="languageSelectorLink"
value="EN"
action="#{localeSelector.selectLanguage('en')}"/><span
class="languageSelectorSeparator">|</span>
-
- <h:commandLink styleClass="languageSelectorLink"
value="DE"
action="#{localeSelector.selectLanguage('de')}"/>
- </h:panelGroup>
- </h:form>
-
-</div>
\ No newline at end of file
Modified: trunk/examples/wiki/view/includes/ownerSelector.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/ownerSelector.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/includes/ownerSelector.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -4,8 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:wiki="http://jboss.com/products/seam/wiki"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/">
+
xmlns:wiki="http://jboss.com/products/seam/wiki">
<ui:param name="dialogId" value="dialogOwnerSelection"/>
<ui:define name="dialogInit">
@@ -66,7 +65,7 @@
</h:panelGrid>
</div>
- <s:div id="userPager" style="margin-top:10px;">
+ <s:div id="userPager">
<h:panelGrid columns="5" styleClass="pager pagerTop"
columnClasses="pagerIconColumn,pagerIconColumn,pagerTextColumn,pagerIconColumn,pagerIconColumn"
cellpadding="0" cellspacing="0"
border="0"
Modified: trunk/examples/wiki/view/includes/userControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userControl.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/includes/userControl.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -131,6 +131,7 @@
<h:outputText styleClass="label"
value="(#{currentUser.fullname})"/>
<s:link styleClass="link" action="#{authenticator.logout}"
tabindex="70"
+ propagation="none"
accesskey="#{messages['lacewiki.button.userControl.Logout.accesskey']}">
<h:outputText styleClass="linkText" escape="false"
value="#{messages['lacewiki.button.userControl.Logout']}"/>
</s:link>
Modified: trunk/examples/wiki/view/includes/userInfo.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfo.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/includes/userInfo.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -12,7 +12,7 @@
<div class="boxHeader">
<h:outputText value="#{user.fullname}"/>
- <s:div rendered="#{wiki:showEmailAddress()}">
+ <s:div styleClass="userInfoEmail smallFont"
rendered="#{wiki:showEmailAddress()}">
<h:outputLink
value="#{wiki:escapeEmailURL(wiki:concat('mailto:', user.email))}">
<h:outputText
value="#{wiki:escapeAtSymbol(user.email)}"/>
</h:outputLink>
Modified: trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -12,16 +12,17 @@
<s:div styleClass="blogArchive">
- <s:div styleClass="boxHeader" rendered="#{not
preferences.get('Blog').archiveSubscribeIcon}">
+ <s:div styleClass="boxHeader" rendered="#{not
preferences.get('Blog', currentMacro).archiveSubscribeIcon}">
<h:outputText rendered="#{empty param.tag}"
value="#{messages['blogArchive.label.Archive']}"/>
<h:outputText rendered="#{not empty param.tag}"
value="#{messages['blogArchive.label.Archive']}
'#{param.tag}'"/>
</s:div>
- <h:panelGrid
rendered="#{preferences.get('Blog').archiveSubscribeIcon}"
+ <h:panelGrid rendered="#{preferences.get('Blog',
currentMacro).archiveSubscribeIcon}"
columns="2" cellpadding="0"
cellspacing="0" border="0"
styleClass="boxHeader fullWidth">
- <h:panelGrid rendered="#{not empty currentDirectory.feed}"
columns="2" cellpadding="0" cellspacing="0"
border="0">
+ <h:panelGrid styleClass="smallFont" rendered="#{not
empty currentDirectory.feed}" columns="2"
+ cellpadding="2" cellspacing="0"
border="0">
<h:outputLink
value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}">
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/icon.atom.ongrey.gif"
width="18" height="18" alt="Atom"/>
</h:outputLink>
@@ -31,14 +32,14 @@
</h:panelGrid>
<h:outputText rendered="#{empty param.tag}"
value="#{messages['blogArchive.label.Archive']}"/>
- <h:outputText rendered="#{not empty param.tag}"
value="#{messages['blogArchive.label.Archive']}
'#{blogDirectory.tag}'"/>
+ <h:outputText rendered="#{not empty param.tag}"
value="#{messages['blogArchive.label.Archive']}
'#{param.tag}'"/>
</h:panelGrid>
<div class="blogArchiveSelector boxContent">
<select id="blogArchiveCombo"
class="blogArchiveCombo"
onchange="top.location.href =
jQuery('#blogArchiveCombo')[0].options[jQuery('#blogArchiveCombo')[0].selectedIndex].value;">
- <option
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.tagUrl}">#{messages['blogArchive.label.AllEntries']}
(#{blogDirectory.totalNumOfBlogEntries})</option>
+ <option
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.tagUrl}">#{messages['blogArchive.label.AllEntries']}
(#{blogDirectory.pager.numOfRecords})</option>
<ui:repeat var="beCount"
value="#{blogDirectory.blogEntryCountsByYearAndMonth}">
<s:fragment rendered="#{blogDirectory.dateUrl !=
beCount.asString}">
<option
value="#{wiki:renderURL(currentDocument)}#{beCount.asString}#{blogDirectory.tagUrl}">
Modified: trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml 2008-02-03 14:18:57 UTC
(rev 7346)
+++ trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml 2008-02-03 15:01:48 UTC
(rev 7347)
@@ -16,25 +16,33 @@
<div class="box blogEntryContainer">
- <div class="blogEntryHeader">
- <h:outputText
value="#{blogEntry.entryDocument.name}"/>
- <div class="undecoratedLink">
- <h:outputText
styleClass="blogEntryCreatedOnText"
value="#{blogEntry.entryDocument.createdOn}">
+ <div class="boxHeader blogEntryHeader">
+
+ <div class="title">
+ <h:outputText
value="#{blogEntry.entryDocument.name}"/>
+ </div>
+
+ <div class="dateAuthor smallFont">
+ <h:outputText
value="#{blogEntry.entryDocument.createdOn}">
<f:convertDateTime pattern="dd. MMM yyyy,
HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
<h:outputText
value=" #{preferences.get('Wiki').timeZone}"/>
<h:outputText
value=", by "/>
- <h:outputLink
value="#{wiki:renderURL(blogEntry.entryDocument.createdBy.memberHome)}"
target="_top"
- rendered="#{!empty
blogEntry.entryDocument.createdBy.memberHome}">
- <h:outputText
styleClass="blogEntryCreatedByLink"
-
value="#{blogEntry.entryDocument.createdBy.fullname}"/>
- </h:outputLink>
- <h:outputText rendered="#{empty
blogEntry.entryDocument.createdBy.memberHome}"
-
value="#{blogEntry.entryDocument.createdBy.fullname}"/>
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink
value="#{wiki:renderURL(blogEntry.entryDocument.createdBy.memberHome)}"
target="_top"
+ rendered="#{!empty
blogEntry.entryDocument.createdBy.memberHome}">
+ <h:outputText
value="#{blogEntry.entryDocument.createdBy.fullname}"/>
+ </h:outputLink>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(blogEntry.entryDocument.createdBy)}"
target="_top"
+ rendered="#{empty
blogEntry.entryDocument.createdBy.memberHome}">
+ <h:outputText
value="#{blogEntry.entryDocument.createdBy.fullname}"/>
+ </h:outputLink>
+ </s:span>
</div>
+
</div>
- <div class="blogEntryContent">
+ <div class="boxContent blogEntryContent">
<wiki:formattedText
value="#{blogEntry.entryDocument.content}"
linkStyleClass="regularLink"
brokenLinkStyleClass="brokenLink"
@@ -46,23 +54,24 @@
linkBaseFile="#{blogEntry.entryDocument}"
currentAreaNumber="#{currentDirectory.areaNumber}"
enablePlugins="true"/>
- </div>
- <s:div rendered="#{preferences.get('Wiki').showTags
and not blogEntry.entryDocument.macroPresent('hideTags') and not empty
blogEntry.entryDocument.tags}"
- styleClass="documentTags undecoratedLink">
- <s:div>
-
#{messages['lacewiki.label.docDisplay.Tags']}: 
- <ui:repeat var="tag"
value="#{blogEntry.entryDocument.tagsSplit}">
- <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tag}">
- <f:param value="#{tag}"
name="tag"/>
- </s:link>
-
- <h:outputText
rendered="#{blogEntry.entryDocument.tagsSplit.indexOf(tag) <
blogEntry.entryDocument.tagsSplit.size()-1}"
-
value=" | "/>
- </ui:repeat>
+ <s:div
rendered="#{preferences.get('Wiki').showTags and not
blogEntry.entryDocument.macroPresent('hideTags') and not empty
blogEntry.entryDocument.tags}"
+ styleClass="documentTags undecoratedLink">
+ <s:div>
+ <h:outputText
rendered="#{blogEntry.tagsAsList.size()==1}"
value="#{messages['blogDirectory.label.Tag']}: "/>
+ <h:outputText
rendered="#{blogEntry.tagsAsList.size()>1}"
value="#{messages['blogDirectory.label.Tags']}: "/>
+ <ui:repeat var="tag"
value="#{blogEntry.tagsAsList}">
+ <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tag}" propagation="none">
+ <f:param value="#{tag}"
name="tag"/>
+ </s:link>
+ <h:outputText
rendered="#{blogEntry.tagsAsList.indexOf(tag) <
blogEntry.tagsAsList.size()-1}"
+
value=" | "/>
+ </ui:repeat>
+ </s:div>
</s:div>
- </s:div>
+ </div>
+
<div class="boxFooter blogEntryFooter">
<h:panelGrid styleClass="blogEntryFooterTable"
columns="5" cellpadding="0" cellspacing="0"
border="0">
<s:div styleClass="blogEntryCommentCount
undecoratedLink"
@@ -111,36 +120,37 @@
<div class="blogEntrySeparator"/>
</c:forEach>
+
</s:div>
- <h:panelGrid columns="5"
rendered="#{blogDirectory.numOfBlogEntries >
preferences.get('Blog').pageSize}"
+ <h:panelGrid columns="5"
rendered="#{blogDirectory.pager.numOfRecords >
blogDirectory.pager.pageSize}"
styleClass="blogPagerTable"
columnClasses="blogPagerColumn, blogPagerColumn,
blogPagerTextColumn, blogPagerColumn, blogPagerColumn, "
cellpadding="0" cellspacing="0"
border="0">
- <h:outputLink rendered="#{blogDirectory.previousPageAvailable}"
target="_top"
+ <h:outputLink
rendered="#{blogDirectory.pager.previousPageAvailable}" target="_top"
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}#{blogDirectory.tagUrl}">
<div style="width:30px;">
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/page.first.gif"
width="13" height="11"/>
</div>
</h:outputLink>
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
-
rendered="#{!blogDirectory.previousPageAvailable}"/>
+
rendered="#{!blogDirectory.pager.previousPageAvailable}"/>
- <h:outputLink rendered="#{blogDirectory.previousPageAvailable}"
target="_top"
-
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.previousPage}#{blogDirectory.tagUrl}">
+ <h:outputLink
rendered="#{blogDirectory.pager.previousPageAvailable}" target="_top"
+
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.previousPage}#{blogDirectory.tagUrl}">
<div style="width:30px;">
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/page.previous.gif"
width="13" height="11"/>
</div>
</h:outputLink>
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
-
rendered="#{!blogDirectory.previousPageAvailable}"/>
+
rendered="#{!blogDirectory.pager.previousPageAvailable}"/>
<s:span>
<h:outputText
value="#{messages['blogDirectory.label.Showing']}
- #{blogDirectory.firstRow}
#{messages['blogDirectory.label.To']}
- #{blogDirectory.lastRow}
#{messages['blogDirectory.label.Of']}
- #{blogDirectory.numOfBlogEntries}
#{messages['blogDirectory.label.BlogEntries']}"/>
+ #{blogDirectory.pager.firstRecord}
#{messages['blogDirectory.label.To']}
+ #{blogDirectory.pager.lastRecord}
#{messages['blogDirectory.label.Of']}
+ #{blogDirectory.pager.numOfRecords}
#{messages['blogDirectory.label.BlogEntries']}"/>
<h:outputText rendered="#{!empty param.day || !empty param.month
|| !empty param.year}"
value=" #{messages['blogDirectory.label.In']}"/>
@@ -150,23 +160,23 @@
<h:outputText rendered="#{!empty param.tag}"
value=" #{messages['blogDirectory.label.Tagged']}
'#{param.tag}'"/>
</s:span>
- <h:outputLink rendered="#{blogDirectory.nextPageAvailable}"
target="_top"
-
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.nextPage}#{blogDirectory.tagUrl}">
+ <h:outputLink
rendered="#{blogDirectory.pager.nextPageAvailable}" target="_top"
+
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.nextPage}#{blogDirectory.tagUrl}">
<div style="width:30px;">
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/page.next.gif"
width="13" height="11"/>
</div>
</h:outputLink>
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
-
rendered="#{!blogDirectory.nextPageAvailable}"/>
+
rendered="#{!blogDirectory.pager.nextPageAvailable}"/>
- <h:outputLink rendered="#{blogDirectory.nextPageAvailable}"
target="_top"
-
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.lastPage}#{blogDirectory.tagUrl}">
+ <h:outputLink
rendered="#{blogDirectory.pager.nextPageAvailable}" target="_top"
+
value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.lastPage}#{blogDirectory.tagUrl}">
<div style="width:30px;">
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/page.last.gif"
width="13" height="11"/>
</div>
</h:outputLink>
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/blank.gif"
width="13" height="11"
-
rendered="#{!blogDirectory.nextPageAvailable}"/>
+
rendered="#{!blogDirectory.pager.nextPageAvailable}"/>
</h:panelGrid>
Modified: trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml 2008-02-03 14:18:57
UTC (rev 7346)
+++ trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml 2008-02-03 15:01:48
UTC (rev 7347)
@@ -12,15 +12,16 @@
<s:div styleClass="blogRecentEntries">
- <s:div styleClass="boxHeader" rendered="#{not
preferences.get('Blog').recentEntriesSubscribeIcon}">
+ <s:div styleClass="boxHeader" rendered="#{not
preferences.get('Blog', currentMacro).recentEntriesSubscribeIcon}">
<h:outputText
value="#{messages['blogRecentEntries.label.RecentEntries']}"/>
</s:div>
- <h:panelGrid
rendered="#{preferences.get('Blog').recentEntriesSubscribeIcon}"
+ <h:panelGrid rendered="#{preferences.get('Blog',
currentMacro).recentEntriesSubscribeIcon}"
columns="2" cellpadding="0"
cellspacing="0" border="0"
styleClass="boxHeader fullWidth">
- <h:panelGrid rendered="#{not empty currentDirectory.feed}"
columns="2" cellpadding="0" cellspacing="0"
border="0">
+ <h:panelGrid styleClass="undecoratedLink smallFont"
rendered="#{not empty currentDirectory.feed}" columns="2"
+ cellpadding="2" cellspacing="0"
border="0">
<h:outputLink
target="_top"
value="#{wiki:renderFeedURL(currentDirectory.feed, null,
null)}">
@@ -43,14 +44,14 @@
columnClasses="defaultColumn"
cellpadding="0" cellspacing="0"
border="0">
<h:column>
- <div class="blogRecentEntriesDay">
+ <div class="blogRecentEntriesDay smallFont">
<h:outputText value="#{dayMap.key}">
<f:convertDateTime pattern="dd. MMM yyyy"
timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
</div>
<h:dataTable value="#{dayMap.value}" var="be"
- columnClasses="blogRecentEntriesItem"
+ columnClasses="blogRecentEntriesItem
smallFont"
cellpadding="0" cellspacing="0"
border="0">
<h:column>
<h:outputLink
styleClass="blogRecentEntriesItemLink" target="_top"
value="#{wiki:renderURL(be.entryDocument)}">
Modified: trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml 2008-02-03 14:18:57 UTC
(rev 7346)
+++ trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml 2008-02-03 15:01:48 UTC
(rev 7347)
@@ -6,7 +6,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:wiki="http://jboss.com/products/seam/wiki">
<s:fragment rendered="#{forumHome.showForm}">
Modified: trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml 2008-02-03 14:18:57
UTC (rev 7346)
+++ trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml 2008-02-03 15:01:48
UTC (rev 7347)
@@ -22,7 +22,7 @@
fivePercentColumn rightBorder bottomBorder alignCenter
smallFont,
tenPercentColumn rightBorder bottomBorder alignCenter
smallFont,
tenPercentColumn rightBorder bottomBorder alignCenter
smallFont"
- rowClasses="rowOdd"
+ rowClasses="forumListRow"
cellpadding="0" cellspacing="0"
border="0">
<h:column>
Modified: trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml 2008-02-03
14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml 2008-02-03
15:01:48 UTC (rev 7347)
@@ -64,7 +64,7 @@
</h:panelGrid>
<h:outputText escape="false"
- value="<div class='forumPostingDocumentWrapper #{empty
commentQuery.comments or not currentDocument.enableComments? 'noComments' :
''}'>"/>
+ value="<div class='box forumPostingDocumentWrapper
#{empty commentQuery.comments or not currentDocument.enableComments? 'noComments'
: ''}'>"/>
<h:panelGrid columns="4" styleClass="commentHeader"
columnClasses="commentSubjectIcon, commentSubject,
commentAuthorInfo smallFont, commentAuthorPortrait"
Modified: trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml 2008-02-03 14:18:57 UTC
(rev 7346)
+++ trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml 2008-02-03 15:01:48 UTC
(rev 7347)
@@ -30,14 +30,14 @@
<h:panelGroup rendered="#{not replyHome.showForm and
replyHome.isPersistAllowed(null,null)}">
- <s:link tabindex="1"
+ <s:link tabindex="1" propagation="none"
action="#{replyHome.replyToDocument()}"
accesskey="#{messages['forum.button.Reply.accesskey']}"
styleClass="buttonNonpersistent">
<h:outputText styleClass="buttonLabel"
escape="false" value="#{messages['forum.button.Reply']}"/>
</s:link>
- <s:link tabindex="1"
+ <s:link tabindex="1" propagation="none"
action="#{replyHome.quoteDocument()}"
styleClass="buttonNonpersistent"
accesskey="#{messages['forum.button.Quote.accesskey']}">
@@ -51,7 +51,7 @@
<!-- The forumPostingDocumentWrapper <div> is closed here! -->
<h:outputText escape="false" value="</div>"/>
- <s:span id="forumRepliesContainer">
+ <s:div id="forumRepliesContainer">
<s:fragment rendered="#{currentDocument.enableComments}">
@@ -115,14 +115,14 @@
<s:fragment rendered="#{not replyHome.showForm and
replyHome.isPersistAllowed(null,null)}">
- <s:link tabindex="102"
+ <s:link tabindex="102"
propagation="none"
action="#{replyHome.replyTo()}"
styleClass="buttonNonpersistent">
<f:param name="parentCommentId"
value="#{c.id}"/>
<h:outputText styleClass="buttonLabel"
value="#{messages['lacewiki.button.commentsDisplay.ReplyTo']}"/>
</s:link>
- <s:link tabindex="102"
+ <s:link tabindex="102"
propagation="none"
action="#{replyHome.quote()}"
styleClass="buttonNonpersistent">
<f:param name="parentCommentId"
value="#{c.id}"/>
@@ -155,6 +155,6 @@
</s:fragment>
- </s:span>
+ </s:div>
</wiki:plugin>
\ No newline at end of file
Modified: trunk/examples/wiki/view/plugins/tags/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/tags/plugin.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/plugins/tags/plugin.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -23,7 +23,7 @@
<h:outputLink
value="#{wiki:renderURL(currentDocument)}/Tag/#{wiki:encodeURL(tagCount.tag)}">#{tagCount.tag}</h:outputLink>
</s:span>
<s:span rendered="#{param.tag != tagCount.tag and not
preferences.get('Tags', currentMacro).linkToCurrentDocument}"
styleClass="undecoratedLink">
- <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tagCount.tag}">
+ <s:link view="/tagDisplay_#{skin}.xhtml"
value="#{tagCount.tag}" propagation="none">
<f:param value="#{tagCount.tag}"
name="tag"/>
</s:link>
</s:span>
Modified: trunk/examples/wiki/view/search_d.xhtml
===================================================================
--- trunk/examples/wiki/view/search_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/search_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -6,7 +6,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:wiki="http://jboss.com/products/seam/wiki"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
Modified: trunk/examples/wiki/view/tagDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -51,7 +51,8 @@
</s:span>
<s:span rendered="#{file.isInstance('WikiUpload') and
s:hasPermission('Node', 'edit', file)}">
- <s:link id="editFile"
value="#{wiki:truncateString(file.name, 30, '...')}"
tabindex="2" view="/uploadEdit_#{skin}.xhtml">
+ <s:link id="editFile"
value="#{wiki:truncateString(file.name, 30, '...')}"
propagation="none"
+ tabindex="2"
view="/uploadEdit_#{skin}.xhtml">
<f:param name="uploadId"
value="#{file.id}"/>
<f:param name="parentDirectoryId"
value="#{file.parent.id}"/>
</s:link>
@@ -71,7 +72,7 @@
</f:facet>
<h:graphicImage
value="/themes/#{preferences.get('Wiki').themeName}/img/icon.dir.gif"
width="18" height="20"
style="vertical-align: middle; margin-right: 5px;"/>
- <s:link value="#{wiki:truncateString(file.parent.name, 20,
'...')}"
+ <s:link value="#{wiki:truncateString(file.parent.name, 20,
'...')}" propagation="none"
view="/dirDisplay_#{skin}.xhtml"
rendered="#{s:hasPermission('Node','read',file.parent)}"
tabindex="1">
<f:param name="directoryId"
value="#{file.parent.id}"/>
Modified: trunk/examples/wiki/view/themes/default/css/blogArchive.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/blogArchive.css 2008-02-03 14:18:57 UTC
(rev 7346)
+++ trunk/examples/wiki/view/themes/default/css/blogArchive.css 2008-02-03 15:01:48 UTC
(rev 7347)
@@ -7,14 +7,3 @@
color: #000;
font-weight: normal;
}
-
-.blogArchiveFooter {
- background: white url(#{themePath}/img/th.bg.gif) 0 0 repeat-x;
- padding-top: 5px;
- padding-bottom: 10px;
- padding-left: 15px;
- padding-right: 15px;
- font-weight: normal;
- color: #962325;
- text-decoration: none;
-}
Modified: trunk/examples/wiki/view/themes/default/css/blogDirectory.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/blogDirectory.css 2008-02-03 14:18:57 UTC
(rev 7346)
+++ trunk/examples/wiki/view/themes/default/css/blogDirectory.css 2008-02-03 15:01:48 UTC
(rev 7347)
@@ -1,49 +1,34 @@
.blogEntryHeader {
- border-top: 1px solid #87786e;
- border-left: 1px solid #87786e;
- border-right: 1px solid #87786e;
- background: #fff url(#{themePath}/img/th.bg.inverse.gif) 0 0 repeat-x;
- padding-left: 15px;
- padding-right: 15px;
- padding-top: 5px;
- padding-bottom: 5px;
}
-.blogEntryHeader div {
+.blogEntryHeader .title {
+ text-align: left;
+ line-height: 200%;
+ font-size: 115%;
+}
+
+.blogEntryHeader .dateAuthor {
text-align: right;
white-space: nowrap;
font-weight: normal;
- padding-left: 15px;
- padding-right: 15px;
line-height: 100%;
}
-.blogEntryCreatedOn {}
-.blogEntryCreatedOnText {}
-.blogEntryCreatedBy {}
-.blogEntryCreatedByLink {
- color: #962325;
-}
-
.blogEntryContent {
padding-left: 15px;
padding-right: 15px;
line-height: 150%;
- text-align:justify;
+ text-align: justify;
}
+.blogEntryContent .wikiHeadline1 a,
+.blogEntryContent .wikiHeadline2 a,
+.blogEntryContent .wikiHeadline3 a,
+.blogEntryContent .wikiHeadline4 a {
+ color: black;
+}
+
.blogEntryFooter {
- background: white url(#{themePath}/img/th.bg.gif) 0 0 repeat-x;
- border-bottom: 1px solid #87786e;
- border-left: 1px solid #87786e;
- border-right: 1px solid #87786e;
- padding-top: 10px;
- padding-bottom: 5px;
- padding-left: 15px;
- padding-right: 15px;
- font-weight: normal;
- color: #962325;
- text-decoration: none;
}
.blogEntryFooterTable {}
Deleted: trunk/examples/wiki/view/themes/default/css/languageSelector.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/languageSelector.css 2008-02-03 14:18:57
UTC (rev 7346)
+++ trunk/examples/wiki/view/themes/default/css/languageSelector.css 2008-02-03 15:01:48
UTC (rev 7347)
@@ -1,15 +0,0 @@
-#languageSelector {
- text-align: right;
- font-weight: bold;
-}
-
-#languageSelector .languageSelectorLink {
- color: #C7B299;
- text-decoration: none;
- padding-left: 2px;
- padding-right: 2px;
-}
-
-#languageSelector .languageSelectorSeparator {
-
-}
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-02-03 15:01:48 UTC (rev
7347)
@@ -316,15 +316,16 @@
padding-right: 10px;
}
+.attentionMessage {
+ color: #600;
+}
+
.attentionImage {
vertical-align: text-top;
padding-left: 10px;
padding-right: 10px;
}
-.attentionMessage {
- color: #600;
-}
.messageBox .attentionImage {
vertical-align: text-top;
@@ -1218,15 +1219,6 @@
font-size: 115%;
}
-.boxHeader a {
- color: #962325;
- line-height: 100%;
- margin-left: 5px;
- font-size: 70%;
-}
-
-.boxHeader a:hover {color: #666}
-
.boxContent {
background-color: #fff;
padding: 10px;
@@ -1347,6 +1339,7 @@
margin-top: 20px;
}
+.userInfoEmail {}
.userInfoDetails {
vertical-align: top;
Modified: trunk/examples/wiki/view/themes/default/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -268,7 +268,7 @@
jQuery(".box").removeClass("box").addClass("boxShadowed");
}
- jQuery(function() {
+ function initPage() {
$.contextMenu.defaults({
shadow: false,
menuStyle: {
@@ -286,6 +286,10 @@
});
wrapBoxes();
+ }
+
+ jQuery(function() {
+ initPage();
});
</script>
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css 2008-02-03 14:18:57 UTC
(rev 7346)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css 2008-02-03 15:01:48 UTC
(rev 7347)
@@ -1,39 +1,38 @@
-.blogEntryContainer {
- border: 1px solid #d3d2d1;
-}
-.blogEntryContainer .boxFooter {
- border: 0;
+.blogEntryHeader {
}
-.blogEntryHeader {
- background: #fff url(#{themePath}/img/th.bg.inverse.gif) 0 0 repeat-x;
- padding-left: 10px;
- padding-right: 10px;
- padding-top: 2px;
- padding-bottom: 8px;
+.blogEntryHeader .title {
+ text-align: left;
+ line-height: 200%;
+ font-size: 115%;
}
-.blogEntryHeader div {
+.blogEntryHeader .dateAuthor {
text-align: right;
white-space: nowrap;
font-weight: normal;
line-height: 100%;
- padding-top: 3px;
}
-.blogEntryCreatedOn {}
-.blogEntryCreatedOnText {}
-.blogEntryCreatedBy {}
-.blogEntryCreatedByLink {
-}
-
.blogEntryContent {
- padding-left: 10px;
- padding-right: 10px;
+ padding-left: 15px;
+ padding-right: 15px;
line-height: 150%;
+ text-align: justify;
}
+.blogEntryContent .wikiPara {
+ margin-top: 0;
+}
+
+.blogEntryContent .wikiHeadline1 a,
+.blogEntryContent .wikiHeadline2 a,
+.blogEntryContent .wikiHeadline3 a,
+.blogEntryContent .wikiHeadline4 a {
+ color: black;
+}
+
.blogEntryFooter {
}
@@ -86,6 +85,5 @@
}
.documentTags {
- margin-left: 10px;
- margin-right: 10px;
+ margin-top: 10px;
}
\ No newline at end of file
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-03 15:01:48 UTC (rev
7347)
@@ -664,7 +664,6 @@
width: 100%;
padding: 0;
margin: 0;
- border-top: 1px solid #d3d2d1;
border-left: 1px solid #d3d2d1;
border-right: 1px solid #d3d2d1;
background: #ede8db url(../img/th.bg.gif) 0 0 repeat-x;
@@ -677,6 +676,14 @@
width: 60%;
}
+.pagerTop {
+ border-top: 1px solid #d3d2d1;
+}
+
+.pagerBottom {
+ border-bottom: 1px solid #d3d2d1;
+}
+
/* Comments
-----------------------------------------------*/
@@ -981,16 +988,6 @@
font-size: 115%;
}
-.boxHeader a {
- color: #576c74;
- line-height: 100%;
- margin-left: 5px;
- font-size: 70%;
-}
-
-.boxHeader a:hover {color: #000}
-.boxHeader a:visited {color: #576c74}
-
.boxContent {
background-color: #fff;
border-left: 1px solid #d3d2d1;
@@ -1302,6 +1299,7 @@
margin-top: 20px;
}
+.userInfoEmail {}
.userInfoDetails {
vertical-align: top;
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.check.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/sfwkorg/img/icon.check.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.jira.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/sfwkorg/img/icon.jira.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.log.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/sfwkorg/img/icon.log.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.news.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/sfwkorg/img/icon.news.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/view/themes/sfwkorg/img/icon.updates.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/view/themes/sfwkorg/img/icon.updates.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-03 14:18:57 UTC (rev
7346)
+++ trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-03 15:01:48 UTC (rev
7347)
@@ -263,11 +263,12 @@
// Noop for this skin
}
- jQuery(function() {
+ function initPage() {
$.contextMenu.defaults({
shadow: false,
menuStyle: {
- padding: '0'
+ padding: '0',
+ width: '200px'
},
itemStyle: {
border: 'none',
@@ -279,6 +280,11 @@
padding: '4px'
}
});
+ wrapBoxes();
+ }
+
+ jQuery(function() {
+ initPage();
});
</script>
Modified: trunk/examples/wiki/view/uploadCreate_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -6,7 +6,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:wiki="http://jboss.com/products/seam/wiki"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
Modified: trunk/examples/wiki/view/userHome_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userHome_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/userHome_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -6,7 +6,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:wiki="http://jboss.com/products/seam/wiki"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
Modified: trunk/examples/wiki/view/userInfo_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userInfo_d.xhtml 2008-02-03 14:18:57 UTC (rev 7346)
+++ trunk/examples/wiki/view/userInfo_d.xhtml 2008-02-03 15:01:48 UTC (rev 7347)
@@ -6,7 +6,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:wiki="http://jboss.com/products/seam/wiki"
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
@@ -35,7 +34,7 @@
<s:div>
- <s:div styleClass="form bottomBorder">
+ <s:div styleClass="box form bottomBorder">
<s:div styleClass="formHead">
<h:outputText
value="#{messages['lacewiki.label.userInfo.UserInfo']}
'#{userHome.instance.username}'"/>
</s:div>