Author: christian.bauer(a)jboss.com
Date: 2008-01-29 02:59:33 -0500 (Tue, 29 Jan 2008)
New Revision: 7281
Modified:
trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
trunk/examples/wiki/src/etc/import-prod.sql
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/DocumentHome.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/UploadHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/prefs/WikiPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/BasicNodeOperations.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Uploading.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/docDisplay_m.xhtml
trunk/examples/wiki/view/includes/commentsDisplay.xhtml
trunk/examples/wiki/view/includes/userInfoLink.xhtml
trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml
trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml
trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml
trunk/examples/wiki/view/tagDisplay_d.xhtml
trunk/examples/wiki/view/userList_d.xhtml
Log:
Better user info URLs, more detail on workspace switcher
Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-01-29 07:06:47 UTC (rev
7280)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-01-29 07:59:33 UTC (rev
7281)
@@ -13,6 +13,12 @@
</function>
<function>
+ <function-name>renderUserInfoURL</function-name>
+ <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
+ <function-signature>java.lang.String
renderUserInfoURL(org.jboss.seam.wiki.core.model.User)</function-signature>
+ </function>
+
+ <function>
<function-name>renderAggregateFeedURL</function-name>
<function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
<function-signature>java.lang.String
renderAggregateFeedURL(java.lang.String)</function-signature>
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-01-29 07:59:33 UTC (rev 7281)
@@ -36,7 +36,7 @@
<!-- Conversation timeout: 20 minutes -->
<core:manager concurrent-request-timeout="2000"
- conversation-timeout="120000"
+ conversation-timeout="1200000"
conversation-id-parameter="cid"/>
<persistence:filter name="accessLevelFilter">
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-01-29 07:59:33 UTC (rev 7281)
@@ -62,7 +62,7 @@
<page view-id="/docEdit*"
no-conversation-view-id="/wiki.xhtml">
<param name="documentId"
value="#{documentHome.nodeId}"/>
<param name="parentDirectoryId"
value="#{documentHome.parentNodeId}"/>
- <action execute="#{documentHome.setEdit(true)}"/>
+ <action execute="#{documentHome.initEditor}"/>
<begin-conversation flush-mode="MANUAL" join="true"/>
<navigation>
@@ -92,7 +92,7 @@
<page view-id="/dirEdit*"
no-conversation-view-id="/wiki.xhtml">
<param name="directoryId"
value="#{directoryHome.nodeId}"/>
<param name="parentDirectoryId"
value="#{directoryHome.parentNodeId}"/>
- <action execute="#{directoryHome.setEdit(true)}"/>
+ <action execute="#{directoryHome.initEditor()}"/>
<begin-conversation flush-mode="MANUAL" join="true"/>
<navigation>
@@ -142,7 +142,7 @@
<page view-id="/uploadEdit*"
no-conversation-view-id="/wiki.xhtml">
<param name="uploadId" value="#{uploadHome.nodeId}"/>
<param name="parentDirectoryId"
value="#{uploadHome.parentNodeId}"/>
- <action execute="#{uploadHome.setEdit(true)}"/>
+ <action execute="#{uploadHome.initEditor()}"/>
<begin-conversation flush-mode="MANUAL" join="true"/>
<navigation>
@@ -214,6 +214,7 @@
<page view-id="/userInfo*">
<param name="userId" value="#{userHome.userId}"/>
+ <param name="username"
value="#{userHome.requestedUsername}"/>
</page>
<page view-id="/userList*">
@@ -280,24 +281,9 @@
<page view-id="/docHistory_d.xhtml">
<description>#{messages['lacewiki.label.docHistory.DocumentHistory']}</description>
</page>
- <page view-id="/docEdit_d.xhtml">
- <description>#{documentHome.idDefined
- ? messages['lacewiki.label.docEdit.EditDocument']
- :
messages['lacewiki.label.docEdit.CreateDocument']}</description>
- </page>
- <page view-id="/dirEdit_d.xhtml">
- <description>#{directoryHome.idDefined
- ? messages['lacewiki.label.dirEdit.EditDirectory']
- :
messages['lacewiki.label.dirEdit.CreateDirectory']}</description>
- </page>
<page view-id="/uploadCreate_d.xhtml">
<description>#{messages['lacewiki.label.upload.UploadFile']}</description>
</page>
- <page view-id="/uploadEdit_d.xhtml">
- <description>#{uploadHome.idDefined
- ? messages['lacewiki.label.uploadEdit.EditFile']
- :
messages['lacewiki.label.uploadEdit.UploadFile']}</description>
- </page>
<page view-id="/search_d.xhtml">
<description>#{messages['lacewiki.label.search.Search']}
(#{messages['lacewiki.label.search.Results']}:
#{wikiSearch.searchResult.size})</description>
</page>
@@ -320,24 +306,9 @@
<page view-id="/docHistory_m.xhtml">
<description>#{messages['lacewiki.label.docHistory.DocumentHistory']}</description>
</page>
- <page view-id="/docEdit_m.xhtml">
- <description>#{documentHome.idDefined
- ? messages['lacewiki.label.docEdit.EditDocument']
- :
messages['lacewiki.label.docEdit.CreateDocument']}</description>
- </page>
- <page view-id="/dirEdit_m.xhtml">
- <description>#{directoryHome.idDefined
- ? messages['lacewiki.label.dirEdit.EditDirectory']
- :
messages['lacewiki.label.dirEdit.CreateDirectory']}</description>
- </page>
<page view-id="/uploadCreate_m.xhtml">
<description>#{messages['lacewiki.label.upload.UploadFile']}</description>
</page>
- <page view-id="/uploadEdit_m.xhtml">
- <description>#{uploadHome.idDefined
- ? messages['lacewiki.label.uploadEdit.EditFile']
- :
messages['lacewiki.label.uploadEdit.UploadFile']}</description>
- </page>
<page view-id="/search_m.xhtml">
<description>#{messages['lacewiki.label.search.Search']}
(#{messages['lacewiki.label.search.Results']}:
#{wikiSearch.searchResult.size})</description>
</page>
Modified: trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-01-29 07:59:33 UTC (rev 7281)
@@ -17,6 +17,12 @@
<to last="true"
type="temporary-redirect">/robots.txt</to>
</rule>
+ <!-- Default browser -->
+ <rule>
+ <from>.*</from>
+ <set type="session" name="skin">d</set>
+ </rule>
+
<!-- Mobile browser -->
<rule>
<from>.*</from>
@@ -32,6 +38,12 @@
<to last="true">/wiki.seam?nodeId=$1</to>
</rule>
+ <!-- /user/foo -->
+ <rule>
+ <from
casesensitive="true">^/user/([a-zA-Z]?[a-zA-Z0-9]+)$</from>
+ <to
last="true">/userInfo_%{session-attribute:skin}.seam?username=$1</to>
+ </rule>
+
<!-- /service/Feed/atom (/Area/Foo) (/Node/Bar) (/Comments/exclude/) (/Tag/foobar)
(/Aggregate/My Aggregate) -->
<rule>
<from
casesensitive="true">^/service/Feed/atom(?:/Area/([A-Z0-9]+[A-Za-z0-9]*))?(?:/Node/([A-Z0-9]+[A-Za-z0-9]*))?(?:/Comments/([a-z]+))?(?:/Tag/(.+))?(?:/Aggregate/(.+))?$</from>
Modified: trunk/examples/wiki/src/etc/import-prod.sql
===================================================================
--- trunk/examples/wiki/src/etc/import-prod.sql 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/etc/import-prod.sql 2008-01-29 07:59:33 UTC (rev 7281)
@@ -20,21 +20,22 @@
INSERT INTO PREFERENCE
VALUES(17,'Wiki','showEmailToLoggedInOnly',NULL,NULL,NULL,TRUE,NULL,0,NULL)
INSERT INTO PREFERENCE
VALUES(18,'Wiki','trashArea',NULL,NULL,NULL,NULL,'Trash',0,NULL)
INSERT INTO PREFERENCE
VALUES(19,'Wiki','showSiteFeedInMenu',NULL,NULL,NULL,TRUE,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(20,'Wiki','workspaceSwitcherDescriptionLength',25,NULL,NULL,NULL,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(20,'DocEditor','minorRevisionEnabled',NULL,NULL,NULL,TRUE,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(21,'DocEditor','regularEditAreaRows',15,NULL,NULL,NULL,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(22,'DocEditor','regularEditAreaColumns',65,NULL,NULL,NULL,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(50,'DocEditor','minorRevisionEnabled',NULL,NULL,NULL,TRUE,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(51,'DocEditor','regularEditAreaRows',15,NULL,NULL,NULL,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(52,'DocEditor','regularEditAreaColumns',65,NULL,NULL,NULL,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(30,'UserManagement','activationCodeSalt',NULL,NULL,NULL,NULL,'MySecretSalt123',0,NULL)
-INSERT INTO PREFERENCE
VALUES(31,'UserManagement','passwordRegex',NULL,NULL,NULL,NULL,'^[0-9A-Za-z]{6,15}',0,NULL)
-INSERT INTO PREFERENCE
VALUES(32,'UserManagement','newUserInRole',NULL,NULL,NULL,NULL,'member',0,NULL)
-INSERT INTO PREFERENCE
VALUES(33,'UserManagement','enableRegistration',NULL,NULL,NULL,TRUE,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(34,'UserManagement','createHomeAfterUserActivation',NULL,NULL,NULL,FALSE,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(35,'UserManagement','homepageDefaultContent',NULL,NULL,NULL,NULL,'This
is your homepage, login to edit it.',0,NULL)
+INSERT INTO PREFERENCE
VALUES(60,'UserManagement','activationCodeSalt',NULL,NULL,NULL,NULL,'MySecretSalt123',0,NULL)
+INSERT INTO PREFERENCE
VALUES(61,'UserManagement','passwordRegex',NULL,NULL,NULL,NULL,'^[0-9A-Za-z]{6,15}',0,NULL)
+INSERT INTO PREFERENCE
VALUES(62,'UserManagement','newUserInRole',NULL,NULL,NULL,NULL,'member',0,NULL)
+INSERT INTO PREFERENCE
VALUES(63,'UserManagement','enableRegistration',NULL,NULL,NULL,TRUE,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(64,'UserManagement','createHomeAfterUserActivation',NULL,NULL,NULL,FALSE,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(65,'UserManagement','homepageDefaultContent',NULL,NULL,NULL,NULL,'This
is your homepage, login to edit it.',0,NULL)
-INSERT INTO PREFERENCE
VALUES(40,'Comments','listAscending',NULL,NULL,NULL,FALSE,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(41,'Comments','enableByDefault',NULL,NULL,NULL,TRUE,NULL,0,NULL)
-INSERT INTO PREFERENCE
VALUES(42,'Comments','threaded',NULL,NULL,NULL,TRUE,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(70,'Comments','listAscending',NULL,NULL,NULL,FALSE,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(71,'Comments','enableByDefault',NULL,NULL,NULL,TRUE,NULL,0,NULL)
+INSERT INTO PREFERENCE
VALUES(72,'Comments','threaded',NULL,NULL,NULL,TRUE,NULL,0,NULL)
INSERT INTO PREFERENCE
VALUES(110,'LastModifiedDocuments','numberOfItems',5,NULL,NULL,NULL,NULL,0,NULL)
INSERT INTO PREFERENCE
VALUES(111,'LastModifiedDocuments','showUsernames',NULL,NULL,NULL,TRUE,NULL,0,NULL)
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-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -163,6 +163,10 @@
getInstance().getSubject()
);
}
+
+ protected String getEditorWorkspaceDescription(boolean create) {
+ return "Foo";
+ }
/* -------------------------- Internal Methods ------------------------------ */
@@ -219,7 +223,7 @@
@Begin(flushMode = FlushModeType.MANUAL, join = true)
public String newComment() {
- setEdit(true);
+ initEditor();
showForm = true;
return "redirectToDocument";
}
@@ -287,7 +291,7 @@
public void remove(Long commentId) {
setNodeId(commentId);
- setEdit(true);
+ initEditor();
if (isManaged()) {
// Additional permission required besides NodeHome.remove()
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-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -195,6 +195,14 @@
"Removed syndication feed of this directory");
}
+ protected String getEditorWorkspaceDescription(boolean create) {
+ if (create) {
+ return
Messages.instance().get("lacewiki.label.dirEdit.CreateDirectory");
+ } else {
+ return
Messages.instance().get("lacewiki.label.dirEdit.EditDirectory") + ":"
+ getInstance().getName();
+ }
+ }
+
/* -------------------------- Internal Methods ------------------------------ */
private void refreshChildNodes(WikiDirectory dir) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -8,6 +8,7 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.Messages;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -79,7 +80,7 @@
public WikiDocument beforeNodeEditNew(WikiDocument doc) {
doc = super.beforeNodeEditNew(doc);
- doc.setEnableComments(
((CommentsPreferences)Preferences.getInstance("Comments")).getEnableByDefault()
);
+ doc.setEnableComments(
Preferences.getInstance(CommentsPreferences.class).getEnableByDefault() );
return doc;
}
@@ -181,9 +182,8 @@
// Feeds should not be removed by a maintenance thread: If there
// is no activity on the site, feeds shouldn't be empty but show the last
updates.
- WikiPreferences wikiPrefs = (WikiPreferences)
Preferences.getInstance("Wiki");
Calendar oldestDate = GregorianCalendar.getInstance();
- oldestDate.add(Calendar.DAY_OF_YEAR,
-wikiPrefs.getPurgeFeedEntriesAfterDays().intValue());
+ oldestDate.add(Calendar.DAY_OF_YEAR,
-Preferences.getInstance(WikiPreferences.class).getPurgeFeedEntriesAfterDays().intValue());
feedDAO.purgeOldFeedEntries(oldestDate.getTime());
// Write history log and prepare a new copy for further modification
@@ -200,9 +200,7 @@
historicalCopy.flatCopy(getInstance(), true);
// Reset form
- setMinorRevision(
-
((DocumentEditorPreferences)Preferences.getInstance("DocEditor")).getMinorRevisionEnabled()
- );
+ setMinorRevision(
Preferences.getInstance(DocumentEditorPreferences.class).getMinorRevisionEnabled() );
}
return true;
@@ -250,6 +248,14 @@
);
}
+ protected String getEditorWorkspaceDescription(boolean create) {
+ if (create) {
+ return
Messages.instance().get("lacewiki.label.docEdit.CreateDocument");
+ } else {
+ return
Messages.instance().get("lacewiki.label.docEdit.EditDocument") + ":" +
getInstance().getName();
+ }
+ }
+
/* -------------------------- Internal Methods ------------------------------ */
protected void findHistoricalFiles(WikiDocument doc) {
@@ -342,7 +348,7 @@
public boolean isMinorRevision() {
// Lazily initalize preferences
if (minorRevision == null)
- minorRevision = ((DocumentEditorPreferences)
Preferences.getInstance("DocEditor")).getMinorRevisionEnabled();
+ minorRevision =
Preferences.getInstance(DocumentEditorPreferences.class).getMinorRevisionEnabled();
return minorRevision;
}
public void setMinorRevision(boolean minorRevision) { this.minorRevision =
minorRevision; }
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-01-29
07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -10,6 +10,7 @@
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Events;
+import org.jboss.seam.core.Conversation;
import org.jboss.seam.framework.EntityHome;
import org.jboss.seam.security.AuthorizationException;
import org.jboss.seam.security.Identity;
@@ -17,9 +18,10 @@
import org.jboss.seam.wiki.core.dao.UserDAO;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.preferences.Preferences;
-import static javax.faces.application.FacesMessage.SEVERITY_ERROR;
import static javax.faces.application.FacesMessage.SEVERITY_WARN;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
import java.util.Date;
@@ -82,11 +84,23 @@
/* -------------------------- Additional States ------------------------------ */
- private boolean edit = false;
+ private boolean editor = false;
- public boolean isEdit() { return edit; }
- public void setEdit(boolean edit) { this.edit = edit; }
+ public boolean isEditor() { return editor; }
+ public void initEditor() {
+ getLog().debug("initializing editor workspace");
+ this.editor = true;
+
+ // Set workspace description of the current conversation
+ String desc = getEditorWorkspaceDescription(getNodeId() == null);
+ WikiPreferences prefs = Preferences.getInstance(WikiPreferences.class);
+ if (desc.length() > prefs.getWorkspaceSwitcherDescriptionLength()) {
+ desc = desc.substring(0,
prefs.getWorkspaceSwitcherDescriptionLength().intValue()) + "...";
+ }
+ Conversation.instance().setDescription(desc);
+ }
+
/* -------------------------- Basic Overrides ------------------------------ */
@Override
@@ -103,7 +117,7 @@
return null;
}
getLog().debug("found instance: " + foundNode);
- return isEdit() ? beforeNodeEditFound(afterNodeFound(foundNode)) :
afterNodeFound(foundNode);
+ return isEditor() ? beforeNodeEditFound(afterNodeFound(foundNode)) :
afterNodeFound(foundNode);
}
@Override
@@ -111,7 +125,7 @@
getLog().debug("creating a new instance");
N newNode = super.createInstance();
getLog().debug("created new instance: " + newNode);
- return isEdit() ? beforeNodeEditNew(afterNodeCreated(newNode)) :
afterNodeCreated(newNode);
+ return isEditor() ? beforeNodeEditNew(afterNodeCreated(newNode)) :
afterNodeCreated(newNode);
}
/* -------------------------- Basic Subclass Callbacks ------------------------------
*/
@@ -398,6 +412,8 @@
*/
protected abstract NodeRemover getNodeRemover();
+ protected abstract String getEditorWorkspaceDescription(boolean create);
+
/* -------------------------- Public Features ------------------------------ */
@Restrict("#{s:hasPermission('User', 'isAdmin',
currentUser)}")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -2,6 +2,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.Component;
+import org.jboss.seam.international.Messages;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -163,6 +164,14 @@
);
}
+ protected String getEditorWorkspaceDescription(boolean create) {
+ if (create) {
+ return
Messages.instance().get("lacewiki.label.uploadEdit.UploadFile");
+ } else {
+ return
Messages.instance().get("lacewiki.label.uploadEdit.EditFile") + ":" +
getInstance().getName();
+ }
+ }
+
/* -------------------------- Public Features ------------------------------ */
public UploadEditor getUploadEditor() {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-01-29
07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -45,14 +45,6 @@
@Scope(ScopeType.CONVERSATION)
public class UserHome extends EntityHome<User> {
- public Long getUserId() {
- return (Long)getId();
- }
-
- public void setUserId(Long userId) {
- setId(userId);
- }
-
@In
private FacesMessages facesMessages;
@@ -74,6 +66,7 @@
private List<Role> roles;
private org.jboss.seam.wiki.core.model.Role defaultRole;
private Uploader uploader;
+ private String requestedUsername;
public Uploader getUploader() {
return uploader;
@@ -83,6 +76,23 @@
this.uploader = uploader;
}
+ public Long getUserId() {
+ return (Long)getId();
+ }
+
+ public void setUserId(Long userId) {
+ setId(userId);
+ }
+
+ public String getRequestedUsername() {
+ return requestedUsername;
+ }
+
+ public void setRequestedUsername(String requestedUsername) {
+ getLog().debug("######################## REQUESTED: " +
requestedUsername);
+ this.requestedUsername = requestedUsername;
+ }
+
public void init() {
if (isManaged()) {
if (!Identity.instance().hasPermission("User", "edit",
getInstance()) ) {
@@ -103,6 +113,28 @@
}
}
+ @Override
+ protected void initInstance() {
+ if ( isIdDefined() || (getRequestedUsername() != null &&
getRequestedUsername().length() >0) ) {
+ if ( !isTransactionMarkedRollback() ) {
+ setInstance( find() );
+ }
+ } else {
+ setInstance( createInstance() );
+ }
+ }
+
+ @Override
+ protected User loadInstance() {
+ if (getRequestedUsername() != null && getRequestedUsername().length()
>0) {
+ getLog().debug("################ FINDING USER: " +
getRequestedUsername());
+ return userDAO.findUser(getRequestedUsername(), true, true);
+ } else {
+ return getEntityManager().find(getEntityClass(), getId());
+ }
+ }
+
+ @Override
public String persist() {
// Validate
@@ -141,7 +173,7 @@
// Send confirmation email
renderer.render("/themes/"
- + ((WikiPreferences)
Preferences.getInstance("Wiki")).getThemeName()
+ +
Preferences.getInstance(WikiPreferences.class).getThemeName()
+
"/mailtemplates/confirmationRegistration.xhtml");
/* For debugging
@@ -160,6 +192,7 @@
}
}
+ @Override
@Restrict("#{s:hasPermission('User', 'edit',
userHome.instance)}")
public String update() {
@@ -256,6 +289,7 @@
return outcome;
}
+ @Override
@Restrict("#{s:hasPermission('User', 'delete',
userHome.instance)}")
public String remove() {
@@ -285,6 +319,7 @@
/* -------------------------- Messages ------------------------------ */
+ @Override
protected void createdMessage() {
getFacesMessages().addFromResourceBundleOrDefault(
SEVERITY_INFO,
@@ -294,6 +329,7 @@
);
}
+ @Override
protected void updatedMessage() {
getFacesMessages().addFromResourceBundleOrDefault(
SEVERITY_INFO,
@@ -303,6 +339,7 @@
);
}
+ @Override
protected void deletedMessage() {
getFacesMessages().addFromResourceBundleOrDefault(
SEVERITY_INFO,
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -106,7 +106,7 @@
// Send confirmation email
renderer.render("/themes/"
- + ((WikiPreferences)
Preferences.getInstance("Wiki")).getThemeName()
+ + Preferences.getInstance(WikiPreferences.class).getThemeName()
+ "/mailtemplates/resetPassword.xhtml");
facesMessages.addFromResourceBundleOrDefault(
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/prefs/WikiPreferences.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/prefs/WikiPreferences.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/prefs/WikiPreferences.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -174,6 +174,15 @@
)
private Boolean showTags;
+ @PreferenceProperty(
+ description =
"#{messages['lacewiki.preferences.wiki.WorkspaceSwitcherDescriptionLength']}",
+ visibility = PreferenceVisibility.SYSTEM,
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 3l, max = 100l)
+ @NotNull
+ private Long workspaceSwitcherDescriptionLength;
+
public String getBaseUrl() {
return baseUrl;
}
@@ -250,4 +259,7 @@
return showTags;
}
+ public Long getWorkspaceSwitcherDescriptionLength() {
+ return workspaceSwitcherDescriptionLength;
+ }
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -86,7 +86,7 @@
@Factory(value = "newUserDefaultRole", scope = ScopeType.SESSION)
public Role getDefaultRole() {
- UserManagementPreferences userPrefs = (UserManagementPreferences)
Preferences.getInstance("UserManagement");
+ UserManagementPreferences userPrefs =
Preferences.getInstance(UserManagementPreferences.class);
try {
return (Role) entityManager
.createQuery("select r from Role r where r.name =
'"+userPrefs.getNewUserInRole()+"'")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-01-29
07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeDAO.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -339,11 +339,11 @@
}
return null;
}
-
+
public List<WikiDocument> findWikiDocuments(int maxResults,
WikiNode.SortableProperty orderBy, boolean orderAscending) {
StringBuilder query = new StringBuilder();
- query.append("select d from WikiDocument d where d.lastModifiedOn is not
null");
+ query.append("select d from WikiDocument d where
d.").append(orderBy.name()).append(" is not null");
query.append(" order by d.").append(orderBy.name()).append("
").append(orderAscending ? "asc" : "desc");
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-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -52,11 +52,10 @@
@Factory(value = "wikiStart", scope = ScopeType.PAGE, autoCreate = true)
public WikiDocument loadWikiStart() {
- WikiPreferences wikiPreferences = (WikiPreferences)
Preferences.getInstance("Wiki");
try {
return (WikiDocument) restrictedEntityManager
.createQuery("select d from WikiDocument d where d.id =
:id")
- .setParameter("id",
wikiPreferences.getDefaultDocumentId())
+ .setParameter("id",
Preferences.getInstance(WikiPreferences.class).getDefaultDocumentId())
.setHint("org.hibernate.comment", "Loading
wikiStart")
.setHint("org.hibernate.cacheable", true)
.getSingleResult();
@@ -65,7 +64,8 @@
}
// TODO: Message instead!
- throw new RuntimeException("Couldn't find wiki default start document
with id '" + wikiPreferences.getDefaultDocumentId() +"'");
+ throw new RuntimeException("Couldn't find wiki default start document
with id '"
+ + Preferences.getInstance(WikiPreferences.class).getDefaultDocumentId()
+"'");
}
// Loads the same instance into a different persistence context
@@ -87,7 +87,7 @@
@Factory(value = "memberArea", scope = ScopeType.PAGE, autoCreate = true)
public WikiDirectory loadMemberArea() {
- String memberAreaName =
((WikiPreferences)Preferences.getInstance("Wiki")).getMemberArea();
+ String memberAreaName =
Preferences.getInstance(WikiPreferences.class).getMemberArea();
try {
return (WikiDirectory) entityManager
.createQuery("select d from WikiDirectory d left join fetch
d.feed where d.wikiname = :name and d.parent.parent is null")
@@ -108,7 +108,7 @@
@Factory(value = "trashArea", scope = ScopeType.PAGE, autoCreate = true)
public WikiDirectory loadTrashArea() {
- String trashAreaName =
((WikiPreferences)Preferences.getInstance("Wiki")).getTrashArea();
+ String trashAreaName =
Preferences.getInstance(WikiPreferences.class).getTrashArea();
try {
return (WikiDirectory) entityManager
.createQuery("select d from WikiDirectory d left join fetch
d.feed where d.wikiname = :name and d.parent.parent is null")
@@ -129,7 +129,7 @@
@Factory(value = "helpArea", scope = ScopeType.PAGE, autoCreate = true)
public WikiDirectory loadHelpArea() {
- String helpAreaName =
((WikiPreferences)Preferences.getInstance("Wiki")).getHelpArea();
+ String helpAreaName =
Preferences.getInstance(WikiPreferences.class).getHelpArea();
try {
return (WikiDirectory) entityManager
.createQuery("select d from WikiDirectory d left join fetch
d.feed where d.wikiname = :name and d.parent.parent is null")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -1,17 +1,13 @@
package org.jboss.seam.wiki.core.search;
import org.apache.lucene.search.*;
-import org.apache.lucene.search.Filter;
import org.hibernate.Hibernate;
-import org.hibernate.search.FullTextSession;
import org.hibernate.search.FullTextQuery;
+import org.hibernate.search.FullTextSession;
import org.hibernate.search.bridge.StringBridge;
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.core.Conversation;
import org.jboss.seam.annotations.*;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.log.Log;
import org.jboss.seam.wiki.core.search.annotations.SearchableType;
import org.jboss.seam.wiki.core.search.metamodel.SearchRegistry;
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -233,7 +233,7 @@
*/
private void includePluginCSS(String macroName, UIComponent cmp) {
// Try to get the CSS for it
- WikiPreferences wikiPrefs = (WikiPreferences)
Preferences.getInstance("Wiki");
+ WikiPreferences wikiPrefs = Preferences.getInstance(WikiPreferences.class);
String css = "/themes/" + wikiPrefs.getThemeName() + "/css/"
+ macroName + ".css";
if (ResourceLoader.instance().getResource(css) != null) {
log.debug("including plugin CSS file from resource: " + css);
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-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -85,8 +85,8 @@
// 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 = ((BlogPreferences) Preferences.getInstance("Blog",
"currentMacro")).getPageSize();
- recentBlogEntriesCount = ((BlogPreferences)
Preferences.getInstance("Blog",
"currentMacro")).getRecentEntriesItems();
+ pageSize = Preferences.getInstance(BlogPreferences.class,
"currentMacro").getPageSize();
+ recentBlogEntriesCount = Preferences.getInstance(BlogPreferences.class,
"currentMacro").getRecentEntriesItems();
}
private void queryNumOfBlogEntries() {
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -6,7 +6,6 @@
import org.jboss.seam.core.Events;
import org.jboss.seam.international.Messages;
import org.jboss.seam.wiki.core.action.DocumentHome;
-import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
@@ -142,7 +141,7 @@
@Begin(flushMode = FlushModeType.MANUAL, join = true)
public void newQuestion() {
- setEdit(true);
+ initEditor();
showForm = true;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -197,14 +197,14 @@
@Begin(flushMode = FlushModeType.MANUAL, join = true)
public void newForum() {
- setEdit(true);
+ initEditor();
showForm = true;
}
@Begin(flushMode = FlushModeType.MANUAL, join = true)
public void edit(Long forumId) {
setId(forumId);
- setEdit(true);
+ initEditor();
showForm = true;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -2,7 +2,6 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.faces.Renderer;
import org.jboss.seam.security.Identity;
import org.jboss.seam.security.AuthorizationException;
@@ -35,7 +34,7 @@
)) {
getLog().debug("sending confirmation e-mail to original poster");
renderer.render("/themes/"
- + ((WikiPreferences)
Preferences.getInstance("Wiki")).getThemeName()
+ + Preferences.getInstance(WikiPreferences.class).getThemeName()
+ "/mailtemplates/forumNotifyReply.xhtml");
}
}
@@ -45,7 +44,7 @@
getLog().debug("reply to document id: " + getParentNodeId());
newComment();
- setEdit(true);
+ initEditor();
getInstance().setSubject(REPLY_PREFIX + getParentNode().getName());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -1,7 +1,6 @@
package org.jboss.seam.wiki.plugin.forum;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.Redirect;
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.core.Conversation;
@@ -46,7 +45,7 @@
super.create();
setParentNodeId(currentDirectory.getId());
- Boolean preferencesNotifyReplies = ((ForumPreferences)
Preferences.getInstance("Forum")).getNotifyMeOfReplies();
+ Boolean preferencesNotifyReplies =
Preferences.getInstance(ForumPreferences.class).getNotifyMeOfReplies();
notifyReplies = preferencesNotifyReplies != null &&
preferencesNotifyReplies;
}
@@ -199,7 +198,7 @@
@Begin(flushMode = FlushModeType.MANUAL, join = true)
public void newTopic() {
- setEdit(true);
+ initEditor();
showForm = true;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -100,6 +100,24 @@
return
Expressions.instance().createValueExpression("#{preferences.get('" +
preferenceEntityName + "')}").getValue();
}
+ public static <P> P getInstance(Class<P> clazz, String instanceName) {
+ return (P)getInstance(getPreferenceEntityName(clazz), instanceName);
+ }
+
+ public static <P> P getInstance(Class<P> clazz) {
+ return (P)getInstance(getPreferenceEntityName(clazz));
+ }
+
+ private static String getPreferenceEntityName(Class<?> clazz) {
+ org.jboss.seam.wiki.preferences.annotations.Preferences
+ p =
clazz.getAnnotation(org.jboss.seam.wiki.preferences.annotations.Preferences.class);
+ if (p.name() != null) {
+ return p.name();
+ } else {
+ return clazz.getSimpleName();
+ }
+ }
+
private class CacheKey implements Serializable {
private String entityName;
private Object user;
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-01-29
07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -97,6 +97,13 @@
accessLevels.indexOf(new Role.AccessLevel(accessLevel, null))
);
}
+
+ public static String renderUserInfoURL(User user) {
+ if (user == null || user.getUsername() == null) return "";
+ StringBuilder url = new StringBuilder();
+
url.append(Component.getInstance("basePath")).append("/user/").append(user.getUsername());
+ return url.toString();
+ }
public static String renderAggregateFeedURL(String aggregateId) {
if (aggregateId == null) return "";
@@ -122,14 +129,12 @@
public static String renderURL(WikiNode node) {
if (node == null || node.getId() == null) return "";
- WikiPreferences wikiPrefs = (WikiPreferences)
Preferences.getInstance("Wiki");
- return wikiPrefs.isRenderPermlinks() ? renderPermURL(node) :
renderWikiURL(node);
+ return Preferences.getInstance(WikiPreferences.class).isRenderPermlinks() ?
renderPermURL(node) : renderWikiURL(node);
}
public static String renderPermURL(WikiNode node) {
if (node == null || node.getId() == null) return "";
- WikiPreferences prefs =
(WikiPreferences)Preferences.getInstance("Wiki");
- return Component.getInstance("basePath") + "/" +
node.getPermURL(prefs.getPermlinkSuffix());
+ return Component.getInstance("basePath") + "/" +
node.getPermURL(Preferences.getInstance(WikiPreferences.class).getPermlinkSuffix());
}
public static String renderWikiURL(WikiNode node) {
@@ -138,10 +143,9 @@
}
public static boolean showEmailAddress() {
- WikiPreferences prefs =
(WikiPreferences)Preferences.getInstance("Wiki");
- if (prefs.isShowEmailToLoggedInOnly() &&
Identity.instance().isLoggedIn()) {
+ if (Preferences.getInstance(WikiPreferences.class).isShowEmailToLoggedInOnly()
&& Identity.instance().isLoggedIn()) {
return true;
- } else if (!prefs.isShowEmailToLoggedInOnly()) {
+ } else if
(!Preferences.getInstance(WikiPreferences.class).isShowEmailToLoggedInOnly()) {
return true;
}
return false;
@@ -177,15 +181,13 @@
}
public static String escapeEmailURL(String string) {
- WikiPreferences wikiPrefs = (WikiPreferences)
Preferences.getInstance("Wiki");
return string.length() >= 7 && string.substring(0,
7).equals("mailto:")
- ? string.replaceAll("@", wikiPrefs.getAtSymbolReplacement())
+ ? string.replaceAll("@",
Preferences.getInstance(WikiPreferences.class).getAtSymbolReplacement())
: string;
}
public static String escapeAtSymbol(String string) {
- WikiPreferences wikiPrefs = (WikiPreferences)
Preferences.getInstance("Wiki");
- return string.replaceAll("@", wikiPrefs.getAtSymbolReplacement());
+ return string.replaceAll("@",
Preferences.getInstance(WikiPreferences.class).getAtSymbolReplacement());
}
public static String escapeHtml(String string, boolean convertNewlines) {
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-01-29
07:59:33 UTC (rev 7281)
@@ -4,7 +4,7 @@
<PREFERENCE PREF_ID = "1" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME = "baseUrl"
STRING_VALUE = "http://localhost:8080/wiki" LONG_VALUE = "[NULL]"
BOOLEAN_VALUE = "[NULL]"/>
<PREFERENCE PREF_ID = "2" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME = "timeZone"
STRING_VALUE = "CET" LONG_VALUE = "[NULL]" BOOLEAN_VALUE =
"[NULL]"/>
- <PREFERENCE PREF_ID = "3" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME = "themeName"
STRING_VALUE = "sfwkorg" LONG_VALUE = "[NULL]" BOOLEAN_VALUE =
"[NULL]"/>
+ <PREFERENCE PREF_ID = "3" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME = "themeName"
STRING_VALUE = "default" LONG_VALUE = "[NULL]" BOOLEAN_VALUE =
"[NULL]"/>
<PREFERENCE PREF_ID = "4" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME = "memberArea"
STRING_VALUE = "Members" LONG_VALUE = "[NULL]" BOOLEAN_VALUE =
"[NULL]"/>
<PREFERENCE PREF_ID = "5" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME = "helpArea"
STRING_VALUE = "Help" LONG_VALUE = "[NULL]" BOOLEAN_VALUE =
"[NULL]"/>
<PREFERENCE PREF_ID = "6" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME =
"defaultDocumentId" STRING_VALUE = "[NULL]" LONG_VALUE = "6"
BOOLEAN_VALUE = "[NULL]"/>
@@ -21,6 +21,7 @@
<PREFERENCE PREF_ID = "17" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME =
"showEmailToLoggedInOnly" STRING_VALUE = "[NULL]" LONG_VALUE =
"[NULL]" BOOLEAN_VALUE = "true"/>
<PREFERENCE PREF_ID = "18" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME = "trashArea"
STRING_VALUE = "Trash" LONG_VALUE = "[NULL]" BOOLEAN_VALUE =
"[NULL]"/>
<PREFERENCE PREF_ID = "19" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME =
"showSiteFeedInMenu" STRING_VALUE = "[NULL]" LONG_VALUE =
"[NULL]" BOOLEAN_VALUE = "true"/>
+ <PREFERENCE PREF_ID = "20" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "Wiki" PROPERTY_NAME =
"workspaceSwitcherDescriptionLength" STRING_VALUE = "[NULL]"
LONG_VALUE = "25" BOOLEAN_VALUE = "[NULL]"/>
<PREFERENCE PREF_ID = "50" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "DocEditor" PROPERTY_NAME =
"minorRevisionEnabled" STRING_VALUE = "[NULL]" LONG_VALUE =
"[NULL]" BOOLEAN_VALUE = "true"/>
<PREFERENCE PREF_ID = "51" OBJ_VERSION = "0" USER_ID =
"[NULL]" ENTITY_NAME = "DocEditor" PROPERTY_NAME =
"regularEditAreaRows" STRING_VALUE = "[NULL]" LONG_VALUE =
"15" BOOLEAN_VALUE = "[NULL]"/>
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/BasicNodeOperations.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/BasicNodeOperations.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/BasicNodeOperations.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -14,6 +14,7 @@
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiNode;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
import org.jboss.seam.faces.Redirect;
import org.testng.annotations.Test;
@@ -29,7 +30,38 @@
);
}
+
@Test
+ public void editDirectory() throws Exception {
+
+ final String conversationId = new NonFacesRequest("/dirEdit_d.xhtml")
{
+ protected void beforeRequest() {
+ setParameter("directoryId", "2");
+ }
+ }.run();
+
+ new FacesRequest("/dirEdit_d.xhtml") {
+
+ protected void beforeRequest() {
+ setParameter("cid", conversationId);
+ }
+
+ protected void invokeApplication() throws Exception {
+ DirectoryHome dirHome = (DirectoryHome)getInstance(DirectoryHome.class);
+ dirHome.initEditor();
+
+ assert dirHome.getInstance().getId().equals(2l);
+ assert dirHome.isHasFeed();
+ assert dirHome.getChildDocuments().size() == 1;
+ assert dirHome.getMenuItems().size() == 0;
+ assert dirHome.getAvailableMenuItems().size() == 0;
+ assert dirHome.getChildNodes().size() == 1;
+ }
+
+ }.run();
+ }
+
+ @Test
public void deleteDirectory() throws Exception {
final String conversationId = new NonFacesRequest("/dirEdit_d.xhtml")
{
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Uploading.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Uploading.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Uploading.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -71,7 +71,7 @@
protected void invokeApplication() throws Exception {
UploadHome uploadHome = (UploadHome)getInstance(UploadHome.class);
- uploadHome.setEdit(true);
+ uploadHome.initEditor();
assert
uploadHome.getInstance().getFilename().equals("testupload2.zip");
assert
uploadHome.getUploadEditor().getClass().equals(WikiUploadEditor.class);
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -59,7 +59,7 @@
if (macro.getName().equals("lastModifiedDocuments")) {
LastModifiedDocumentsPreferences lmdPrefs =
-
(LastModifiedDocumentsPreferences)Preferences.getInstance("LastModifiedDocuments",
"currentMacro");
+
Preferences.getInstance(LastModifiedDocumentsPreferences.class,
"currentMacro");
assert lmdPrefs.getDocumentTitleLength().equals(60l);
}
@@ -119,7 +119,7 @@
if (macro.getName().equals("lastModifiedDocuments")) {
LastModifiedDocumentsPreferences lmdPrefs =
-
(LastModifiedDocumentsPreferences)Preferences.getInstance("LastModifiedDocuments",
"currentMacro");
+
Preferences.getInstance(LastModifiedDocumentsPreferences.class,
"currentMacro");
assert lmdPrefs.getDocumentTitleLength().equals(66l);
}
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -38,7 +38,7 @@
}
protected void renderResponse() throws Exception {
- WikiPreferences wikiPrefs = (WikiPreferences)
Preferences.getInstance("Wiki");
+ WikiPreferences wikiPrefs =
Preferences.getInstance(WikiPreferences.class);
assert wikiPrefs.getShowDocumentCreatorHistory();
assert wikiPrefs.getShowTags();
assert wikiPrefs.getDefaultDocumentId().equals(6l);
@@ -101,7 +101,7 @@
}
protected void renderResponse() throws Exception {
- WikiPreferences wikiPrefs = (WikiPreferences)
Preferences.getInstance("Wiki");
+ WikiPreferences wikiPrefs =
Preferences.getInstance(WikiPreferences.class);
assert wikiPrefs.getPermlinkSuffix().equals(".newsuffix");
}
Modified:
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java
===================================================================
---
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java 2008-01-29
07:06:47 UTC (rev 7280)
+++
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java 2008-01-29
07:59:33 UTC (rev 7281)
@@ -88,7 +88,7 @@
}
protected void renderResponse() throws Exception {
- DocumentEditorPreferences docEditorPrefs = (DocumentEditorPreferences)
Preferences.getInstance("DocEditor");
+ DocumentEditorPreferences docEditorPrefs =
Preferences.getInstance(DocumentEditorPreferences.class);
assert !docEditorPrefs.getMinorRevisionEnabled();
}
@@ -105,7 +105,7 @@
}
protected void renderResponse() throws Exception {
- DocumentEditorPreferences docEditorPrefs = (DocumentEditorPreferences)
Preferences.getInstance("DocEditor");
+ DocumentEditorPreferences docEditorPrefs =
Preferences.getInstance(DocumentEditorPreferences.class);
assert docEditorPrefs.getMinorRevisionEnabled();
}
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-01-29 07:59:33 UTC (rev 7281)
@@ -472,10 +472,9 @@
<h:outputText
value="#{messages['lacewiki.label.dirDisplay.Owner']}"/>
</f:facet>
<s:span styleClass="undecoratedLink"
rendered="#{node.ownedByRegularUser}">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{node.createdBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(node.createdBy)}">
<h:outputText value="#{node.createdBy.fullname}"/>
- </s:link>
+ </h:outputLink>
</s:span>
<h:outputText rendered="#{not node.ownedByRegularUser}"
value="#{node.createdBy.fullname}"/>
</h:column>
@@ -502,10 +501,9 @@
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{node.lastModifiedBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(node.lastModifiedBy.createdBy)}">
<h:outputText
value="#{node.lastModifiedBy.username}"/>
- </s:link>
+ </h:outputLink>
</s:span>)
</h:column>
Modified: trunk/examples/wiki/view/docDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_m.xhtml 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/view/docDisplay_m.xhtml 2008-01-29 07:59:33 UTC (rev 7281)
@@ -226,10 +226,9 @@
</h:outputText>
<s:div
rendered="#{c.ownedByRegularUser}">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{c.createdBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(c.createdBy)}">
<h:outputText
value="#{c.createdBy.fullname}"/>
- </s:link>
+ </h:outputLink>
<s:fragment
rendered="#{wiki:showEmailAddress()}">
<br/>
<h:outputLink
value="#{wiki:escapeEmailURL(wiki:concat('mailto:',
c.createdBy.email))}">
Modified: trunk/examples/wiki/view/includes/commentsDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-01-29 07:06:47 UTC (rev
7280)
+++ trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-01-29 07:59:33 UTC (rev
7281)
@@ -59,10 +59,9 @@
</s:div>
<s:div rendered="#{c.ownedByRegularUser}">
<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{c.createdBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(c.createdBy)}">
<h:outputText
value="#{c.createdBy.fullname}"/>
- </s:link>
+ </h:outputLink>
</s:span>
<s:fragment
rendered="#{wiki:showEmailAddress()}">
<h:outputText
value=" | "/>
@@ -87,12 +86,11 @@
<s:fragment rendered="#{c.ownedByRegularUser and !empty
c.createdBy.profile.imageContentType}">
<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{c.createdBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(c.createdBy)}">
<s:graphicImage
styleClass="commentAuthorPortraitImage"
value="#{c.createdBy.profile.image}">
<s:transformImageSize width="30"
maintainRatio="true"/>
</s:graphicImage>
- </s:link>
+ </h:outputLink>
</s:span>
</s:fragment>
Modified: trunk/examples/wiki/view/includes/userInfoLink.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfoLink.xhtml 2008-01-29 07:06:47 UTC (rev
7280)
+++ trunk/examples/wiki/view/includes/userInfoLink.xhtml 2008-01-29 07:59:33 UTC (rev
7281)
@@ -9,10 +9,9 @@
xmlns:s="http://jboss.com/products/seam/taglib">
<s:div styleClass="undecoratedLink"
rendered="#{wiki:isRegularUser(user)}">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId" value="#{user.id}"/>
+ <h:outputLink value="#{wiki:renderUserInfoURL(user)}">
<h:outputText value="#{user.fullname}"/>
- </s:link>
+ </h:outputLink>
</s:div>
<s:div rendered="#{not wiki:isRegularUser(user)}">
<h:outputText value="#{user.fullname}"/>
Modified: trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml 2008-01-29 07:06:47 UTC
(rev 7280)
+++ trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml 2008-01-29 07:59:33 UTC
(rev 7281)
@@ -107,10 +107,9 @@
<f:convertDateTime pattern="dd. MMM yyyy,
HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{q.lastModifiedBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(q.lastModifiedBy)}">
<h:outputText
value="#{q.lastModifiedBy.username}"/>
- </s:link>
+ </h:outputLink>
</s:span>)
</s:fragment>
</h:column>
Modified: trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml 2008-01-29
07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml 2008-01-29
07:59:33 UTC (rev 7281)
@@ -97,10 +97,9 @@
</s:div>
<s:div rendered="#{currentDocument.ownedByRegularUser}">
<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{currentDocument.createdBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(currentDocument.createdBy)}">
<h:outputText
value="#{currentDocument.createdBy.fullname}"/>
- </s:link>
+ </h:outputLink>
</s:span>
<s:fragment rendered="#{wiki:showEmailAddress()}">
<h:outputText value=" | "/>
@@ -116,12 +115,11 @@
<s:fragment rendered="#{currentDocument.ownedByRegularUser and !empty
currentDocument.createdBy.profile.imageContentType}">
<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{currentDocument.createdBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(currentDocument.createdBy)}">
<s:graphicImage
styleClass="commentAuthorPortraitImage"
value="#{currentDocument.createdBy.profile.image}">
<s:transformImageSize width="30"
maintainRatio="true"/>
</s:graphicImage>
- </s:link>
+ </h:outputLink>
</s:span>
</s:fragment>
Modified: trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml 2008-01-29
07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml 2008-01-29
07:59:33 UTC (rev 7281)
@@ -23,14 +23,27 @@
<h:column>
<s:div styleClass="lastModifiedAuthorDate
smallFont">
- <h:outputText
value="(#{doc.lastModifiedBy.username}) "
- rendered="#{!empty doc.lastModifiedBy and
preferences.get('LastModifiedDocuments', currentMacro).showUsernames}">
- </h:outputText>
+
+ <s:fragment
rendered="#{preferences.get('LastModifiedDocuments',
currentMacro).showUsernames}">
+
+ <s:span styleClass="undecoratedLink"
rendered="#{wiki:isRegularUser(doc.lastModifiedBy)}">
+ <h:outputLink
value="#{wiki:renderUserInfoURL(doc.lastModifiedBy)}">
+ <h:outputText
value="#{doc.lastModifiedBy.username}"/>
+ </h:outputLink>
+ </s:span>
+ <s:span rendered="#{not
wiki:isRegularUser(doc.lastModifiedBy)}">
+ <h:outputText
value="#{doc.lastModifiedBy.username}"/>
+ </s:span>
+
+ <h:outputText value=" "/>
+ </s:fragment>
+
<h:outputText value="#{doc.lastModifiedOn}"
rendered="#{!empty
doc.lastModifiedOn}">
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
<h:outputText
value=" #{preferences.get('Wiki').timeZone}"/>
+
</s:div>
<s:div styleClass="lastModifiedTitle
wrapWhitespace">
Modified: trunk/examples/wiki/view/tagDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-01-29 07:59:33 UTC (rev 7281)
@@ -84,10 +84,9 @@
<h:outputText
value="#{messages['lacewiki.label.tagDisplay.Owner']}"/>
</f:facet>
<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{file.createdBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(file.createdBy)}">
<h:outputText value="#{file.createdBy.fullname}"/>
- </s:link>
+ </h:outputLink>
</s:span>
</h:column>
<h:column>
@@ -106,10 +105,9 @@
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{file.lastModifiedBy.id}"/>
+ <h:outputLink
value="#{wiki:renderUserInfoURL(file.lastModifiedBy)}">
<h:outputText
value="#{file.lastModifiedBy.username}"/>
- </s:link>
+ </h:outputLink>
</s:span>)
</h:column>
<h:column rendered="#{empty file.lastModifiedOn or empty
file.lastModifiedBy}">
Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml 2008-01-29 07:06:47 UTC (rev 7280)
+++ trunk/examples/wiki/view/userList_d.xhtml 2008-01-29 07:59:33 UTC (rev 7281)
@@ -155,10 +155,9 @@
<h:outputText value="#{u.username}"/>
</s:fragment>
<s:fragment rendered="#{not u.admin and not u.guest}">
- <s:link view="/userInfo_#{skin}.xhtml"
propagation="none">
- <f:param name="userId"
value="#{u.id}"/>
- <h:outputText rendered="#{empty u.memberHome}"
value="#{u.username}"/>
- </s:link>
+ <h:outputLink value="#{wiki:renderUserInfoURL(u)}">
+ <h:outputText value="#{u.username}"/>
+ </h:outputLink>
<h:outputText rendered="#{!u.activated}"
value=" (#{messages['lacewiki.label.userList.NotActivated']})"/>
</s:fragment>
</h:column>