[seam-commits] Seam SVN: r7425 - in trunk/examples/wiki: src/etc/WEB-INF and 38 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Feb 14 21:30:12 EST 2008


Author: christian.bauer at jboss.com
Date: 2008-02-14 21:30:12 -0500 (Thu, 14 Feb 2008)
New Revision: 7425

Added:
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java
Removed:
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiLinkResolver.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiTextRenderer.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/MacroWikiTextRenderer.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/NullWikiTextRenderer.java
Modified:
   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/META-INF/components-test.xml
   trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
   trunk/examples/wiki/src/etc/WEB-INF/pages.xml
   trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
   trunk/examples/wiki/src/etc/i18n/messages_en.properties
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.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/DocumentHome.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearchSupport.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.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/preferences/InstancePreferencesTests.java
   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/docEdit_d.xhtml
   trunk/examples/wiki/view/includes/attachmentDisplay.xhtml
   trunk/examples/wiki/view/includes/breadcrumb.xhtml
   trunk/examples/wiki/view/includes/commentsDisplay.xhtml
   trunk/examples/wiki/view/includes/mainMenuItem.xhtml
   trunk/examples/wiki/view/includes/searchControl.xhtml
   trunk/examples/wiki/view/includes/userControl.xhtml
   trunk/examples/wiki/view/includes/userInfoLink.xhtml
   trunk/examples/wiki/view/includes/wikiUploadImageEditor.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/dirMenu/dirMenuItem.xhtml
   trunk/examples/wiki/view/plugins/dirMenu/plugin.xhtml
   trunk/examples/wiki/view/plugins/docPager/plugin.xhtml
   trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml
   trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
   trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
   trunk/examples/wiki/view/plugins/forumList/forumListControls.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/forumTopics/topicControls.xhtml
   trunk/examples/wiki/view/plugins/forumTopics/topicPager.xhtml
   trunk/examples/wiki/view/plugins/forumTopics/topicTable.xhtml
   trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml
   trunk/examples/wiki/view/plugins/tags/plugin.xhtml
   trunk/examples/wiki/view/tagDisplay_d.xhtml
   trunk/examples/wiki/view/themes/default/css/searchControl.css
   trunk/examples/wiki/view/themes/default/m/template.xhtml
   trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml
   trunk/examples/wiki/view/themes/default/template.xhtml
   trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
   trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml
   trunk/examples/wiki/view/themes/inrelationto/template.xhtml
   trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
   trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml
   trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
   trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
   trunk/examples/wiki/view/uploadEdit_d.xhtml
   trunk/examples/wiki/view/uploadEdit_m.xhtml
   trunk/examples/wiki/view/userList_d.xhtml
Log:
Submit search form on Enter, nicer URLs for search and after editing, unified URL rendering

Modified: trunk/examples/wiki/src/etc/META-INF/components-dev.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-dev.xml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/etc/META-INF/components-dev.xml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -59,11 +59,11 @@
     </component>
 
     <!-- Base path for links includes port number -->
-    <factory name="basePath"
+    <factory name="basePath" scope="CONVERSATION"  auto-create="true"
              value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
                      }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
 
-    <factory name="themePathGetRequest" scope="CONVERSATION"
+    <factory name="themePathGetRequest" scope="CONVERSATION"  auto-create="true"
              value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
                      }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
 

Modified: trunk/examples/wiki/src/etc/META-INF/components-prod.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-prod.xml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/etc/META-INF/components-prod.xml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -42,11 +42,11 @@
     <persistence:entity-manager-factory name="wikiEntityManagerFactory" persistence-unit-name="wiki"/>
 
     <!-- Base path for links includes port number -->
-    <factory name="basePath"
+    <factory name="basePath" scope="CONVERSATION"  auto-create="true"
              value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
                      }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
 
-    <factory name="themePathGetRequest" scope="CONVERSATION"
+    <factory name="themePathGetRequest" scope="CONVERSATION"  auto-create="true"
              value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
                      }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
 

Modified: trunk/examples/wiki/src/etc/META-INF/components-test.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-test.xml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/etc/META-INF/components-test.xml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -42,11 +42,11 @@
     <transaction:ejb-transaction/>
 
     <!-- Base path for links includes port number -->
-    <factory name="basePath"
+    <factory name="basePath" scope="CONVERSATION"  auto-create="true"
              value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
                      }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
 
-    <factory name="themePathGetRequest" scope="CONVERSATION"
+    <factory name="themePathGetRequest" scope="CONVERSATION"  auto-create="true"
              value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
                      }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
 

Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -13,48 +13,6 @@
     </function>
 
     <function>
-        <function-name>renderTagURL</function-name>
-        <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
-        <function-signature>java.lang.String renderTagURL(java.lang.String)</function-signature>
-    </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>
-    </function>
-
-    <function>
-        <function-name>renderFeedURL</function-name>
-        <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
-        <function-signature>java.lang.String renderFeedURL(org.jboss.seam.wiki.core.model.Feed,java.lang.String,java.lang.String)</function-signature>
-    </function>
-
-    <function>
-        <function-name>renderURL</function-name>
-        <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
-        <function-signature>java.lang.String renderURL(org.jboss.seam.wiki.core.model.WikiNode)</function-signature>
-    </function>
-
-    <function>
-        <function-name>renderPermURL</function-name>
-        <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
-        <function-signature>java.lang.String renderPermURL(org.jboss.seam.wiki.core.model.WikiNode)</function-signature>
-    </function>
-
-    <function>
-        <function-name>renderWikiURL</function-name>
-        <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
-        <function-signature>java.lang.String renderWikiURL(org.jboss.seam.wiki.core.model.WikiNode)</function-signature>
-    </function>
-
-    <function>
         <function-name>showEmailAddress</function-name>
         <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
         <function-signature>boolean showEmailAddress()</function-signature>

Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -27,6 +27,9 @@
                     <param name="nodeId" value="#{documentHome.instance.id}"/>
                 </redirect>
             </rule>
+            <rule if-outcome="redirectToDocumentNoConversation">
+                <redirect url="#{wikiURLRenderer.renderURL(documentHome.instance)}"/>
+            </rule>
         </navigation>
     </page>
 
@@ -68,7 +71,7 @@
         <navigation>
             <rule if-outcome="exitManaged">
                 <end-conversation before-redirect="true"/>
-                <redirect view-id="/docDisplay_#{skin}"/>
+                <redirect url="#{wikiURLRenderer.renderURL(documentHome.instance)}"/>
             </rule>
             <rule if-outcome="exitUnmanaged">
                 <end-conversation before-redirect="true"/>
@@ -214,7 +217,7 @@
             </rule>
             <rule if-outcome="removed">
                 <end-conversation/>
-                <redirect view-id="/wiki.xhtml"/>
+                <redirect url="#{wikiURLRenderer.renderURL(wikiStart)}"/>
             </rule>
         </navigation>
     </page>
@@ -267,12 +270,12 @@
             <!-- Go to start page on logout because the session has been invalidated -->
             <rule if-outcome="loggedOut">
                 <end-conversation before-redirect="true"/>
-                <redirect view-id="/wiki.xhtml"/>
+                <redirect url="#{wikiURLRenderer.renderURL(wikiStart)}"/>
             </rule>
 
-            <!-- 'search' is a POST submit, turn it into a bookmarkable GET -->
+            <!-- 'search' is a POST submit, turn it into a bookmarkable nice GET -->
             <rule if-outcome="search">
-                <redirect view-id="/search_#{skin}.xhtml"/>
+                <redirect url="#{wikiURLRenderer.renderSearchURL(wikiSearch.simpleQuery)}"/>
             </rule>
 
             <rule if-outcome="error">

Modified: trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -52,6 +52,12 @@
         <to last="true">/wiki.seam?nodeId=$1</to>
      </rule>
 
+    <!-- /search/foo -->
+    <rule>
+        <from casesensitive="true">^/search/(.+)$</from>
+        <to last="true">/search_%{session-attribute:skin}.seam?query=$1</to>
+    </rule>
+
     <!-- /user/foo -->
     <rule>
         <from casesensitive="true">^/user/([a-zA-Z]?[a-zA-Z0-9]+)$</from>

Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties	2008-02-15 02:30:12 UTC (rev 7425)
@@ -342,8 +342,7 @@
 # Search Control
 
 lacewiki.label.searchControl.Search=Search...
-lacewiki.button.searchControl.Find=<u>F</u>ind
-lacewiki.button.searchControl.Find.accesskey=F
+lacewiki.button.searchControl.Find=Find
 
 # Administration
 

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-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -19,7 +19,8 @@
 import org.jboss.seam.wiki.core.action.prefs.UserManagementPreferences;
 import org.jboss.seam.wiki.core.dao.UserDAO;
 import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
-import org.jboss.seam.wiki.core.engine.MacroWikiTextRenderer;
+import org.jboss.seam.wiki.core.renderer.MacroWikiTextRenderer;
+import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
 import org.jboss.seam.wiki.core.model.*;
 import org.jboss.seam.wiki.util.Hash;
 import org.jboss.seam.wiki.util.WikiUtil;
@@ -130,6 +131,7 @@
     public void createHomeDirectory(User user) {
 
         WikiNodeDAO nodeDAO = (WikiNodeDAO)Component.getInstance(WikiNodeDAO.class);
+        WikiURLRenderer urlRenderer = (WikiURLRenderer)Component.getInstance(WikiURLRenderer.class);
 
         // Create home directory
         WikiDirectory memberArea = (WikiDirectory)Component.getInstance("memberArea");
@@ -145,7 +147,7 @@
 
         // Create feed for home directory
         WikiFeed feed = new WikiFeed();
-        feed.setLink(WikiUtil.renderURL(homeDirectory));
+        feed.setLink(urlRenderer.renderURL(homeDirectory));
         feed.setDirectory(homeDirectory);
         feed.setAuthor(homeDirectory.getCreatedBy().getFullname());
         feed.setTitle(homeDirectory.getName());

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-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -121,6 +121,7 @@
 
             Events.instance().raiseEvent("Comment.persisted");
             endConversation();
+            return "redirectToDocumentNoConversation";
         }
         return null; // Prevent navigation
     }
@@ -314,7 +315,7 @@
 
     public String cancel() {
         endConversation();
-        return "redirectToDocument";
+        return "redirectToDocumentNoConversation";
     }
 
     @RequestParameter("showCommentForm")

Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java (from rev 7424, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiLinkResolver.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java	                        (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -0,0 +1,252 @@
+package org.jboss.seam.wiki.core.action;
+
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.engine.WikiLinkResolver;
+import org.jboss.seam.wiki.core.engine.WikiLink;
+import org.jboss.seam.wiki.util.WikiUtil;
+
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * A default implementation of <tt>WikiLinkResolver</tt>.
+ *
+ * @author Christian Bauer
+ */
+ at Name("wikiLinkResolver")
+ at AutoCreate
+public class DefaultWikiLinkResolver implements WikiLinkResolver {
+
+    @Logger static Log log;
+
+    // Render these strings whenever [=>wiki://123] needs to be resolved but can't
+    public static final String BROKENLINK_URL = "FileNotFound";
+    public static final String BROKENLINK_DESCRIPTION = "?BROKEN LINK?";
+
+    @In
+    private WikiNodeDAO wikiNodeDAO;
+
+    @In
+    Map<String, LinkProtocol> linkProtocolMap;
+
+    public String convertToWikiProtocol(Set<WikiFile> linkTargets, Long currentAreaNumber, String wikiText) {
+        if (wikiText == null) return null;
+
+        log.debug("converting wiki text links to wiki protocol for storage, current area: " + currentAreaNumber);
+
+        StringBuffer replacedWikiText = new StringBuffer(wikiText.length());
+        Matcher matcher = Pattern.compile(REGEX_WIKILINK_FORWARD).matcher(wikiText);
+
+        // Replace with [Link Text=>wiki://<node id>] or leave as is if not found
+        while (matcher.find()) {
+            String linkText = matcher.group(2);
+
+            if (linkText.matches(REGEX_KNOWN_PROTOCOL) || linkText.matches(REGEX_CUSTOM_PROTOCOL)) continue;
+
+            log.debug("converting to wiki protocol: " + linkText);
+
+            WikiFile file = null;
+            String fragment = null;
+            Matcher linkTextMatcher = getCrossAreaMatcher(linkText);
+            if (linkTextMatcher != null) {
+                log.debug("link to different area: " + linkTextMatcher.group(1));
+                file = resolve(currentAreaNumber, linkTextMatcher.group(1), linkTextMatcher.group(2));
+                fragment = linkTextMatcher.group(3);
+            } else {
+                log.debug("link to current area");
+                linkTextMatcher = getAreaMatcher(linkText);
+                if (linkTextMatcher != null) {
+                    file = resolve(currentAreaNumber, null, linkTextMatcher.group(1));
+                    fragment = linkTextMatcher.group(2);
+                }
+            }
+
+            log.debug("resolved file: "  + file);
+            log.debug("resolved fragment: " + fragment);
+
+            if (file != null) {
+                if (fragment == null) fragment = "";
+                log.debug("updating wiki text with wiki protocol link: " + "wiki://" + file.getId() + ""+fragment);
+                matcher.appendReplacement(replacedWikiText, "[$1=>wiki://" + file.getId() + ""+fragment+"]");
+                linkTargets.add(file);
+            }
+        }
+        matcher.appendTail(replacedWikiText);
+        log.debug("completed converting wiki text links to wiki protocol, ready for storing");
+        return replacedWikiText.toString();
+    }
+
+    public String convertFromWikiProtocol(Long currentAreaNumber, String wikiText) {
+        if (wikiText == null) return null;
+        
+        log.debug("converting wiki protocol to wiki text, current area: " + currentAreaNumber);
+
+        StringBuffer replacedWikiText = new StringBuffer(wikiText.length());
+        Matcher matcher = Pattern.compile(REGEX_WIKILINK_REVERSE).matcher(wikiText);
+
+        // Replace with [Link Text=>Page Name] or replace with BROKENLINK "page name"
+        while (matcher.find()) {
+
+            String fileId = matcher.group(2);
+            String fragment = matcher.group(3);
+            log.debug("found file id: " + fileId);
+            log.debug("found fragment: " + fragment);
+            if (fragment == null) fragment = "";
+
+            // Find the node by PK
+            WikiFile file = wikiNodeDAO.findWikiFile(Long.valueOf(fileId));
+
+            // Node is in current area, just use its name
+            if (file != null && file.getAreaNumber().equals(currentAreaNumber)) {
+                matcher.appendReplacement(replacedWikiText, "[$1=>" + file.getName() + fragment +"]");
+
+            // Node is in different area, prepend the area name
+            } else if (file != null && !file.getAreaNumber().equals(currentAreaNumber)) {
+                WikiDirectory area = wikiNodeDAO.findArea(file.getAreaNumber());
+                matcher.appendReplacement(replacedWikiText, "[$1=>" + area.getName() + "|" + file.getName() + fragment +"]");
+
+            // Couldn't find it anymore, its a broken link
+            } else {
+                matcher.appendReplacement(replacedWikiText, "[$1=>" + BROKENLINK_DESCRIPTION + "]");
+            }
+        }
+        matcher.appendTail(replacedWikiText);
+        log.debug("completed converting wiki protocol to wiki text");
+        return replacedWikiText.toString();
+    }
+
+    public void resolveLinkText(Long currentAreaNumber, Map<String, WikiLink> links, String linkText) {
+
+        // Don't resolve twice
+        if (links.containsKey(linkText)) return;
+
+        log.debug("trying to resolve link text: " + linkText);
+
+        Matcher wikiProtocolMatcher = Pattern.compile(REGEX_WIKI_PROTOCOL).matcher(linkText.trim());
+        Matcher knownProtocolMatcher = Pattern.compile(REGEX_KNOWN_PROTOCOL).matcher(linkText.trim());
+        Matcher customProtocolMatcher = Pattern.compile(REGEX_CUSTOM_PROTOCOL).matcher(linkText.trim());
+
+        WikiLink wikiLink;
+
+        // Check if its a common protocol
+        if (knownProtocolMatcher.find()) {
+            wikiLink = new WikiLink(false, true);
+            wikiLink.setUrl(linkText);
+            wikiLink.setDescription(linkText);
+            log.debug("link resolved to known protocol: " + linkText);
+
+        // Check if it is a wiki protocol
+        } else if (wikiProtocolMatcher.find()) {
+
+            // Find the node by PK
+            WikiFile file = wikiNodeDAO.findWikiFile(Long.valueOf(wikiProtocolMatcher.group(1)));
+            String fragment = wikiProtocolMatcher.group(2);
+            if (file != null) {
+                wikiLink = new WikiLink(false, false);
+                wikiLink.setFile(file);
+                wikiLink.setFragment(fragment);
+                wikiLink.setDescription(file.getName());
+                log.debug("link text resolved to existing node: " + file + " and fragment: " + fragment);
+            } else {
+                // Can't do anything, [=>wiki://123] no longer exists
+                wikiLink = new WikiLink(true, false);
+                wikiLink.setUrl(BROKENLINK_URL);
+                wikiLink.setDescription(BROKENLINK_DESCRIPTION);
+                log.debug("link tet could not be resolved: " + linkText);
+            }
+
+        // Check if it is a custom protocol
+        } else if (customProtocolMatcher.find()) {
+
+            if (linkProtocolMap.containsKey(customProtocolMatcher.group(1))) {
+                LinkProtocol protocol = linkProtocolMap.get(customProtocolMatcher.group(1));
+                wikiLink = new WikiLink(false, true);
+                wikiLink.setUrl(protocol.getRealLink(customProtocolMatcher.group(2)));
+                wikiLink.setDescription(protocol.getPrefix() + "://" + customProtocolMatcher.group(2));
+                log.debug("link text resolved to custom protocol: " + linkText);
+            } else {
+                wikiLink = new WikiLink(true, false);
+                wikiLink.setUrl(BROKENLINK_URL);
+                wikiLink.setDescription(BROKENLINK_DESCRIPTION);
+                log.debug("link text resolved to non-existant custom protocol: " + linkText);
+            }
+
+        // It must be a stored clear text link, such as [=>Target Name] or [=>Area Name|Target Name]
+        // (This can happen if the string [foo=>bar] or [foo=>bar|baz] was stored in the database because the
+        //  targets didn't exist at the time of saving)
+        } else {
+
+            // Try a WikiWord search in the current or named area
+            WikiFile file = null;
+            String fragment = null;
+            Matcher linkTextMatcher = getCrossAreaMatcher(linkText);
+            if (linkTextMatcher != null) {
+                file = resolve(currentAreaNumber, linkTextMatcher.group(1), linkTextMatcher.group(2));
+                fragment = linkTextMatcher.group(3);
+            } else {
+                linkTextMatcher = getAreaMatcher(linkText);
+                if (linkTextMatcher != null) {
+                    file = resolve(currentAreaNumber, null, linkTextMatcher.group(1));
+                    fragment = linkTextMatcher.group(2);
+                }
+            }
+
+            if (file!=null) {
+                wikiLink = new WikiLink(false, false);
+                wikiLink.setFile(file);
+                wikiLink.setFragment(fragment);
+                wikiLink.setDescription(file.getName());
+                // Indicate that caller should update the wiki text that contains this link
+                wikiLink.setRequiresUpdating(true);
+                log.debug("link text resolved (needs updating to wiki protocol): " + file + " and fragment: " + fragment);
+
+            } else {
+                /* TODO: Not sure we should actually implement this..., one of these things that the wiki "designers" got wrong
+                // OK, so it's not any recognized URL and we can't find a node with that wikiname
+                // Let's assume its a page name and render /Area/WikiLink (but encoded, so it gets transported fully)
+                // into the edit page when the user clicks on the link to create the document
+                try {
+                    String encodedPagename = currentDirectory.getWikiname() + "/" + URLEncoder.encode(linkText, "UTF-8");
+                    wikiLink = new WikiLink(null, true, encodedPagename, linkText);
+                } catch (UnsupportedEncodingException e) {
+                    throw new RuntimeException(e); // Java is so great...
+                }
+                */
+                wikiLink = new WikiLink(true, false);
+                wikiLink.setUrl(BROKENLINK_URL);
+                wikiLink.setDescription(BROKENLINK_DESCRIPTION);
+                log.debug("could not resolve link: " + linkText);
+            }
+        }
+        links.put(linkText, wikiLink);
+    }
+
+    private Matcher getCrossAreaMatcher(String linkText) {
+        Matcher matcher = Pattern.compile(REGEX_WIKILINK_CROSSAREA).matcher(linkText);
+        return matcher.find() ? matcher : null;
+    }
+
+    private Matcher getAreaMatcher(String linkText) {
+        Matcher matcher = Pattern.compile(REGEX_NODE_NAME_FRAGMENT).matcher(linkText);
+        return matcher.find() ? matcher : null;
+    }
+
+    private WikiFile resolve(Long currentAreaNumber, String areaName, String nodeName) {
+        log.debug("trying to resolve, current area " + currentAreaNumber + ", search in area '" + areaName + "' for node name: " + nodeName);
+        if (areaName != null) {
+            WikiNode crossLinkArea = wikiNodeDAO.findArea(WikiUtil.convertToWikiName(areaName));
+            if (crossLinkArea != null)
+                return wikiNodeDAO.findWikiFileInArea(crossLinkArea.getAreaNumber(), WikiUtil.convertToWikiName(nodeName));
+        }
+        return wikiNodeDAO.findWikiFileInArea(currentAreaNumber, WikiUtil.convertToWikiName(nodeName));
+    }
+
+}


Property changes on: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DefaultWikiLinkResolver.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

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-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -19,7 +19,7 @@
 import org.jboss.seam.wiki.core.feeds.FeedDAO;
 import org.jboss.seam.wiki.core.feeds.FeedEntryManager;
 import org.jboss.seam.wiki.core.engine.WikiLinkResolver;
-import org.jboss.seam.wiki.core.engine.MacroWikiTextRenderer;
+import org.jboss.seam.wiki.core.renderer.MacroWikiTextRenderer;
 import org.jboss.seam.wiki.core.model.*;
 import org.jboss.seam.wiki.preferences.Preferences;
 

Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiLinkResolver.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiLinkResolver.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiLinkResolver.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -1,250 +0,0 @@
-package org.jboss.seam.wiki.core.engine;
-
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
-import org.jboss.seam.wiki.core.model.*;
-import org.jboss.seam.wiki.util.WikiUtil;
-
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A default implementation of <tt>WikiLinkResolver</tt>.
- *
- * @author Christian Bauer
- */
- at Name("wikiLinkResolver")
- at AutoCreate
-public class DefaultWikiLinkResolver implements WikiLinkResolver {
-
-    @Logger static Log log;
-
-    // Render these strings whenever [=>wiki://123] needs to be resolved but can't
-    public static final String BROKENLINK_URL = "FileNotFound";
-    public static final String BROKENLINK_DESCRIPTION = "?BROKEN LINK?";
-
-    @In
-    private WikiNodeDAO wikiNodeDAO;
-
-    @In
-    Map<String, LinkProtocol> linkProtocolMap;
-
-    public String convertToWikiProtocol(Set<WikiFile> linkTargets, Long currentAreaNumber, String wikiText) {
-        if (wikiText == null) return null;
-
-        log.debug("converting wiki text links to wiki protocol for storage, current area: " + currentAreaNumber);
-
-        StringBuffer replacedWikiText = new StringBuffer(wikiText.length());
-        Matcher matcher = Pattern.compile(REGEX_WIKILINK_FORWARD).matcher(wikiText);
-
-        // Replace with [Link Text=>wiki://<node id>] or leave as is if not found
-        while (matcher.find()) {
-            String linkText = matcher.group(2);
-
-            if (linkText.matches(REGEX_KNOWN_PROTOCOL) || linkText.matches(REGEX_CUSTOM_PROTOCOL)) continue;
-
-            log.debug("converting to wiki protocol: " + linkText);
-
-            WikiFile file = null;
-            String fragment = null;
-            Matcher linkTextMatcher = getCrossAreaMatcher(linkText);
-            if (linkTextMatcher != null) {
-                log.debug("link to different area: " + linkTextMatcher.group(1));
-                file = resolve(currentAreaNumber, linkTextMatcher.group(1), linkTextMatcher.group(2));
-                fragment = linkTextMatcher.group(3);
-            } else {
-                log.debug("link to current area");
-                linkTextMatcher = getAreaMatcher(linkText);
-                if (linkTextMatcher != null) {
-                    file = resolve(currentAreaNumber, null, linkTextMatcher.group(1));
-                    fragment = linkTextMatcher.group(2);
-                }
-            }
-
-            log.debug("resolved file: "  + file);
-            log.debug("resolved fragment: " + fragment);
-
-            if (file != null) {
-                if (fragment == null) fragment = "";
-                log.debug("updating wiki text with wiki protocol link: " + "wiki://" + file.getId() + ""+fragment);
-                matcher.appendReplacement(replacedWikiText, "[$1=>wiki://" + file.getId() + ""+fragment+"]");
-                linkTargets.add(file);
-            }
-        }
-        matcher.appendTail(replacedWikiText);
-        log.debug("completed converting wiki text links to wiki protocol, ready for storing");
-        return replacedWikiText.toString();
-    }
-
-    public String convertFromWikiProtocol(Long currentAreaNumber, String wikiText) {
-        if (wikiText == null) return null;
-        
-        log.debug("converting wiki protocol to wiki text, current area: " + currentAreaNumber);
-
-        StringBuffer replacedWikiText = new StringBuffer(wikiText.length());
-        Matcher matcher = Pattern.compile(REGEX_WIKILINK_REVERSE).matcher(wikiText);
-
-        // Replace with [Link Text=>Page Name] or replace with BROKENLINK "page name"
-        while (matcher.find()) {
-
-            String fileId = matcher.group(2);
-            String fragment = matcher.group(3);
-            log.debug("found file id: " + fileId);
-            log.debug("found fragment: " + fragment);
-            if (fragment == null) fragment = "";
-
-            // Find the node by PK
-            WikiFile file = wikiNodeDAO.findWikiFile(Long.valueOf(fileId));
-
-            // Node is in current area, just use its name
-            if (file != null && file.getAreaNumber().equals(currentAreaNumber)) {
-                matcher.appendReplacement(replacedWikiText, "[$1=>" + file.getName() + fragment +"]");
-
-            // Node is in different area, prepend the area name
-            } else if (file != null && !file.getAreaNumber().equals(currentAreaNumber)) {
-                WikiDirectory area = wikiNodeDAO.findArea(file.getAreaNumber());
-                matcher.appendReplacement(replacedWikiText, "[$1=>" + area.getName() + "|" + file.getName() + fragment +"]");
-
-            // Couldn't find it anymore, its a broken link
-            } else {
-                matcher.appendReplacement(replacedWikiText, "[$1=>" + BROKENLINK_DESCRIPTION + "]");
-            }
-        }
-        matcher.appendTail(replacedWikiText);
-        log.debug("completed converting wiki protocol to wiki text");
-        return replacedWikiText.toString();
-    }
-
-    public void resolveLinkText(Long currentAreaNumber, Map<String, WikiLink> links, String linkText) {
-
-        // Don't resolve twice
-        if (links.containsKey(linkText)) return;
-
-        log.debug("trying to resolve link text: " + linkText);
-
-        Matcher wikiProtocolMatcher = Pattern.compile(REGEX_WIKI_PROTOCOL).matcher(linkText.trim());
-        Matcher knownProtocolMatcher = Pattern.compile(REGEX_KNOWN_PROTOCOL).matcher(linkText.trim());
-        Matcher customProtocolMatcher = Pattern.compile(REGEX_CUSTOM_PROTOCOL).matcher(linkText.trim());
-
-        WikiLink wikiLink;
-
-        // Check if its a common protocol
-        if (knownProtocolMatcher.find()) {
-            wikiLink = new WikiLink(false, true);
-            wikiLink.setUrl(linkText);
-            wikiLink.setDescription(linkText);
-            log.debug("link resolved to known protocol: " + linkText);
-
-        // Check if it is a wiki protocol
-        } else if (wikiProtocolMatcher.find()) {
-
-            // Find the node by PK
-            WikiFile file = wikiNodeDAO.findWikiFile(Long.valueOf(wikiProtocolMatcher.group(1)));
-            String fragment = wikiProtocolMatcher.group(2);
-            if (file != null) {
-                wikiLink = new WikiLink(false, false);
-                wikiLink.setFile(file);
-                wikiLink.setFragment(fragment);
-                wikiLink.setDescription(file.getName());
-                log.debug("link text resolved to existing node: " + file + " and fragment: " + fragment);
-            } else {
-                // Can't do anything, [=>wiki://123] no longer exists
-                wikiLink = new WikiLink(true, false);
-                wikiLink.setUrl(BROKENLINK_URL);
-                wikiLink.setDescription(BROKENLINK_DESCRIPTION);
-                log.debug("link tet could not be resolved: " + linkText);
-            }
-
-        // Check if it is a custom protocol
-        } else if (customProtocolMatcher.find()) {
-
-            if (linkProtocolMap.containsKey(customProtocolMatcher.group(1))) {
-                LinkProtocol protocol = linkProtocolMap.get(customProtocolMatcher.group(1));
-                wikiLink = new WikiLink(false, true);
-                wikiLink.setUrl(protocol.getRealLink(customProtocolMatcher.group(2)));
-                wikiLink.setDescription(protocol.getPrefix() + "://" + customProtocolMatcher.group(2));
-                log.debug("link text resolved to custom protocol: " + linkText);
-            } else {
-                wikiLink = new WikiLink(true, false);
-                wikiLink.setUrl(BROKENLINK_URL);
-                wikiLink.setDescription(BROKENLINK_DESCRIPTION);
-                log.debug("link text resolved to non-existant custom protocol: " + linkText);
-            }
-
-        // It must be a stored clear text link, such as [=>Target Name] or [=>Area Name|Target Name]
-        // (This can happen if the string [foo=>bar] or [foo=>bar|baz] was stored in the database because the
-        //  targets didn't exist at the time of saving)
-        } else {
-
-            // Try a WikiWord search in the current or named area
-            WikiFile file = null;
-            String fragment = null;
-            Matcher linkTextMatcher = getCrossAreaMatcher(linkText);
-            if (linkTextMatcher != null) {
-                file = resolve(currentAreaNumber, linkTextMatcher.group(1), linkTextMatcher.group(2));
-                fragment = linkTextMatcher.group(3);
-            } else {
-                linkTextMatcher = getAreaMatcher(linkText);
-                if (linkTextMatcher != null) {
-                    file = resolve(currentAreaNumber, null, linkTextMatcher.group(1));
-                    fragment = linkTextMatcher.group(2);
-                }
-            }
-
-            if (file!=null) {
-                wikiLink = new WikiLink(false, false);
-                wikiLink.setFile(file);
-                wikiLink.setFragment(fragment);
-                wikiLink.setDescription(file.getName());
-                // Indicate that caller should update the wiki text that contains this link
-                wikiLink.setRequiresUpdating(true);
-                log.debug("link text resolved (needs updating to wiki protocol): " + file + " and fragment: " + fragment);
-
-            } else {
-                /* TODO: Not sure we should actually implement this..., one of these things that the wiki "designers" got wrong
-                // OK, so it's not any recognized URL and we can't find a node with that wikiname
-                // Let's assume its a page name and render /Area/WikiLink (but encoded, so it gets transported fully)
-                // into the edit page when the user clicks on the link to create the document
-                try {
-                    String encodedPagename = currentDirectory.getWikiname() + "/" + URLEncoder.encode(linkText, "UTF-8");
-                    wikiLink = new WikiLink(null, true, encodedPagename, linkText);
-                } catch (UnsupportedEncodingException e) {
-                    throw new RuntimeException(e); // Java is so great...
-                }
-                */
-                wikiLink = new WikiLink(true, false);
-                wikiLink.setUrl(BROKENLINK_URL);
-                wikiLink.setDescription(BROKENLINK_DESCRIPTION);
-                log.debug("could not resolve link: " + linkText);
-            }
-        }
-        links.put(linkText, wikiLink);
-    }
-
-    private Matcher getCrossAreaMatcher(String linkText) {
-        Matcher matcher = Pattern.compile(REGEX_WIKILINK_CROSSAREA).matcher(linkText);
-        return matcher.find() ? matcher : null;
-    }
-
-    private Matcher getAreaMatcher(String linkText) {
-        Matcher matcher = Pattern.compile(REGEX_NODE_NAME_FRAGMENT).matcher(linkText);
-        return matcher.find() ? matcher : null;
-    }
-
-    private WikiFile resolve(Long currentAreaNumber, String areaName, String nodeName) {
-        log.debug("trying to resolve, current area " + currentAreaNumber + ", search in area '" + areaName + "' for node name: " + nodeName);
-        if (areaName != null) {
-            WikiNode crossLinkArea = wikiNodeDAO.findArea(WikiUtil.convertToWikiName(areaName));
-            if (crossLinkArea != null)
-                return wikiNodeDAO.findWikiFileInArea(crossLinkArea.getAreaNumber(), WikiUtil.convertToWikiName(nodeName));
-        }
-        return wikiNodeDAO.findWikiFileInArea(currentAreaNumber, WikiUtil.convertToWikiName(nodeName));
-    }
-
-}

Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiTextRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiTextRenderer.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiTextRenderer.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -1,118 +0,0 @@
-package org.jboss.seam.wiki.core.engine;
-
-import org.jboss.seam.wiki.util.WikiUtil;
-
-import java.util.List;
-
-/**
- * Convenience class that renders some sensible defaults that apply for the wiki.
- *
- * @author Christian Bauer
- */
-public class DefaultWikiTextRenderer implements WikiTextRenderer {
-
-    public static enum Headline {
-        H1, H2, H3, H4;
-    }
-
-    public String renderInternalLink(WikiLink internalLink) {
-        return !internalLink.isBroken() ?
-                "<a href=\""
-                + WikiUtil.renderURL(internalLink.getFile())
-                + "\">"
-                + internalLink.getDescription()
-                + "</a>" : "[Broken Link]";
-    }
-
-    public String renderExternalLink(WikiLink externalLink) {
-        return "<a href=\""
-                + externalLink.getUrl()
-                + "\">"
-                + externalLink.getDescription()
-                + "</a>";
-    }
-
-    public String renderFileAttachmentLink(int attachmentNumber, WikiLink attachmentLink) {
-        return "[Attachment]";
-    }
-
-    public String renderThumbnailImageLink(WikiLink link) {
-        return "[Embedded Image]";
-    }
-
-    public String renderMacro(WikiMacro macro) {
-        return "[Macro]";
-    }
-
-    public void setAttachmentLinks(List<WikiLink> attachmentLinks) {}
-    public void setExternalLinks(List<WikiLink> externalLinks) {}
-
-    public String renderParagraphOpenTag() {
-        return "<p class=\"wikiPara\">\n";
-    }
-
-    public String renderPreformattedOpenTag() {
-        return "<pre class=\"wikiPreformatted\">\n";
-    }
-
-    public String renderBlockquoteOpenTag() {
-        return "<blockquote class=\"wikiBlockquote\">\n";
-    }
-
-    public String renderHeadline1(String headline) {
-        return "<h1 class=\"wikiHeadline1\" id=\""+getHeadlineId(Headline.H1, headline)+"\">"
-                + getHeadlineLink(Headline.H1, headline)
-               + "</h1>";
-    }
-
-    public String renderHeadline2(String headline) {
-        return "<h2 class=\"wikiHeadline2\" id=\""+getHeadlineId(Headline.H2, headline)+"\">"
-                + getHeadlineLink(Headline.H2, headline)
-               + "</h2>";
-    }
-
-    public String renderHeadline3(String headline) {
-        return "<h3 class=\"wikiHeadline3\" id=\""+getHeadlineId(Headline.H3, headline)+"\">"
-                + getHeadlineLink(Headline.H3, headline)
-               + "</h3>";
-    }
-
-    public String renderHeadline4(String headline) {
-        return "<h4 class=\"wikiHeadline4\" id=\""+getHeadlineId(Headline.H4, headline)+"\">"
-                + getHeadlineLink(Headline.H4, headline)
-               + "</h4>";
-    }
-
-
-    public String renderOrderedListOpenTag() {
-        return "<ol class=\"wikiOrderedList\">\n";
-    }
-
-    public String renderOrderedListItemOpenTag() {
-        return "<li class=\"wikiOrderedListItem\">";
-    }
-
-    public String renderUnorderedListOpenTag() {
-        return "<ul class=\"wikiUnorderedList\">\n";
-    }
-
-    public String renderUnorderedListItemOpenTag() {
-        return "<li class=\"wikiUnorderedListItem\">";
-    }
-
-    public String renderEmphasisOpenTag() {
-        return "<i class=\"wikiEmphasis\">";
-    }
-
-    public String renderEmphasisCloseTag() {
-        return "</i>";
-    }
-
-    protected String getHeadlineId(Headline h, String headline) {
-        return "";
-    }
-
-    protected String getHeadlineLink(Headline h, String headline) {
-        return headline;
-    }
-}

Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/MacroWikiTextRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/MacroWikiTextRenderer.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/MacroWikiTextRenderer.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -1,36 +0,0 @@
-package org.jboss.seam.wiki.core.engine;
-
-import java.util.Set;
-import java.util.LinkedHashSet;
-
-import antlr.RecognitionException;
-import antlr.ANTLRException;
-
-public class MacroWikiTextRenderer extends NullWikiTextRenderer {
-
-    private Set<WikiMacro> macros = new LinkedHashSet<WikiMacro>();
-
-    public String renderMacro(WikiMacro macro) {
-        macros.add(macro);
-        return null;
-    }
-
-    public Set<WikiMacro> getMacros() {
-        return macros;
-    }
-
-    public static MacroWikiTextRenderer renderMacros(String wikiText) {
-        WikiTextParser parser = new WikiTextParser(wikiText, false, false);
-        MacroWikiTextRenderer renderer = new MacroWikiTextRenderer();
-        try {
-            parser.setRenderer(renderer).parse();
-        } catch (RecognitionException rex) {
-            // Swallowing, we don't really care if there was a parse error
-        } catch (ANTLRException ex) {
-            // All other errors are fatal;
-            throw new RuntimeException(ex);
-        }
-        return renderer;
-    }
-
-}

Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/NullWikiTextRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/NullWikiTextRenderer.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/NullWikiTextRenderer.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -1,33 +0,0 @@
-package org.jboss.seam.wiki.core.engine;
-
-import java.util.List;
-
-/**
- * Renders nothing for links and macros and unstyled HTML for anything else.
- *
- * @author Christian Bauer
- */
-public class NullWikiTextRenderer implements WikiTextRenderer {
-
-    public String renderInternalLink(WikiLink internalLink) { return null; }
-    public String renderExternalLink(WikiLink externalLink) { return null; }
-    public String renderFileAttachmentLink(int attachmentNumber, WikiLink attachmentLink) { return null; }
-    public String renderThumbnailImageLink(WikiLink link) { return null; }
-    public void setAttachmentLinks(List<WikiLink> attachmentLinks) {}
-    public void setExternalLinks(List<WikiLink> externalLinks) {}
-    public String renderMacro(WikiMacro macro) { return null; }
-    public String renderParagraphOpenTag() { return "<p>\n"; }
-    public String renderPreformattedOpenTag() { return "<pre>\n"; }
-    public String renderBlockquoteOpenTag() { return "<blockquote>\n"; }
-    public String renderHeadline1(String headline) { return "<h1>"+headline+"</h1>"; }
-    public String renderHeadline2(String headline) { return "<h2>"+headline+"</h2>"; }
-    public String renderHeadline3(String headline) { return "<h3>"+headline+"</h3>"; }
-    public String renderHeadline4(String headline) { return "<h4>"+headline+"</h4>"; }
-    public String renderOrderedListOpenTag() { return "<ol>\n"; }
-    public String renderOrderedListItemOpenTag() { return "<li>"; }
-    public String renderUnorderedListOpenTag() { return "<ul>\n"; }
-    public String renderUnorderedListItemOpenTag() { return "<li>"; }
-    public String renderEmphasisOpenTag() { return "<i>"; }
-    public String renderEmphasisCloseTag() { return "</i>"; }
-
-}

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedDAO.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -13,7 +13,7 @@
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.log.Log;
 import org.jboss.seam.wiki.core.model.*;
-import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
 
 import javax.persistence.EntityManager;
 import javax.persistence.EntityNotFoundException;
@@ -159,9 +159,10 @@
     /* ############################# FEED CUD ################################ */
 
     public void createFeed(WikiDirectory dir) {
+        WikiURLRenderer urlRenderer = (WikiURLRenderer)Component.getInstance(WikiURLRenderer.class);
         WikiFeed feed = new WikiFeed();
         feed.setDirectory(dir);
-        feed.setLink(WikiUtil.renderURL(dir));
+        feed.setLink(urlRenderer.renderURL(dir));
         feed.setAuthor(dir.getCreatedBy().getFullname());
         feed.setTitle(dir.getName());
         feed.setDescription(dir.getDescription());
@@ -169,7 +170,8 @@
     }
 
     public void updateFeed(WikiDirectory dir) {
-        dir.getFeed().setLink(WikiUtil.renderURL(dir));
+        WikiURLRenderer urlRenderer = (WikiURLRenderer)Component.getInstance(WikiURLRenderer.class);
+        dir.getFeed().setLink(urlRenderer.renderURL(dir));
         dir.getFeed().setTitle(dir.getName());
         dir.getFeed().setAuthor(dir.getCreatedBy().getFullname());
         dir.getFeed().setDescription(dir.getDescription());

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -2,13 +2,15 @@
 
 import org.jboss.seam.wiki.core.model.FeedEntry;
 import org.jboss.seam.wiki.core.engine.*;
-import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.core.renderer.DefaultWikiTextRenderer;
+import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
 import org.jboss.seam.ui.validator.FormattedTextValidator;
 import org.jboss.seam.Component;
 import org.jboss.seam.ScopeType;
 import org.jboss.seam.log.Log;
 import org.jboss.seam.annotations.Logger;
 import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.In;
 import antlr.ANTLRException;
 import antlr.RecognitionException;
 
@@ -18,6 +20,9 @@
     @Logger
     static Log log;
 
+    @In
+    protected WikiURLRenderer wikiURLRenderer;
+
     public abstract FE createFeedEntry(M source);
     public abstract void updateFeedEntry(FE feedEntry, M source);
     public abstract String getFeedEntryTitle(M source);
@@ -32,7 +37,7 @@
             public String renderInternalLink(WikiLink internalLink) {
                 return !internalLink.isBroken() ?
                         "<a href=\""
-                        + WikiUtil.renderURL(internalLink.getFile())
+                        + wikiURLRenderer.renderURL(internalLink.getFile())
                         + "\">"
                         + internalLink.getDescription()
                         + "</a>" : "[Broken Link]";

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -10,7 +10,6 @@
 import org.jboss.seam.international.Messages;
 import org.jboss.seam.wiki.core.model.WikiComment;
 import org.jboss.seam.wiki.core.model.WikiCommentFeedEntry;
-import org.jboss.seam.wiki.util.WikiUtil;
 
 @Name("wikiCommentFeedEntryManager")
 public class WikiCommentFeedEntryManager extends FeedEntryManager<WikiComment, WikiCommentFeedEntry> {
@@ -19,7 +18,7 @@
 
         WikiCommentFeedEntry fe = new WikiCommentFeedEntry();
 
-        fe.setLink(WikiUtil.renderURL(comment));
+        fe.setLink(wikiURLRenderer.renderURL(comment));
         fe.setTitle(getFeedEntryTitle(comment));
         fe.setAuthor(comment.getCreatedBy().getFullname());
         fe.setUpdatedDate(fe.getPublishedDate());
@@ -35,7 +34,7 @@
 
     public void updateFeedEntry(WikiCommentFeedEntry fe, WikiComment comment) {
 
-        fe.setLink(WikiUtil.renderURL(comment));
+        fe.setLink(wikiURLRenderer.renderURL(comment));
         fe.setTitle(Messages.instance().get("lacewiki.label.comment.FeedEntryTitlePrefix") + " " + comment.getSubject());
         fe.setAuthor(comment.getCreatedBy().getFullname());
         fe.setUpdatedDate(comment.getLastModifiedOn());
@@ -51,7 +50,7 @@
         StringBuilder desc = new StringBuilder();
         desc.append(Messages.instance().get("lacewiki.msg.comment.FeedIntro"));
         desc.append("&#160;");
-        desc.append("<a href=\"").append(WikiUtil.renderURL(comment.getParentDocument())).append("\">");
+        desc.append("<a href=\"").append(wikiURLRenderer.renderURL(comment.getParentDocument())).append("\">");
         desc.append("'").append(comment.getParentDocument().getName()).append("'");
         desc.append("</a>.");
         desc.append("<hr/>");

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -9,7 +9,6 @@
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.wiki.core.model.WikiDocument;
 import org.jboss.seam.wiki.core.model.WikiDocumentFeedEntry;
-import org.jboss.seam.wiki.util.WikiUtil;
 
 @Name("wikiDocumentFeedEntryManager")
 public class WikiDocumentFeedEntryManager extends FeedEntryManager<WikiDocument, WikiDocumentFeedEntry> {
@@ -18,7 +17,7 @@
 
         WikiDocumentFeedEntry fe = new WikiDocumentFeedEntry();
 
-        fe.setLink(WikiUtil.renderURL(document));
+        fe.setLink(wikiURLRenderer.renderURL(document));
         fe.setTitle(getFeedEntryTitle(document));
         fe.setAuthor(document.getCreatedBy().getFullname());
         fe.setUpdatedDate(fe.getPublishedDate());
@@ -34,7 +33,7 @@
 
     public void updateFeedEntry(WikiDocumentFeedEntry fe, WikiDocument document) {
 
-        fe.setLink(WikiUtil.renderURL(document));
+        fe.setLink(wikiURLRenderer.renderURL(document));
         fe.setTitle(getFeedEntryTitle(document));
         fe.setAuthor(document.getCreatedBy().getFullname());
         fe.setUpdatedDate(document.getLastModifiedOn());

Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java (from rev 7424, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/DefaultWikiTextRenderer.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java	                        (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -0,0 +1,123 @@
+package org.jboss.seam.wiki.core.renderer;
+
+import org.jboss.seam.wiki.core.engine.WikiTextRenderer;
+import org.jboss.seam.wiki.core.engine.WikiLink;
+import org.jboss.seam.wiki.core.engine.WikiMacro;
+import org.jboss.seam.Component;
+
+import java.util.List;
+
+/**
+ * Convenience class that renders some sensible defaults that apply for the wiki.
+ *
+ * @author Christian Bauer
+ */
+public class DefaultWikiTextRenderer implements WikiTextRenderer {
+
+    protected WikiURLRenderer wikiURLRenderer = (WikiURLRenderer) Component.getInstance(WikiURLRenderer.class);
+
+    public static enum Headline {
+        H1, H2, H3, H4;
+    }
+
+    public String renderInternalLink(WikiLink internalLink) {
+        return !internalLink.isBroken() ?
+                "<a href=\""
+                + wikiURLRenderer.renderURL(internalLink.getFile())
+                + "\">"
+                + internalLink.getDescription()
+                + "</a>" : "[Broken Link]";
+    }
+
+    public String renderExternalLink(WikiLink externalLink) {
+        return "<a href=\""
+                + externalLink.getUrl()
+                + "\">"
+                + externalLink.getDescription()
+                + "</a>";
+    }
+
+    public String renderFileAttachmentLink(int attachmentNumber, WikiLink attachmentLink) {
+        return "[Attachment]";
+    }
+
+    public String renderThumbnailImageLink(WikiLink link) {
+        return "[Embedded Image]";
+    }
+
+    public String renderMacro(WikiMacro macro) {
+        return "[Macro]";
+    }
+
+    public void setAttachmentLinks(List<WikiLink> attachmentLinks) {}
+    public void setExternalLinks(List<WikiLink> externalLinks) {}
+
+    public String renderParagraphOpenTag() {
+        return "<p class=\"wikiPara\">\n";
+    }
+
+    public String renderPreformattedOpenTag() {
+        return "<pre class=\"wikiPreformatted\">\n";
+    }
+
+    public String renderBlockquoteOpenTag() {
+        return "<blockquote class=\"wikiBlockquote\">\n";
+    }
+
+    public String renderHeadline1(String headline) {
+        return "<h1 class=\"wikiHeadline1\" id=\""+getHeadlineId(Headline.H1, headline)+"\">"
+                + getHeadlineLink(Headline.H1, headline)
+               + "</h1>";
+    }
+
+    public String renderHeadline2(String headline) {
+        return "<h2 class=\"wikiHeadline2\" id=\""+getHeadlineId(Headline.H2, headline)+"\">"
+                + getHeadlineLink(Headline.H2, headline)
+               + "</h2>";
+    }
+
+    public String renderHeadline3(String headline) {
+        return "<h3 class=\"wikiHeadline3\" id=\""+getHeadlineId(Headline.H3, headline)+"\">"
+                + getHeadlineLink(Headline.H3, headline)
+               + "</h3>";
+    }
+
+    public String renderHeadline4(String headline) {
+        return "<h4 class=\"wikiHeadline4\" id=\""+getHeadlineId(Headline.H4, headline)+"\">"
+                + getHeadlineLink(Headline.H4, headline)
+               + "</h4>";
+    }
+
+
+    public String renderOrderedListOpenTag() {
+        return "<ol class=\"wikiOrderedList\">\n";
+    }
+
+    public String renderOrderedListItemOpenTag() {
+        return "<li class=\"wikiOrderedListItem\">";
+    }
+
+    public String renderUnorderedListOpenTag() {
+        return "<ul class=\"wikiUnorderedList\">\n";
+    }
+
+    public String renderUnorderedListItemOpenTag() {
+        return "<li class=\"wikiUnorderedListItem\">";
+    }
+
+    public String renderEmphasisOpenTag() {
+        return "<i class=\"wikiEmphasis\">";
+    }
+
+    public String renderEmphasisCloseTag() {
+        return "</i>";
+    }
+
+    protected String getHeadlineId(Headline h, String headline) {
+        return "";
+    }
+
+    protected String getHeadlineLink(Headline h, String headline) {
+        return headline;
+    }
+}


Property changes on: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java (from rev 7424, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/MacroWikiTextRenderer.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java	                        (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -0,0 +1,38 @@
+package org.jboss.seam.wiki.core.renderer;
+
+import java.util.Set;
+import java.util.LinkedHashSet;
+
+import antlr.RecognitionException;
+import antlr.ANTLRException;
+import org.jboss.seam.wiki.core.engine.WikiMacro;
+import org.jboss.seam.wiki.core.engine.WikiTextParser;
+
+public class MacroWikiTextRenderer extends NullWikiTextRenderer {
+
+    private Set<WikiMacro> macros = new LinkedHashSet<WikiMacro>();
+
+    public String renderMacro(WikiMacro macro) {
+        macros.add(macro);
+        return null;
+    }
+
+    public Set<WikiMacro> getMacros() {
+        return macros;
+    }
+
+    public static MacroWikiTextRenderer renderMacros(String wikiText) {
+        WikiTextParser parser = new WikiTextParser(wikiText, false, false);
+        MacroWikiTextRenderer renderer = new MacroWikiTextRenderer();
+        try {
+            parser.setRenderer(renderer).parse();
+        } catch (RecognitionException rex) {
+            // Swallowing, we don't really care if there was a parse error
+        } catch (ANTLRException ex) {
+            // All other errors are fatal;
+            throw new RuntimeException(ex);
+        }
+        return renderer;
+    }
+
+}


Property changes on: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java (from rev 7424, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/NullWikiTextRenderer.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java	                        (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -0,0 +1,37 @@
+package org.jboss.seam.wiki.core.renderer;
+
+import org.jboss.seam.wiki.core.engine.WikiTextRenderer;
+import org.jboss.seam.wiki.core.engine.WikiLink;
+import org.jboss.seam.wiki.core.engine.WikiMacro;
+
+import java.util.List;
+
+/**
+ * Renders nothing for links and macros and unstyled HTML for anything else.
+ *
+ * @author Christian Bauer
+ */
+public class NullWikiTextRenderer implements WikiTextRenderer {
+
+    public String renderInternalLink(WikiLink internalLink) { return null; }
+    public String renderExternalLink(WikiLink externalLink) { return null; }
+    public String renderFileAttachmentLink(int attachmentNumber, WikiLink attachmentLink) { return null; }
+    public String renderThumbnailImageLink(WikiLink link) { return null; }
+    public void setAttachmentLinks(List<WikiLink> attachmentLinks) {}
+    public void setExternalLinks(List<WikiLink> externalLinks) {}
+    public String renderMacro(WikiMacro macro) { return null; }
+    public String renderParagraphOpenTag() { return "<p>\n"; }
+    public String renderPreformattedOpenTag() { return "<pre>\n"; }
+    public String renderBlockquoteOpenTag() { return "<blockquote>\n"; }
+    public String renderHeadline1(String headline) { return "<h1>"+headline+"</h1>"; }
+    public String renderHeadline2(String headline) { return "<h2>"+headline+"</h2>"; }
+    public String renderHeadline3(String headline) { return "<h3>"+headline+"</h3>"; }
+    public String renderHeadline4(String headline) { return "<h4>"+headline+"</h4>"; }
+    public String renderOrderedListOpenTag() { return "<ol>\n"; }
+    public String renderOrderedListItemOpenTag() { return "<li>"; }
+    public String renderUnorderedListOpenTag() { return "<ul>\n"; }
+    public String renderUnorderedListItemOpenTag() { return "<li>"; }
+    public String renderEmphasisOpenTag() { return "<i>"; }
+    public String renderEmphasisCloseTag() { return "</i>"; }
+
+}


Property changes on: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java	                        (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.renderer;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
+import org.jboss.seam.wiki.core.model.WikiNode;
+import org.jboss.seam.wiki.core.model.User;
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.wiki.core.ui.FeedServlet;
+
+/**
+ * Renders outgoing URLs in a unified fashion, see urlrewrite.xml for incoming URL GET request rewriting.
+ * <p>
+ * Note that some of the rendering is delegated into the domain model for subclasses of <tt>Node</tt>.
+ * </p>
+ *
+ * @author Christian Bauer
+ */
+
+ at Name("wikiURLRenderer")
+ at Scope(ScopeType.CONVERSATION)
+ at AutoCreate
+public class WikiURLRenderer {
+
+    @In
+    String basePath;
+
+    @In("#{preferences.get('Wiki')}")
+    WikiPreferences prefs;
+
+    public String renderSearchURL(String search) {
+        if (search == null || search.length() == 0) return "";
+        StringBuilder url = new StringBuilder();
+        url.append(basePath).append("/search/").append(encodeURL(search));
+        return url.toString();
+    }
+
+    public String renderTagURL(String tag) {
+        if (tag == null || tag.length() == 0) return "";
+        StringBuilder url = new StringBuilder();
+        url.append(basePath).append("/tag/").append(encodeURL(tag));
+        return url.toString();
+    }
+
+    public String renderUserInfoURL(User user) {
+        if (user == null || user.getUsername() == null) return "";
+        StringBuilder url = new StringBuilder();
+        url.append(basePath).append("/user/").append(user.getUsername());
+        return url.toString();
+    }
+
+    public String renderAggregateFeedURL(String aggregateId) {
+        if (aggregateId == null) return "";
+        StringBuilder url = new StringBuilder();
+        url.append(basePath)
+            .append("/service/Feed/atom/Aggregate/")
+            .append(aggregateId);
+        return url.toString();
+    }
+
+    public String renderFeedURL(Feed feed, String tag, String comments) {
+        if (feed == null || feed.getId() == null) return "";
+        StringBuilder url = new StringBuilder();
+        url.append(basePath).append("/service/Feed/atom").append(feed.getURL());
+        if (comments != null && comments.length() >0) {
+            url.append("/Comments/").append(FeedServlet.Comments.valueOf(comments));
+        }
+        if (tag != null && tag.length() >0) url.append("/Tag/").append(encodeURL(tag));
+        return url.toString();
+    }
+
+    public String renderURL(WikiNode node) {
+        if (node == null || node.getId() == null) return "";
+        return prefs.isRenderPermlinks() ? renderPermURL(node) : renderWikiURL(node);
+    }
+
+    public String renderPermURL(WikiNode node) {
+        if (node == null || node.getId() == null) return "";
+        return basePath + "/" + node.getPermURL(prefs.getPermlinkSuffix());
+    }
+
+    public String renderWikiURL(WikiNode node) {
+        if (node == null || node.getId() == null) return "";
+        return basePath + "/" + node.getWikiURL();
+    }
+
+    private String encodeURL(String s) {
+        return WikiUtil.encodeURL(s);
+    }
+
+}

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearchSupport.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearchSupport.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearchSupport.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -5,7 +5,8 @@
 import org.jboss.seam.wiki.core.model.WikiComment;
 import org.jboss.seam.wiki.core.search.metamodel.SearchSupport;
 import org.jboss.seam.wiki.core.search.metamodel.SearchableEntityHandler;
-import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
+import org.jboss.seam.Component;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.highlight.*;
 
@@ -32,11 +33,12 @@
                     }
 
                     public SearchHit extractHit(Query query, WikiDocument doc) throws Exception {
+                        WikiURLRenderer urlRenderer = (WikiURLRenderer) Component.getInstance(WikiURLRenderer.class);
                         return new SearchHit(
                             WikiDocument.class.getSimpleName(),
                             "icon.doc.gif",
                             escapeBestFragments(query, new NullFragmenter(), doc.getName(), 0, 0),
-                            WikiUtil.renderURL(doc),
+                            urlRenderer.renderURL(doc),
                             escapeBestFragments(query, new SimpleFragmenter(100), doc.getContent(), 5, 350)
                         );
                     }
@@ -46,12 +48,13 @@
             add(
                 new SearchableEntityHandler<WikiComment>() {
                     public SearchHit extractHit(Query query, WikiComment comment) throws Exception {
+                        WikiURLRenderer urlRenderer = (WikiURLRenderer)Component.getInstance(WikiURLRenderer.class);
                         return new SearchHit(
                             WikiComment.class.getSimpleName(),
                             "icon.user.gif",
                             "(" + comment.getFromUserName() + ") "
                                 + escapeBestFragments(query, new NullFragmenter(), comment.getSubject(), 0, 0),
-                            WikiUtil.renderURL(comment),
+                            urlRenderer.renderURL(comment),
                             escapeBestFragments(query, new SimpleFragmenter(100), comment.getContent(), 5, 350)
                         );
                     }

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -232,7 +232,7 @@
         } catch (Exception ex) {
             try {
                 if (startedTx && userTx.getStatus() != javax.transaction.Status.STATUS_MARKED_ROLLBACK)
-                    userTx.rollback();
+                    userTx.setRollbackOnly();
             } catch (Exception rbEx) {
                 rbEx.printStackTrace();
             }

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -77,7 +77,7 @@
                 } catch (Exception ex) {
                     try {
                         if (startedTx && userTx.getStatus() != javax.transaction.Status.STATUS_MARKED_ROLLBACK)
-                            userTx.rollback();
+                            userTx.setRollbackOnly();
                     } catch (Exception rbEx) {
                         rbEx.printStackTrace();
                     }

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -18,6 +18,7 @@
 import org.jboss.seam.wiki.core.engine.*;
 import org.jboss.seam.wiki.core.model.WikiFile;
 import org.jboss.seam.wiki.core.model.WikiUploadImage;
+import org.jboss.seam.wiki.core.renderer.DefaultWikiTextRenderer;
 import org.jboss.seam.wiki.util.WikiUtil;
 
 import javax.faces.component.UIComponent;
@@ -103,7 +104,7 @@
                         + (
                             internalLink.isBroken()
                                 ? internalLink.getUrl()
-                                : WikiUtil.renderURL(internalLink.getFile())
+                                : wikiURLRenderer.renderURL(internalLink.getFile())
                            )
                         + (
                             internalLink.getFragment() != null
@@ -131,7 +132,7 @@
 
             public String renderFileAttachmentLink(int attachmentNumber, WikiLink attachmentLink) {
                 return "<a href=\""
-                        + WikiUtil.renderURL(baseFile)
+                        + wikiURLRenderer.renderURL(baseFile)
                         + "#attachment" + attachmentNumber
                         + "\" target=\""
                         + (getAttributes().get(ATTR_INTERNAL_TARGET_FRAME) != null ? getAttributes().get(ATTR_INTERNAL_TARGET_FRAME) : "")
@@ -148,7 +149,7 @@
                     // Full size display, no thumbnail
                     //TODO: Make sure we really don't need this - but it messes up the comment form conversation:
                     //String imageUrl = WikiUtil.renderURL(image) + "&amp;cid=" + Conversation.instance().getId();
-                    String imageUrl = WikiUtil.renderURL(image);
+                    String imageUrl = wikiURLRenderer.renderURL(image);
                     return "<img src='"+ imageUrl + "'" +
                             " width='"+ image.getSizeX()+"'" +
                             " height='"+ image.getSizeY() +"'/>";
@@ -157,10 +158,10 @@
 
                     //TODO: Make sure we really don't need this - but it messes up the comment form conversation:
                     // String thumbnailUrl = WikiUtil.renderURL(image) + "&amp;thumbnail=true&amp;cid=" + Conversation.instance().getId();
-                    String thumbnailUrl = WikiUtil.renderURL(image) + "?thumbnail=true";
+                    String thumbnailUrl = wikiURLRenderer.renderURL(image) + "?thumbnail=true";
 
                     return "<a href=\""
-                            + (link.isBroken() ? link.getUrl() : WikiUtil.renderURL(image))
+                            + (link.isBroken() ? link.getUrl() : wikiURLRenderer.renderURL(image))
                             + "\" target=\""
                             + (getAttributes().get(ATTR_INTERNAL_TARGET_FRAME) != null ? getAttributes().get(ATTR_INTERNAL_TARGET_FRAME) : "")
                             + "\" class=\""
@@ -240,7 +241,7 @@
             }
 
             protected String getHeadlineLink(Headline h, String headline) {
-                return "<a href=\""+WikiUtil.renderURL(baseFile)+"#"+WikiTextRenderer.HEADLINE_ID_PREFIX+WikiUtil.convertToWikiName(headline)+"\">"
+                return "<a href=\""+ wikiURLRenderer.renderURL(baseFile)+"#"+WikiTextRenderer.HEADLINE_ID_PREFIX+WikiUtil.convertToWikiName(headline)+"\">"
                         + headline
                        +"</a>";
             }

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-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -21,7 +21,7 @@
 import org.jboss.seam.log.Logging;
 import org.jboss.seam.ui.component.UILoadStyle;
 import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
-import org.jboss.seam.wiki.core.engine.NullWikiTextRenderer;
+import org.jboss.seam.wiki.core.renderer.NullWikiTextRenderer;
 import org.jboss.seam.wiki.core.engine.WikiMacro;
 import org.jboss.seam.wiki.core.engine.WikiTextParser;
 import org.jboss.seam.wiki.preferences.Preferences;

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-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -10,7 +10,6 @@
 import org.jboss.seam.security.Identity;
 import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
 import org.jboss.seam.wiki.core.model.*;
-import org.jboss.seam.wiki.core.ui.FeedServlet;
 import org.jboss.seam.wiki.preferences.Preferences;
 
 import javax.faces.context.FacesContext;
@@ -119,55 +118,6 @@
                );
     }
 
-    public static String renderTagURL(String tag) {
-        if (tag == null || tag.length() == 0) return "";
-        StringBuilder url = new StringBuilder();
-        url.append(Component.getInstance("basePath")).append("/tag/").append(encodeURL(tag));
-        return url.toString();
-    }
-
-    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 "";
-        StringBuilder url = new StringBuilder();
-        url.append(Component.getInstance("basePath"))
-            .append("/service/Feed/atom/Aggregate/")
-            .append(aggregateId);
-        return url.toString();
-    }
-
-    public static String renderFeedURL(Feed feed, String tag, String comments) {
-        if (feed == null || feed.getId() == null) return "";
-        StringBuilder url = new StringBuilder();
-        url.append(Component.getInstance("basePath")).append("/service/Feed/atom").append(feed.getURL());
-        if (comments != null && comments.length() >0) {
-            url.append("/Comments/").append(FeedServlet.Comments.valueOf(comments));
-        }
-        if (tag != null && tag.length() >0) url.append("/Tag/").append(encodeURL(tag));
-        return url.toString();
-    }
-
-    public static String renderURL(WikiNode node) {
-        if (node == null || node.getId() == null) return "";
-        return Preferences.getInstance(WikiPreferences.class).isRenderPermlinks() ? renderPermURL(node) : renderWikiURL(node);
-    }
-
-    public static String renderPermURL(WikiNode node) {
-        if (node == null || node.getId() == null) return "";
-        return Component.getInstance("basePath") + "/" + node.getPermURL(Preferences.getInstance(WikiPreferences.class).getPermlinkSuffix());
-    }
-
-    public static String renderWikiURL(WikiNode node) {
-        if (node == null || node.getId() == null) return "";
-        return Component.getInstance("basePath") + "/" + node.getWikiURL();
-    }
-
     public static boolean showEmailAddress() {
         if (Preferences.getInstance(WikiPreferences.class).isShowEmailToLoggedInOnly() && Identity.instance().isLoggedIn()) {
             return true;

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-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -152,7 +152,7 @@
         WEBSITE="http://a.really.long.url.so.we.can.see.how.the.layout.fits/foo/bar/baz/My/Website/123/123/123?foo=barbaz"
         LOCATION="Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.&#xA;&#xA;Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis."
         OCCUPATION="Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.&#xA;&#xA;Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum."
-        SIGNATURE="My member signature&#xA;&#xA;Lorem ipsum dolor sit amet, *consectetuer* adipiscing elit, /sed diam nonummy/ nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum."
+        SIGNATURE="My member signature&#xA;&#xA;Lorem ipsum dolor sit amet, *consectetuer* adipiscing elit, _sed diam nonummy_ nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum."
         IMAGE_DATA="[BINARY_DIR]/testimage_thumbnail.jpg"
         IMAGE_CONTENT_TYPE="image/jpg"/>
 

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-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java	2008-02-15 02:30:12 UTC (rev 7425)
@@ -7,26 +7,18 @@
 package org.jboss.seam.wiki.test.preferences;
 
 import org.dbunit.operation.DatabaseOperation;
-import org.jboss.seam.wiki.core.action.PreferenceEditor;
 import org.jboss.seam.wiki.core.action.DocumentHome;
-import org.jboss.seam.wiki.core.action.prefs.DocumentEditorPreferences;
 import org.jboss.seam.wiki.core.engine.WikiTextParser;
-import org.jboss.seam.wiki.core.engine.NullWikiTextRenderer;
+import org.jboss.seam.wiki.core.renderer.NullWikiTextRenderer;
 import org.jboss.seam.wiki.core.engine.WikiMacro;
 import org.jboss.seam.wiki.core.ui.UIWikiFormattedText;
 import org.jboss.seam.wiki.preferences.Preferences;
-import org.jboss.seam.wiki.preferences.PreferenceValue;
-import org.jboss.seam.wiki.preferences.metamodel.PreferenceRegistry;
-import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
 import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
 import org.jboss.seam.wiki.plugin.lastmodified.LastModifiedDocumentsPreferences;
-import org.jboss.seam.core.Events;
 import org.jboss.seam.core.Conversation;
 import org.jboss.seam.contexts.Contexts;
 import org.testng.annotations.Test;
 
-import java.util.List;
-
 /**
  * @author Christian Bauer
  */

Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -69,7 +69,7 @@
 
     </s:fragment>
 
-    <h:outputLink value="#{wiki:renderFeedURL(directoryHome.instance.feed, null, null)}"
+    <h:outputLink value="#{wikiURLRenderer.renderFeedURL(directoryHome.instance.feed, null, null)}"
                   styleClass="linkNavigation" rendered="#{not empty directoryHome.instance.feed}">
         <h:graphicImage styleClass="feedIcon" value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
         <h:outputText value="#{messages['lacewiki.button.DirectoryFeed']}"/>
@@ -364,13 +364,13 @@
                     <s:div id="directoryMenu" styleClass="contextMenu">
                         <ul>
                             <li class="undecoratedLink noWrapWhitespace">
-                                <h:outputLink value="#{wiki:renderURL(node)}">
+                                <h:outputLink value="#{wikiURLRenderer.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:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
                                     <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
                                 </h:outputLink>
                             </li>
@@ -402,20 +402,20 @@
 
                 <s:fragment rendered="#{s:hasPermission('Node','read',node)}">
 
-                    <h:outputLink id="documentLink" value="#{wiki:renderURL(node)}" tabindex="1">
+                    <h:outputLink id="documentLink" value="#{wikiURLRenderer.renderURL(node)}" tabindex="1">
                         <h:outputText value="#{wiki:truncateString(node.name, 40, '...')}"/>
                     </h:outputLink>
 
                     <s:div id="documentMenu" styleClass="contextMenu">
                         <ul>
                             <li class="undecoratedLink noWrapWhitespace">
-                                <h:outputLink value="#{wiki:renderURL(node)}">
+                                <h:outputLink value="#{wikiURLRenderer.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:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
                                     <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
                                 </h:outputLink>
                             </li>
@@ -456,20 +456,20 @@
             <s:fragment rendered="#{node.isInstance('WikiUpload')}">
                 <s:fragment rendered="#{s:hasPermission('Node','read',node)}">
 
-                    <h:outputLink id="uploadLink" value="#{wiki:renderURL(node)}" tabindex="1">
+                    <h:outputLink id="uploadLink" value="#{wikiURLRenderer.renderURL(node)}" tabindex="1">
                         <h:outputText value="#{wiki:truncateString(node.name, 30, '...')} (#{wiki:displayFilesize(node.filesize)}, #{node.contentType})"/>
                     </h:outputLink>
 
                     <s:div id="uploadMenu" styleClass="contextMenu">
                         <ul>
                             <li class="undecoratedLink noWrapWhitespace">
-                                <h:outputLink value="#{wiki:renderURL(node)}">
+                                <h:outputLink value="#{wikiURLRenderer.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:outputLink value="#{wikiURLRenderer.renderURL(node)}" target="_blank">
                                     <h:outputText value="#{messages['lacewiki.button.dirDisplay.ViewNewWindow']}"/>
                                 </h:outputLink>
                             </li>
@@ -514,7 +514,7 @@
                 <h:outputText value="#{messages['lacewiki.label.dirDisplay.Owner']}"/>
             </f:facet>
             <s:span styleClass="undecoratedLink" rendered="#{node.ownedByRegularUser}">
-                <h:outputLink value="#{wiki:renderUserInfoURL(node.createdBy)}">
+                <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.createdBy)}">
                     <h:outputText value="#{node.createdBy.fullname}"/>
                 </h:outputLink>
             </s:span>
@@ -543,7 +543,7 @@
                 <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
             </h:outputText>
             (<s:span styleClass="undecoratedLink">
-                <h:outputLink value="#{wiki:renderUserInfoURL(node.lastModifiedBy)}">
+                <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.lastModifiedBy)}">
                     <h:outputText value="#{node.lastModifiedBy.username}"/>
                 </h:outputLink>
             </s:span>)

Modified: trunk/examples/wiki/view/dirDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_m.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/dirDisplay_m.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -70,7 +70,7 @@
 
     </s:fragment>
 
-    <h:outputLink value="#{wiki:renderFeedURL(directoryHome.instance.feed, null, null)}"
+    <h:outputLink value="#{wikiURLRenderer.renderFeedURL(directoryHome.instance.feed, null, null)}"
                   styleClass="linkNavigation" rendered="#{not empty directoryHome.instance.feed}">
         <h:outputText value="#{messages['lacewiki.button.DirectoryFeed']}"/>
     </h:outputLink>
@@ -161,7 +161,7 @@
         </s:span>
 
         <s:span rendered="#{node.isInstance('WikiDocument')}">
-            <h:outputLink value="#{wiki:renderURL(node)}" rendered="#{s:hasPermission('Node','read',node)}" tabindex="2">
+            <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" rendered="#{s:hasPermission('Node','read',node)}" tabindex="2">
                 <h:outputText value="#{wiki:truncateString(node.name, 40, '...')}"/>
             </h:outputLink>
             <h:outputText value="#{node.name}" rendered="#{!s:hasPermission('Node','read',node)}"/>
@@ -176,7 +176,7 @@
             <h:outputText value=" (#{wiki:displayFilesize(node.filesize)}, #{node.contentType})"/>
         </s:span>
         <h:panelGroup rendered="#{node.isInstance('WikiUpload') and !s:hasPermission('Node', 'edit', node)}">
-            <h:outputLink value="#{wiki:renderURL(node)}">
+            <h:outputLink value="#{wikiURLRenderer.renderURL(node)}">
                 <h:outputText value="#{wiki:truncateString(node.name, 30, '...')} (#{wiki:displayFilesize(node.filesize)}, #{node.contentType})"/>
             </h:outputLink>
         </h:panelGroup>

Modified: trunk/examples/wiki/view/docDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_d.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/docDisplay_d.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -15,7 +15,7 @@
     <s:fragment rendered="#{not empty documentHome.instance.parent.feed}">
         <link rel="alternate" type="application/atom+xml"
               title="#{documentHome.instance.parent.name}"
-              href="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}"/>
+              href="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}"/>
         
     </s:fragment>
 
@@ -92,7 +92,7 @@
 
                 <s:div rendered="#{documentHome.instance.nameAsTitle}">
                     <h1 class="documentTitle">
-                        <h:outputLink value="#{wiki:renderURL(currentDocument)}">
+                        <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}">
                             <h:outputText value="#{documentHome.instance.name}"/>
                         </h:outputLink>
                     </h1>
@@ -124,7 +124,7 @@
             <s:div>
                 #{messages['lacewiki.label.docDisplay.Tags']}:&#160;
                 <ui:repeat var="tag" value="#{documentHome.tagEditor.tagsAsList}">
-                    <h:outputLink value="#{wiki:renderTagURL(tag)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderTagURL(tag)}">
                         <h:outputText value="#{tag}"/>
                     </h:outputLink>
                     <h:outputText rendered="#{not wiki:isLastItemInList(documentHome.tagEditor.tagsAsList, tag)}" value="&#160;|&#160;"/>
@@ -140,7 +140,7 @@
                     <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
                 </h:outputText>
                 <h:outputText value="&#160;#{preferences.get('Wiki').timeZone}&#160;("/>
-                <h:outputLink value="#{wiki:renderURL(documentHome.instance.createdBy.memberHome)}"
+                <h:outputLink value="#{wikiURLRenderer.renderURL(documentHome.instance.createdBy.memberHome)}"
                               rendered="#{!empty documentHome.instance.createdBy.memberHome}">
                     <h:outputText value="#{documentHome.instance.createdBy.fullname}"/>
                 </h:outputLink>
@@ -154,7 +154,7 @@
                     <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
                 </h:outputText>
                 <h:outputText value="&#160;#{preferences.get('Wiki').timeZone}&#160;("/>
-                <h:outputLink value="#{wiki:renderURL(documentHome.instance.lastModifiedBy.memberHome)}"
+                <h:outputLink value="#{wikiURLRenderer.renderURL(documentHome.instance.lastModifiedBy.memberHome)}"
                               rendered="#{!empty documentHome.instance.lastModifiedBy.memberHome}">
                     <h:outputText value="#{documentHome.instance.lastModifiedBy.fullname}"/>
                 </h:outputLink>

Modified: trunk/examples/wiki/view/docDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_m.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/docDisplay_m.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -117,7 +117,7 @@
                                 enablePlugins="true"/>
 
             <s:div rendered="#{documentHome.instance.nameAsTitle}">
-                <h:outputLink value="#{wiki:renderURL(currentDocument)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}">
                     <h1 class="documentTitle">#{documentHome.instance.name}</h1>
                 </h:outputLink>
             </s:div>
@@ -164,7 +164,7 @@
             </h:column>
             <h:column>
                 <h:panelGroup>
-                    <h:outputLink value="#{wiki:renderURL(link.file)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderURL(link.file)}">
                         <h:outputText value="#{link.file.name}"/>
                         &#160;
                         <h:outputText value="(#{link.file.filename}, #{wiki:displayFilesize(link.file.filesize)}, #{link.file.contentType})"/>
@@ -180,7 +180,7 @@
         <s:div>
             #{messages['lacewiki.label.docDisplay.Tags']}:&#160;
             <ui:repeat var="tag" value="#{documentHome.tagEditor.tagsAsList}">
-                <h:outputLink value="#{wiki:renderTagURL(tag)}">
+                <h:outputLink value="#{wikiURLRenderer.renderTagURL(tag)}">
                     <h:outputText value="#{tag}"/>
                 </h:outputLink>
                 <h:outputText rendered="#{not wiki:isLastItemInList(documentHome.tagEditor.tagsAsList, tag)}" value="&#160;|&#160;"/>
@@ -216,7 +216,7 @@
 
                             <s:div rendered="#{currentDocument.name != c.subject}">
                                 <h3>
-                                    <h:outputLink value="#{wiki:renderURL(c)}">
+                                    <h:outputLink value="#{wikiURLRenderer.renderURL(c)}">
                                         <h:outputText value="#{c.subject}"/>
                                     </h:outputLink>
                                 </h3>
@@ -228,7 +228,7 @@
                                 </h:outputText>
 
                                 <s:div rendered="#{c.ownedByRegularUser}">
-                                    <h:outputLink value="#{wiki:renderUserInfoURL(c.createdBy)}">
+                                    <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
                                         <h:outputText value="#{c.createdBy.fullname}"/>
                                     </h:outputLink>
                                     <s:fragment rendered="#{wiki:showEmailAddress()}">

Modified: trunk/examples/wiki/view/docEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_d.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/docEdit_d.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -367,7 +367,7 @@
 
                     <s:div rendered="#{documentHome.instance.nameAsTitle}">
                         <h1 class="documentTitle">
-                            <h:outputLink value="#{wiki:renderURL(currentDocument)}">
+                            <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}">
                                 <h:outputText value="#{documentHome.instance.name}"/>
                             </h:outputLink>
                         </h1>

Modified: trunk/examples/wiki/view/includes/attachmentDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/attachmentDisplay.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/attachmentDisplay.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -30,7 +30,7 @@
         </h:column>
         <h:column>
             <h:panelGroup>
-                <h:outputLink value="#{wiki:renderURL(link.file)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(link.file)}">
                     <h:outputText value="#{link.file.name}"/>
                     &#160;
                     <h:outputText value="(#{link.file.filename}, #{wiki:displayFilesize(link.file.filesize)}, #{link.file.contentType})"/>

Modified: trunk/examples/wiki/view/includes/breadcrumb.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/breadcrumb.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/breadcrumb.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -9,18 +9,18 @@
 
     <h:panelGroup styleClass="breadcrumbPanel">
 
-        <h:outputLink value="#{wiki:renderURL(wikiRoot)}" styleClass="itemLink breadcrumbRoot">
+        <h:outputLink value="#{wikiURLRenderer.renderURL(wikiRoot)}" styleClass="itemLink breadcrumbRoot">
             <h:outputText value="#{wiki:truncateString(wikiRoot.name, 25, '...')}"/>
         </h:outputLink>
         <h:outputText styleClass="itemSeparator breadcrumbRoot" value="&#183;"/>
 
         <ui:repeat var="node" value="#{breadcrumb}">
 
-            <h:outputLink value="#{wiki:renderURL(node)}" styleClass="itemLink" rendered="#{node.isInstance('WikiDirectory')}">
+            <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" styleClass="itemLink" rendered="#{node.isInstance('WikiDirectory')}">
                 <h:outputText value="#{wiki:truncateString(node.name, 25, '...')}"/>
             </h:outputLink>
 
-            <h:outputLink value="#{wiki:renderURL(node)}" styleClass="itemText" rendered="#{!node.isInstance('WikiDirectory')}">
+            <h:outputLink value="#{wikiURLRenderer.renderURL(node)}" styleClass="itemText" rendered="#{!node.isInstance('WikiDirectory')}">
                 <h:outputText value="#{wiki:truncateString(node.name, 35, '...')}"/>
 
                 <h:outputText rendered="#{!empty param.day || !empty param.month || !empty param.year || !empty param.tag}" value="&#160;(showing"/>

Modified: trunk/examples/wiki/view/includes/commentsDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentsDisplay.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/commentsDisplay.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -34,7 +34,7 @@
                              cellpadding="0" cellspacing="0" border="0">
 
                     <s:div styleClass="undecoratedLink largeFont" rendered="#{currentDocument.name != c.subject}">
-                        <h:outputLink value="#{wiki:renderURL(c)}">
+                        <h:outputLink value="#{wikiURLRenderer.renderURL(c)}">
                             <h:outputText value="#{c.subject}"/>
                         </h:outputLink>
                     </s:div>
@@ -52,14 +52,14 @@
                             </s:span>
                             <h:outputText value="&#160;|&#160;"/>
                             <s:span styleClass="commentLink undecoratedLink">
-                                <h:outputLink value="#{wiki:renderURL(c)}">
+                                <h:outputLink value="#{wikiURLRenderer.renderURL(c)}">
                                     <h:outputText value="#{messages['lacewiki.label.Link']}"/>
                                 </h:outputLink>
                             </s:span>
                         </s:div>
                         <s:div rendered="#{c.ownedByRegularUser}">
                             <s:span styleClass="undecoratedLink">
-                                <h:outputLink value="#{wiki:renderUserInfoURL(c.createdBy)}">
+                                <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
                                     <h:outputText value="#{c.createdBy.fullname}"/>
                                 </h:outputLink>
                             </s:span>
@@ -86,7 +86,7 @@
 
                     <s:fragment rendered="#{c.ownedByRegularUser and !empty c.createdBy.profile.imageContentType}">
                         <s:span styleClass="undecoratedLink">
-                            <h:outputLink value="#{wiki:renderUserInfoURL(c.createdBy)}">
+                            <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
                                 <s:graphicImage styleClass="commentAuthorPortraitImage" value="#{c.createdBy.profile.image}">
                                     <s:transformImageSize width="30" maintainRatio="true"/>
                                 </s:graphicImage>

Modified: trunk/examples/wiki/view/includes/mainMenuItem.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/mainMenuItem.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/mainMenuItem.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -12,7 +12,7 @@
         <s:div styleClass="level#{childWrapper.level}Body">
             <h:outputText styleClass="level#{childWrapper.level}Marker" value="&#183;"/>
             <h:outputLink styleClass="level#{childWrapper.level}Link"
-                          value="#{wiki:renderURL(childWrapper.wrappedNode)}">#{childWrapper.wrappedNode.name}</h:outputLink>
+                          value="#{wikiURLRenderer.renderURL(childWrapper.wrappedNode)}">#{childWrapper.wrappedNode.name}</h:outputLink>
         </s:div>
         <s:div styleClass="level#{childWrapper.level}Children" style="padding-left: #{childWrapper.level*7}px;">
             <ui:include src="mainMenuItem.xhtml">

Modified: trunk/examples/wiki/view/includes/searchControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/searchControl.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/searchControl.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -5,19 +5,22 @@
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:s="http://jboss.com/products/seam/taglib">
 
-    <!-- TODO: This form doesn't work on a timeout session, not every page times it out...  -->
+    <!-- TODO: This form doesn't work on a timed out session, not every page times it out/hides it...  -->
     <h:form id="searchControlForm" styleClass="sessionEventTrigger">
         <h:panelGrid columns="2" styleClass="searchControlTable" cellpadding="0" cellspacing="0" border="0">
+
             <h:inputText styleClass="searchControlInput" id="searchControlSearchString" value="#{wikiSearch.simpleQuery}"
                          onclick="clickClear(this, '#{messages['lacewiki.label.searchControl.Search']}')"
                          onblur="clickRecall(this, '#{messages['lacewiki.label.searchControl.Search']}')"
                          size="15" maxlength="1000" tabindex="60"/>
-            <h:commandLink styleClass="searchControlLink sessionEventTrigger" tabindex="61"
+
+            <h:commandButton id="submitSearch"
+                           styleClass="searchControlButton sessionEventTrigger" tabindex="61"
                            accesskey="#{messages['lacewiki.button.searchControl.Find.accesskey']}"
-                           action="search">
-                <h:outputText escape="false" value="#{messages['lacewiki.button.searchControl.Find']}"/>
-                <f:param name="conversationPropagation" value="none"/>
-            </h:commandLink>
+                           action="search" value="#{messages['lacewiki.button.searchControl.Find']}">
+                <s:defaultAction/>
+            </h:commandButton>
+
         </h:panelGrid>
     </h:form>
 

Modified: trunk/examples/wiki/view/includes/userControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userControl.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/userControl.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -138,7 +138,7 @@
 
         <h:outputLink styleClass="link" tabindex="70"
                       accesskey="#{messages['lacewiki.button.userControl.Home.accesskey']}"
-                      value="#{wiki:renderURL(currentUser.memberHome)}"
+                      value="#{wikiURLRenderer.renderURL(currentUser.memberHome)}"
                 rendered="#{!empty currentUser.memberHome}">
             <h:outputText styleClass="linkText" escape="false" value="#{messages['lacewiki.button.userControl.Home']}"/>
         </h:outputLink>

Modified: trunk/examples/wiki/view/includes/userInfoLink.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfoLink.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/userInfoLink.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -9,7 +9,7 @@
         xmlns:s="http://jboss.com/products/seam/taglib">
 
     <s:div styleClass="undecoratedLink" rendered="#{wiki:isRegularUser(user)}">
-        <h:outputLink value="#{wiki:renderUserInfoURL(user)}">
+        <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(user)}">
             <h:outputText value="#{user.fullname}"/>
         </h:outputLink>
     </s:div>

Modified: trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -36,7 +36,7 @@
                         </a:commandLink>
                     </a:region>
                 </h:panelGroup>
-                <h:outputLink value="#{wiki:renderURL(editor.instance)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(editor.instance)}">
                     <s:graphicImage value="#{editor.instance.data}" style="border: 1px solid black;">
                         <s:transformImageSize width="#{editor.imagePreviewSize}" maintainRatio="true"/>
                     </s:graphicImage>

Modified: trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -23,10 +23,10 @@
 
                 <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:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
                         <h:graphicImage value="#{themePath}/img/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"/>
                     </h:outputLink>
-                    <h:outputLink value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
                         <h:outputText value="#{messages['blogArchive.label.Subscribe']}"/>
                     </h:outputLink>
                 </h:panelGrid>
@@ -39,15 +39,15 @@
             <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.pager.numOfRecords})</option>
+                    <option value="#{wikiURLRenderer.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}">
+                            <option value="#{wikiURLRenderer.renderURL(currentDocument)}#{beCount.asString}#{blogDirectory.tagUrl}">
                                 #{messages[wiki:concat('lacewiki.label.', converters.monthNames[beCount.month])]}&#160;#{beCount.year}&#160;(#{beCount.numOfEntries})
                             </option>
                         </s:fragment>
                         <s:fragment rendered="#{blogDirectory.dateUrl == beCount.asString}">
-                            <option value="#{wiki:renderURL(currentDocument)}#{beCount.asString}#{blogDirectory.tagUrl}" selected="true">
+                            <option value="#{wikiURLRenderer.renderURL(currentDocument)}#{beCount.asString}#{blogDirectory.tagUrl}" selected="true">
                                 #{messages[wiki:concat('lacewiki.label.', converters.monthNames[beCount.month])]}&#160;#{beCount.year}&#160;(#{beCount.numOfEntries})
                             </option>
                         </s:fragment>

Modified: trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -29,11 +29,11 @@
                             <h:outputText value="&#160;#{preferences.get('Wiki').timeZone}"/>
                             <h:outputText value=",&#160;by&#160;"/>
                             <s:span styleClass="undecoratedLink">
-                                <h:outputLink value="#{wiki:renderURL(blogEntry.entryDocument.createdBy.memberHome)}" target="_top"
+                                <h:outputLink value="#{wikiURLRenderer.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"
+                                <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(blogEntry.entryDocument.createdBy)}" target="_top"
                                               rendered="#{empty blogEntry.entryDocument.createdBy.memberHome}">
                                     <h:outputText value="#{blogEntry.entryDocument.createdBy.fullname}"/>
                                 </h:outputLink>
@@ -61,7 +61,7 @@
                                 <h:outputText rendered="#{blogEntry.entryDocument.tags.size()==1}" value="#{messages['blogDirectory.label.Tag']}:&#160;"/>
                                 <h:outputText rendered="#{blogEntry.entryDocument.tags.size()>1}" value="#{messages['blogDirectory.label.Tags']}:&#160;"/>
                                 <ui:repeat var="tag" value="#{blogEntry.entryDocument.tagsAsList}">
-                                    <h:outputLink value="#{wiki:renderTagURL(tag)}">
+                                    <h:outputLink value="#{wikiURLRenderer.renderTagURL(tag)}">
                                         <h:outputText value="#{tag}"/>
                                     </h:outputLink>
                                     <h:outputText rendered="#{not wiki:isLastItemInList(blogEntry.entryDocument.tagsAsList, tag)}" value="&#160;|&#160;"/>
@@ -75,7 +75,7 @@
                         <h:panelGrid styleClass="blogEntryFooterTable" columns="5" cellpadding="0" cellspacing="0" border="0">
                             <s:div styleClass="blogEntryCommentCount undecoratedLink"
                                    rendered="#{blogEntry.commentCount > 0 and blogEntry.entryDocument.enableComments}">
-                                <h:outputLink value="#{wiki:renderPermURL(blogEntry.entryDocument)}#comments" target="_top">
+                                <h:outputLink value="#{wikiURLRenderer.renderPermURL(blogEntry.entryDocument)}#comments" target="_top">
                                     <span class="blogEntryCommentCountText">
                                         <h:outputText value="#{blogEntry.commentCount}&#160;"/>
                                         <h:outputText value="#{blogEntry.commentCount>1
@@ -86,13 +86,13 @@
                             </s:div>
                             <s:div styleClass="blogEntryCommentLink undecoratedLink"
                                    rendered="#{blogEntry.entryDocument.enableComments and blogEntry.entryDocument.enableCommentForm}">
-                                <h:outputLink target="_top" value="#{wiki:renderURL(blogEntry.entryDocument)}?showCommentForm=true#commentForm">
+                                <h:outputLink target="_top" value="#{wikiURLRenderer.renderURL(blogEntry.entryDocument)}?showCommentForm=true#commentForm">
                                     <h:outputText styleClass="blogEntryCommentLinkText" value="#{messages['lacewiki.label.commentForm.PostComment']}"/>
                                 </h:outputLink>
                             </s:div>
                             <s:div styleClass="blogEntryAttachmentsLink undecoratedLink"
                                     rendered="#{wiki:sizeOf(wikiTextAttachments) > 0}">
-                                <h:outputLink value="#{wiki:renderPermURL(blogEntry.entryDocument)}#attachments" target="_top">
+                                <h:outputLink value="#{wikiURLRenderer.renderPermURL(blogEntry.entryDocument)}#attachments" target="_top">
                                     <span class="blogEntryAttachmentsLinkText">
                                         <h:outputText value="#{wiki:sizeOf(wikiTextAttachments)}&#160;"/>
                                         <h:outputText value="#{wiki:sizeOf(wikiTextAttachments)>1
@@ -102,12 +102,12 @@
                                 </h:outputLink>
                             </s:div>
                             <s:div styleClass="blogEntryPermLink undecoratedLink">
-                                <h:outputLink value="#{wiki:renderPermURL(blogEntry.entryDocument)}" target="_top">
+                                <h:outputLink value="#{wikiURLRenderer.renderPermURL(blogEntry.entryDocument)}" target="_top">
                                     <h:outputText styleClass="blogEntryPermLinkText" value="#{messages['lacewiki.label.PermLink']}"/>
                                 </h:outputLink>
                             </s:div>
                             <s:div styleClass="blogEntryWikiLink undecoratedLink">
-                                <h:outputLink value="#{wiki:renderWikiURL(blogEntry.entryDocument)}" target="_top">
+                                <h:outputLink value="#{wikiURLRenderer.renderWikiURL(blogEntry.entryDocument)}" target="_top">
                                     <h:outputText styleClass="blogEntryWikiLinkText" value="#{messages['lacewiki.label.WikiLink']}"/>
                                 </h:outputLink>
                             </s:div>
@@ -128,7 +128,7 @@
                      cellpadding="0" cellspacing="0" border="0">
 
             <h:outputLink rendered="#{blogDirectory.pager.previousPageAvailable}" target="_top"
-                          value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}#{blogDirectory.tagUrl}">
+                          value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}#{blogDirectory.tagUrl}">
                 <div style="width:30px;">
                 <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
                 </div>
@@ -137,7 +137,7 @@
                             rendered="#{!blogDirectory.pager.previousPageAvailable}"/>
 
             <h:outputLink rendered="#{blogDirectory.pager.previousPageAvailable}" target="_top"
-                          value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.previousPage}#{blogDirectory.tagUrl}">
+                          value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.previousPage}#{blogDirectory.tagUrl}">
                 <div style="width:30px;">
                 <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
                 </div>
@@ -160,7 +160,7 @@
             </s:span>
 
             <h:outputLink rendered="#{blogDirectory.pager.nextPageAvailable}" target="_top"
-                          value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.nextPage}#{blogDirectory.tagUrl}">
+                          value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.nextPage}#{blogDirectory.tagUrl}">
                 <div style="width:30px;">
                 <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
                 </div>
@@ -169,7 +169,7 @@
                             rendered="#{!blogDirectory.pager.nextPageAvailable}"/>
 
             <h:outputLink rendered="#{blogDirectory.pager.nextPageAvailable}" target="_top"
-                          value="#{wiki:renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.lastPage}#{blogDirectory.tagUrl}">
+                          value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.lastPage}#{blogDirectory.tagUrl}">
                 <div style="width:30px;">
                 <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
                 </div>

Modified: trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -24,12 +24,12 @@
                              cellpadding="2" cellspacing="0" border="0">
                     <h:outputLink
                             target="_top"
-                            value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}">
+                            value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
                         <h:graphicImage value="#{themePath}/img/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"/>
                     </h:outputLink>
                     <h:outputLink
                             target="_top"
-                            value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}">
+                            value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
                         <h:outputText value="#{messages['blogRecentEntries.label.Subscribe']}"/>
                     </h:outputLink>
                 </h:panelGrid>
@@ -54,7 +54,7 @@
                                  columnClasses="blogRecentEntriesItem smallFont"
                                  cellpadding="0" cellspacing="0" border="0">
                         <h:column>
-                            <h:outputLink styleClass="blogRecentEntriesItemLink" target="_top" value="#{wiki:renderURL(be.entryDocument)}">
+                            <h:outputLink styleClass="blogRecentEntriesItemLink" target="_top" value="#{wikiURLRenderer.renderURL(be.entryDocument)}">
                                 <h:outputText styleClass="blogRecentEntriesItemLinkText"
                                               value="#{wiki:truncateString(be.entryDocument.name, preferences.get('Blog', currentMacro).recentEntriesTruncateTitle, '...')}"/>
                             </h:outputLink>

Modified: trunk/examples/wiki/view/plugins/dirMenu/dirMenuItem.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/dirMenu/dirMenuItem.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/dirMenu/dirMenuItem.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -21,7 +21,7 @@
                 </s:span>
 
                 <h:outputLink styleClass="level#{childWrapper.level}Link" target="_top"
-                              value="#{wiki:renderURL(childWrapper.wrappedNode)}">#{wiki:truncateString(childWrapper.wrappedNode.name, 40, '...')}</h:outputLink>
+                              value="#{wikiURLRenderer.renderURL(childWrapper.wrappedNode)}">#{wiki:truncateString(childWrapper.wrappedNode.name, 40, '...')}</h:outputLink>
 
             </h:panelGrid>
         </s:div>

Modified: trunk/examples/wiki/view/plugins/dirMenu/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/dirMenu/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/dirMenu/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -19,11 +19,11 @@
 
             <h:panelGrid rendered="#{not empty currentDirectory.feed}" columns="2" cellpadding="0" cellspacing="0" border="0">
                 <h:outputLink  target="_top"
-                               value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}">
+                               value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
                     <h:graphicImage value="#{themePath}/img/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"/>
                 </h:outputLink>
                 <h:outputLink  target="_top"
-                               value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}">
+                               value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
                     <h:outputText value="#{messages['dirMenu.label.Subscribe']}"/>
                 </h:outputLink>
             </h:panelGrid>

Modified: trunk/examples/wiki/view/plugins/docPager/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/docPager/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/docPager/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -11,7 +11,7 @@
                  cellpadding="0" cellspacing="0" border="0">
         <s:div styleClass="undecoratedLink">
             <s:fragment rendered="#{not empty docPager.previous}">
-                <h:outputLink value="#{wiki:renderURL(docPager.previous)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.previous)}">
                     <h:graphicImage styleClass="docPagerButton" value="#{themePath}/img/left.gif" width="18" height="18"/>
                     <h:outputText styleClass="docPagerLabel"
                                   rendered="#{not preferences.get('DocPager', currentMacro).showNames}"
@@ -24,7 +24,7 @@
         </s:div>
         <s:div styleClass="undecoratedLink">
             <s:fragment rendered="#{not empty docPager.next}">
-                <h:outputLink value="#{wiki:renderURL(docPager.next)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.next)}">
                     <h:outputText styleClass="docPagerLabel" 
                                   rendered="#{not preferences.get('DocPager', currentMacro).showNames}"
                                   value="#{messages['lacewiki.label.Next']}"/>

Modified: trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -54,7 +54,7 @@
 
             <s:span id="faqCategoryLink" styleClass="undecoratedLink">
                 <s:fragment rendered="#{faqBrowser.directorySelected}">
-                    <h:outputLink value="#{wiki:renderWikiURL(currentDocument)}/Category/#{faqBrowser.selectedDir.wrappedNode.wikiname}">
+                    <h:outputLink value="#{wikiURLRenderer.renderWikiURL(currentDocument)}/Category/#{faqBrowser.selectedDir.wrappedNode.wikiname}">
                         <h:outputText value="Link"/>
                     </h:outputLink>
                 </s:fragment>
@@ -89,7 +89,7 @@
                              rowClasses="rowOdd, rowEven"
                              cellpadding="0" cellspacing="0" border="0">
                     <h:column>
-                        <h:outputLink value="#{wiki:renderURL(q)}">
+                        <h:outputLink value="#{wikiURLRenderer.renderURL(q)}">
                             <h:outputText value="#{q.name}"/>
                         </h:outputLink>
                     </h:column>
@@ -101,7 +101,7 @@
                                 <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
                             </h:outputText>
                             (<s:span styleClass="undecoratedLink">
-                                <h:outputLink value="#{wiki:renderUserInfoURL(q.lastModifiedBy)}">
+                                <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(q.lastModifiedBy)}">
                                     <h:outputText value="#{q.lastModifiedBy.username}"/>
                                 </h:outputLink>
                             </s:span>)

Modified: trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -15,7 +15,7 @@
             <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0"
                          styleClass="feedAggregatorTitle">
 
-                <h:outputLink value="#{wiki:renderAggregateFeedURL(preferences.get('FeedAggregator', currentMacro).aggregateId)}"
+                <h:outputLink value="#{wikiURLRenderer.renderAggregateFeedURL(preferences.get('FeedAggregator', currentMacro).aggregateId)}"
                               rendered="#{not empty preferences.get('FeedAggregator', currentMacro).aggregateId}"
                               style="margin-right:10px;">
                     <h:graphicImage value="#{themePath}/img/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"

Modified: trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -36,7 +36,7 @@
 
                         <!-- TODO: Fix this somehow... it was an ugly hack anyway
                         <s:div rendered="#{fe.document.enableComments and wiki:sizeOf(fe.document.comments) > 0}" styleClass="undecoratedLink">
-                            <h:outputLink target="_top" styleClass="feedTeaserComments" value="#{wiki:renderPermURL(fe.document)}#comments">
+                            <h:outputLink target="_top" styleClass="feedTeaserComments" value="#{wikiURLRenderer.renderPermURL(fe.document)}#comments">
                                 #{wiki:sizeOf(fe.document.comments)}&#160;
                                 <h:outputText value="#{wiki:sizeOf(fe.document.comments)>1
                                                      ? messages['lacewiki.label.commentsDisplay.Comments']

Modified: trunk/examples/wiki/view/plugins/forumList/forumListControls.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumList/forumListControls.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/forumList/forumListControls.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -11,7 +11,7 @@
 <s:fragment rendered="#{not forumListHome.managed}">
 
     <s:div styleClass="forumsFeedLink undecoratedLink" rendered="#{not empty currentDirectory.feed}">
-        <h:outputLink value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}"
+        <h:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}"
                       tabindex="1">
             <h:graphicImage value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
             <h:outputText value="#{currentDocument.name}&#160;#{messages['forum.label.Feed']}"/>
@@ -53,7 +53,7 @@
             <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NewForum']}"/>
         </a:commandLink>
 
-        <h:outputLink value="#{wiki:renderURL(currentDirectory)}"
+        <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory)}"
                       accesskey="#{messages['forum.button.Exit.accesskey']}"
                       tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
            <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.Exit']}"/>

Modified: trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -29,7 +29,7 @@
         <f:facet name="header">&#160;</f:facet>
         <h:panelGroup>
 
-            <h:outputLink styleClass="undecoratedLink" value="#{wiki:renderURL(f.forum)}" tabindex="1">
+            <h:outputLink styleClass="undecoratedLink" value="#{wikiURLRenderer.renderURL(f.forum)}" tabindex="1">
                 <h:graphicImage value="#{themePath}/img/icon.posting_unread.gif" width="22" height="26"
                                 rendered="#{f.unreadPostings}"/>
 
@@ -38,7 +38,7 @@
             </h:outputLink>
 
             <s:span styleClass="forumFeedLink undecoratedLink" rendered="#{not empty f.forum.feed}">
-                <h:outputLink value="#{wiki:renderFeedURL(f.forum.feed, null, null)}"
+                <h:outputLink value="#{wikiURLRenderer.renderFeedURL(f.forum.feed, null, null)}"
                               tabindex="1">
                     <h:graphicImage value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
                 </h:outputLink>
@@ -55,7 +55,7 @@
     <h:column>
         <f:facet name="header">#{messages['forum.label.Forum']}</f:facet>
         <s:div styleClass="undecoratedLink forumTitle extraLargeFont">
-            <h:outputLink styleClass="undecoratedLink" value="#{wiki:renderURL(f.forum)}" tabindex="1">
+            <h:outputLink styleClass="undecoratedLink" value="#{wikiURLRenderer.renderURL(f.forum)}" tabindex="1">
                 <h:outputText value="#{f.forum.name}"/>
             </h:outputLink>
         </s:div>
@@ -82,7 +82,7 @@
         <f:facet name="header">#{messages['forum.label.NewestTopic']}</f:facet>
         <s:fragment rendered="#{not empty f.lastTopic}">
             <ui:include src="lastTopicPost.xhtml">
-                <ui:param name="link"        value="#{wiki:renderURL(f.lastTopic)}"/>
+                <ui:param name="link"        value="#{wikiURLRenderer.renderURL(f.lastTopic)}"/>
                 <ui:param name="name"        value="#{f.lastTopic.name}"/>
                 <ui:param name="createdOn"   value="#{f.lastTopic.createdOn}"/>
                 <ui:param name="createdBy"   value="#{f.lastTopic.createdBy}"/>
@@ -99,7 +99,7 @@
         <f:facet name="header">#{messages['forum.label.LatestPost']}</f:facet>
         <s:fragment rendered="#{f.lastPostLastTopic}">
             <ui:include src="lastTopicPost.xhtml">
-                <ui:param name="link"        value="#{wiki:renderURL(f.lastTopic)}"/>
+                <ui:param name="link"        value="#{wikiURLRenderer.renderURL(f.lastTopic)}"/>
                 <ui:param name="name"        value="#{f.lastTopic.name}"/>
                 <ui:param name="createdOn"   value="#{f.lastTopic.createdOn}"/>
                 <ui:param name="createdBy"   value="#{f.lastTopic.createdBy}"/>
@@ -109,7 +109,7 @@
         </s:fragment>
         <s:fragment rendered="#{not empty f.lastComment and not f.lastPostLastTopic}">
             <ui:include src="lastTopicPost.xhtml">
-                <ui:param name="link"        value="#{wiki:renderURL(f.lastComment)}"/>
+                <ui:param name="link"        value="#{wikiURLRenderer.renderURL(f.lastComment)}"/>
                 <ui:param name="name"        value="#{f.lastComment.subject}"/>
                 <ui:param name="createdOn"   value="#{f.lastComment.createdOn}"/>
                 <ui:param name="createdBy"   value="#{f.lastComment.createdBy}"/>

Modified: trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -10,27 +10,27 @@
     <h:panelGrid columns="2" styleClass="forumPostingHeaderInfoControls" columnClasses="forumPostingHeaderInfo, forumPostingHeaderControls"
                  cellpadding="0" cellspacing="0" border="0">
 
-        <h:outputLink value="#{wiki:renderURL(currentDirectory.defaultFile)}" styleClass="extraExtraLargeFont">
+        <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}" styleClass="extraExtraLargeFont">
             <h:outputText value="#{messages['forum.label.Forum']}:&#160;#{currentDirectory.name}"/>
         </h:outputLink>
 
         <h:panelGroup>
 
-            <h:outputLink value="#{wiki:renderURL(currentDirectory.parent)}"
+            <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.parent)}"
                           accesskey="#{messages['forum.button.ForumList.accesskey']}"
                           tabindex="1" styleClass="buttonNonpersistent">
                 <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.ForumList']}"/>
             </h:outputLink>
 
             <s:fragment rendered="#{empty topicPage or topicPage == 0}">
-                <h:outputLink value="#{wiki:renderURL(currentDirectory.defaultFile)}"
+                <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}"
                               accesskey="#{messages['forum.button.TopicList.accesskey']}"
                               tabindex="1" styleClass="buttonNonpersistent">
                     <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.TopicList']}"/>
                 </h:outputLink>
             </s:fragment>
             <s:fragment rendered="#{topicPage > 0}">
-                <h:outputLink value="#{wiki:renderURL(currentDirectory.defaultFile)}/Page/#{topicPage}"
+                <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}/Page/#{topicPage}"
                               accesskey="#{messages['forum.button.TopicList.accesskey']}"
                               tabindex="1" styleClass="buttonNonpersistent">
                     <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.TopicList']}"/>
@@ -38,21 +38,21 @@
             </s:fragment>
 
             <s:fragment rendered="#{s:hasPermission('Node', 'create', currentDirectory) and not replyHome.showForm}">
-                <h:outputLink value="#{wiki:renderURL(currentDirectory.defaultFile)}?showTopicForm=true"
+                <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}?showTopicForm=true"
                               accesskey="#{messages['forum.button.NewTopic.accesskey']}"
                               tabindex="1" styleClass="buttonNonpersistent">
                     <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NewTopic']}"/>
                 </h:outputLink>
             </s:fragment>
 
-            <h:outputLink value="#{wiki:renderURL(docPager.previous)}"
+            <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.previous)}"
                           rendered="#{not empty docPager.previous and docPager.previous.id != currentDirectory.defaultFile.id}"
                           accesskey="#{messages['forum.button.PreviousPosting.accesskey']}"
                           tabindex="1" styleClass="buttonNonpersistent">
                 <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.PreviousPosting']}"/>
             </h:outputLink>
 
-            <h:outputLink value="#{wiki:renderURL(docPager.next)}"
+            <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.next)}"
                           rendered="#{not empty docPager.next and docPager.next.id != currentDirectory.defaultFile.id}"
                           accesskey="#{messages['forum.button.NextPosting.accesskey']}"
                           tabindex="1" styleClass="buttonNonpersistent">
@@ -75,7 +75,7 @@
             </s:fragment>
 
             <s:div styleClass="undecoratedLink largeFont" rendered="#{currentDocument.name != c.subject}">
-                <h:outputLink styleClass="subjectLink" value="#{wiki:renderURL(currentDocument)}">
+                <h:outputLink styleClass="subjectLink" value="#{wikiURLRenderer.renderURL(currentDocument)}">
                     <h:outputText value="#{currentDocument.name}"/>
                 </h:outputLink>
             </s:div>
@@ -90,14 +90,14 @@
                     </s:span>
                     <h:outputText value="&#160;|&#160;"/>
                     <s:span styleClass="commentLink undecoratedLink">
-                        <h:outputLink value="#{wiki:renderURL(c)}">
+                        <h:outputLink value="#{wikiURLRenderer.renderURL(c)}">
                             <h:outputText value="#{messages['lacewiki.label.Link']}"/>
                         </h:outputLink>
                     </s:span>
                 </s:div>
                 <s:div rendered="#{currentDocument.ownedByRegularUser}">
                     <s:span styleClass="undecoratedLink">
-                        <h:outputLink value="#{wiki:renderUserInfoURL(currentDocument.createdBy)}">
+                        <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
                             <h:outputText value="#{currentDocument.createdBy.fullname}"/>
                         </h:outputLink>
                     </s:span>
@@ -115,7 +115,7 @@
 
             <s:fragment rendered="#{currentDocument.ownedByRegularUser and !empty currentDocument.createdBy.profile.imageContentType}">
                 <s:span styleClass="undecoratedLink">
-                    <h:outputLink value="#{wiki:renderUserInfoURL(currentDocument.createdBy)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
                         <s:graphicImage styleClass="commentAuthorPortraitImage" value="#{currentDocument.createdBy.profile.image}">
                             <s:transformImageSize width="30" maintainRatio="true"/>
                         </s:graphicImage>

Modified: trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -31,7 +31,7 @@
             <s:div>
                 #{messages['lacewiki.label.docDisplay.Tags']}:&#160;
                 <ui:repeat var="tag" value="#{currentDocument.tagsAsList}">
-                    <h:outputLink value="#{wiki:renderTagURL(tag)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderTagURL(tag)}">
                         <h:outputText value="#{tag}"/>
                     </h:outputLink>
                     <h:outputText rendered="#{not wiki:isLastItemInList(currentDocument.tagsAsList, tag)}" value="&#160;|&#160;"/>

Modified: trunk/examples/wiki/view/plugins/forumTopics/topicControls.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumTopics/topicControls.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/forumTopics/topicControls.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -17,7 +17,7 @@
     <script type="text/javascript">stopSessionTimeoutCheck();</script>
 
     <s:div styleClass="forumsFeedLink undecoratedLink" rendered="#{not empty currentDirectory.feed}">
-        <h:outputLink value="#{wiki:renderFeedURL(currentDirectory.feed, null, null)}"
+        <h:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}"
                       tabindex="1">
             <h:graphicImage value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
             <h:outputText value="#{currentDocument.name}&#160;#{messages['forum.label.Feed']}"/>
@@ -33,14 +33,14 @@
         <h:form>
         <h:panelGroup>
 
-            <h:outputLink value="#{wiki:renderURL(currentDirectory.parent)}"
+            <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.parent)}"
                           accesskey="#{messages['forum.button.ForumList.accesskey']}"
                           tabindex="1" styleClass="buttonNonpersistent">
                 <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.ForumList']}"/>
             </h:outputLink>
 
             <s:fragment rendered="#{s:hasPermission('Node', 'create', currentDirectory)}">
-                <h:outputLink value="#{wiki:renderURL(currentDocument)}?showTopicForm=true"
+                <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}?showTopicForm=true"
                               accesskey="#{messages['forum.button.NewTopic.accesskey']}"
                               tabindex="1" styleClass="buttonNonpersistent">
                     <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NewTopic']}"/>

Modified: trunk/examples/wiki/view/plugins/forumTopics/topicPager.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumTopics/topicPager.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/forumTopics/topicPager.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -12,14 +12,14 @@
                  cellpadding="0" cellspacing="0" border="0">
 
         <h:outputLink rendered="#{forumQuery.pager.previousPageAvailable}" target="_top"
-                      value="#{wiki:renderURL(currentDocument)}">
+                      value="#{wikiURLRenderer.renderURL(currentDocument)}">
                 <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
         </h:outputLink>
         <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
                         rendered="#{!forumQuery.pager.previousPageAvailable}"/>
 
         <h:outputLink rendered="#{forumQuery.pager.previousPageAvailable}" target="_top"
-                      value="#{wiki:renderURL(currentDocument)}/Page/#{forumQuery.pager.previousPage}">
+                      value="#{wikiURLRenderer.renderURL(currentDocument)}/Page/#{forumQuery.pager.previousPage}">
             <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
         </h:outputLink>
         <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
@@ -33,14 +33,14 @@
         </s:span>
 
         <h:outputLink rendered="#{forumQuery.pager.nextPageAvailable}" target="_top"
-                      value="#{wiki:renderURL(currentDocument)}/Page/#{forumQuery.pager.nextPage}">
+                      value="#{wikiURLRenderer.renderURL(currentDocument)}/Page/#{forumQuery.pager.nextPage}">
             <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
         </h:outputLink>
         <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
                         rendered="#{!forumQuery.pager.nextPageAvailable}"/>
 
         <h:outputLink rendered="#{forumQuery.pager.nextPageAvailable}" target="_top"
-                      value="#{wiki:renderURL(currentDocument)}/Page/#{forumQuery.pager.lastPage}">
+                      value="#{wikiURLRenderer.renderURL(currentDocument)}/Page/#{forumQuery.pager.lastPage}">
             <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
         </h:outputLink>
         <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"

Modified: trunk/examples/wiki/view/plugins/forumTopics/topicTable.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumTopics/topicTable.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/forumTopics/topicTable.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -34,7 +34,7 @@
         <h:column>
             <f:facet name="header">Topic</f:facet>
 
-            <h:outputLink value="#{wiki:renderURL(t.topic)}" tabindex="1">
+            <h:outputLink value="#{wikiURLRenderer.renderURL(t.topic)}" tabindex="1">
                 <h:outputText value="#{wiki:truncateString(t.topic.name, 60, '...')}"/>
             </h:outputLink>
 
@@ -59,7 +59,7 @@
             <f:facet name="header">Last Post</f:facet>
 
             <s:fragment rendered="#{not empty t.lastComment}">
-                <h:outputLink value="#{wiki:renderURL(t.lastComment)}" tabindex="1">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(t.lastComment)}" tabindex="1">
                     <h:outputText value="#{t.lastComment.createdOn}">
                         <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
                     </h:outputText>
@@ -73,7 +73,7 @@
             </s:fragment>
 
             <s:fragment rendered="#{empty t.lastComment}">
-                <h:outputLink value="#{wiki:renderURL(t.topic)}" tabindex="1">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(t.topic)}" tabindex="1">
                     <h:outputText value="#{t.topic.createdOn}">
                         <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
                     </h:outputText>

Modified: trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/lastModifiedDocuments/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -27,7 +27,7 @@
                         <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:outputLink value="#{wikiURLRenderer.renderUserInfoURL(doc.lastModifiedBy)}">
                                     <h:outputText value="#{doc.lastModifiedBy.username}"/>
                                 </h:outputLink>
                             </s:span>
@@ -47,7 +47,7 @@
                     </s:div>
 
                     <s:div styleClass="lastModifiedTitle wrapWhitespace">
-                        <h:outputLink target="_top" value="#{wiki:renderURL(doc)}" styleClass="lastModifiedLink">
+                        <h:outputLink target="_top" value="#{wikiURLRenderer.renderURL(doc)}" styleClass="lastModifiedLink">
                             <h:outputText value="#{wiki:truncateString(doc.name, preferences.get('LastModifiedDocuments', currentMacro).documentTitleLength, '...')}"/>
                         </h:outputLink>
                     </s:div>

Modified: trunk/examples/wiki/view/plugins/tags/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/tags/plugin.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/plugins/tags/plugin.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -20,10 +20,10 @@
                          cellpadding="0" cellspacing="0" border="0">
                 <h:column>
                     <s:span rendered="#{param.tag != tagCount.tag and preferences.get('Tags', currentMacro).linkToCurrentDocument}" styleClass="undecoratedLink">
-                        <h:outputLink value="#{wiki:renderURL(currentDocument)}/Tag/#{wiki:encodeURL(tagCount.tag)}">#{tagCount.tag}</h:outputLink>
+                        <h:outputLink value="#{wikiURLRenderer.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">
-                        <h:outputLink value="#{wiki:renderTagURL(tagCount.tag)}">
+                        <h:outputLink value="#{wikiURLRenderer.renderTagURL(tagCount.tag)}">
                             <h:outputText value="#{tagCount.tag}"/>
                         </h:outputLink>
                     </s:span>
@@ -37,7 +37,7 @@
             </h:dataTable>
 
             <s:span styleClass="undecoratedLink defaultColumn" rendered="#{preferences.get('Tags', currentMacro).linkToCurrentDocument}">
-                <h:outputLink value="#{wiki:renderURL(currentDocument)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}">
                     <h:outputText value="#{messages['tags.label.All']}"/>
                 </h:outputLink>
             </s:span>

Modified: trunk/examples/wiki/view/tagDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/tagDisplay_d.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/tagDisplay_d.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -44,7 +44,7 @@
                             rendered="#{file.isInstance('WikiUpload') and empty uploadTypes[file.contentType]}"/>
 
             <s:span rendered="#{file.isInstance('WikiDocument')}">
-                <h:outputLink value="#{wiki:renderURL(file)}" rendered="#{s:hasPermission('Node','read',file)}" tabindex="2">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(file)}" rendered="#{s:hasPermission('Node','read',file)}" tabindex="2">
                     <h:outputText value="#{wiki:truncateString(file.name, 40, '...')}"/>
                 </h:outputLink>
                 <h:outputText value="#{file.name}" rendered="#{!s:hasPermission('Node','read',file)}"/>
@@ -59,7 +59,7 @@
                 <h:outputText value=" (#{wiki:displayFilesize(file.filesize)}, #{file.contentType})"/>
             </s:span>
             <h:panelGroup rendered="#{file.isInstance('WikiUpload') and !s:hasPermission('Node', 'edit', file)}">
-                <h:outputLink value="#{wiki:renderURL(file)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(file)}">
                     <h:outputText value="#{wiki:truncateString(file.name, 30, '...')} (#{wiki:displayFilesize(file.filesize)}, #{file.contentType})"/>
                 </h:outputLink>
             </h:panelGroup>
@@ -85,7 +85,7 @@
                 <h:outputText value="#{messages['lacewiki.label.tagDisplay.Owner']}"/>
             </f:facet>
             <s:span styleClass="undecoratedLink">
-                <h:outputLink value="#{wiki:renderUserInfoURL(file.createdBy)}">
+                <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(file.createdBy)}">
                     <h:outputText value="#{file.createdBy.fullname}"/>
                 </h:outputLink>
             </s:span>
@@ -106,7 +106,7 @@
                 <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
             </h:outputText>
             (<s:span styleClass="undecoratedLink">
-                <h:outputLink value="#{wiki:renderUserInfoURL(file.lastModifiedBy)}">
+                <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(file.lastModifiedBy)}">
                     <h:outputText value="#{file.lastModifiedBy.username}"/>
                 </h:outputLink>
             </s:span>)

Modified: trunk/examples/wiki/view/themes/default/css/searchControl.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/searchControl.css	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/default/css/searchControl.css	2008-02-15 02:30:12 UTC (rev 7425)
@@ -29,13 +29,15 @@
     border: 0;
 }
 
-#searchControl .searchControlLink{
+#searchControl .searchControlButton {
+    font-family: Verdana, Arial, Helvetica, sans-serif;
     font-weight: bold;
     font-size: 75%;
 	color: #C7B299;
-	text-decoration: none;
-	padding-left: 5px;
-	padding-right: 5px;
     margin-left: 5px;
     margin-right: 5px;
+    text-decoration: none;
+    cursor: pointer;
+    background:none;
+    border: none;
 }

Modified: trunk/examples/wiki/view/themes/default/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/m/template.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/default/m/template.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -79,7 +79,7 @@
 
                 <h:commandButton action="#{authenticator.logout}" value="#{messages['lacewiki.button.Logout']}"/>
 
-                <h:outputLink styleClass="userControlLink" value="#{wiki:renderURL(currentUser.memberHome)}"
+                <h:outputLink styleClass="userControlLink" value="#{wikiURLRenderer.renderURL(currentUser.memberHome)}"
                         rendered="#{!empty currentUser.memberHome}">#{messages['lacewiki.button.Home']}</h:outputLink>
 
             </h:panelGrid>

Modified: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -14,8 +14,8 @@
             <p>Hello #{currentDocument.createdBy.firstname},</p>
 
             <p>
-              you received a <a href="#{wiki:renderURL(replyHome.instance)}">response</a>
-              to <a href="#{wiki:renderURL(currentDocument)}">your posting</a> on the
+              you received a <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">response</a>
+              to <a href="#{wikiURLRenderer.renderURL(currentDocument)}">your posting</a> on the
               Lacewiki forum, posted by #{replyHome.instance.createdBy.fullname}:
             </p>
 
@@ -31,7 +31,7 @@
                                 enablePlugins="false"/>
 
             <hr/>
-            <h:outputLink value="#{wiki:renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
 
             </body>
         </html>
@@ -46,7 +46,7 @@
 
 Follow this link to read and reply:
 
-#{wiki:renderURL(replyHome.instance)}
+#{wikiURLRenderer.renderURL(replyHome.instance)}
 </h:outputText>
         </f:facet>
     </m:body>

Modified: trunk/examples/wiki/view/themes/default/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/template.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/default/template.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -37,7 +37,7 @@
         // ###################### Session timeout alert #################################
 
         var sessionChecker = Seam.Component.getInstance("httpSessionChecker");
-        var timeoutURL = '#{wiki:renderURL(wikiStart)}';
+        var timeoutURL = '#{wikiURLRenderer.renderURL(wikiStart)}';
         var timeoutMillis = '#{sessionTimeoutSeconds}'*1000+3000;
         var sessionTimeoutInterval = null;
 
@@ -283,7 +283,7 @@
             </ui:define>
             <ui:define name="mainMenuFooter">
                 <s:div styleClass="feeds" rendered="#{preferences.get('Wiki').showSiteFeedInMenu}">
-                    <h:outputLink value="#{wiki:renderFeedURL(wikiRoot.feed, null, null)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
                         <h:graphicImage value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
                         <span class="feedText">#{messages['lacewiki.button.SiteFeed']}</span>
                     </h:outputLink>

Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css	2008-02-15 02:30:12 UTC (rev 7425)
@@ -932,7 +932,8 @@
 
 .commentText {
     padding-left: 5px;
-    padding-right: 5px;    
+    padding-right: 5px;
+    line-height: 160%;
 }
 
 .commentSignatureSeparator {
@@ -1497,15 +1498,20 @@
     font-family: Andale Mono, Courier New, monospace;
 }
 
-#searchControl .searchControlLink{
+#searchControl .searchControlButton {
+    font-family: "Lucida Sans", Arial, Helvetica, sans-serif;
     font-weight: normal;
     font-size: 85%;
 	color: #d75525;
 	text-decoration: none;
     padding-left: 5px;
+    text-decoration: none;
+    cursor: pointer;
+    background:none;
+    border: none;
 }
 
-#searchControl .searchControlLink:hover {
+#searchControl .searchControlButton:hover {
     color: #666;
 }
 

Modified: trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -80,7 +80,7 @@
 
                 <h:commandButton action="#{authenticator.logout}" value="#{messages['lacewiki.button.Logout']}"/>
 
-                <h:outputLink styleClass="userControlLink" value="#{wiki:renderURL(currentUser.memberHome)}"
+                <h:outputLink styleClass="userControlLink" value="#{wikiURLRenderer.renderURL(currentUser.memberHome)}"
                         rendered="#{!empty currentUser.memberHome}">#{messages['lacewiki.button.Home']}</h:outputLink>
 
             </h:panelGrid>

Modified: trunk/examples/wiki/view/themes/inrelationto/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/template.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/inrelationto/template.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -28,7 +28,7 @@
         // ###################### Session timeout alert #################################
 
         var sessionChecker = Seam.Component.getInstance("httpSessionChecker");
-        var timeoutURL = '#{wiki:renderURL(wikiStart)}';
+        var timeoutURL = '#{wikiURLRenderer.renderURL(wikiStart)}';
         var timeoutMillis = '#{sessionTimeoutSeconds}'*1000+3000;
         var sessionTimeoutInterval = null;
 
@@ -293,7 +293,7 @@
         <ui:decorate template="../../includes/mainMenu.xhtml">
             <ui:define name="mainMenuHeader">
                 <s:div styleClass="feeds" rendered="#{preferences.get('Wiki').showSiteFeedInMenu}">
-                    <h:outputLink value="#{wiki:renderFeedURL(wikiRoot.feed, null, null)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
                         <h:graphicImage value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
                         <span class="feedText">#{messages['lacewiki.button.SiteFeed']}</span>
                     </h:outputLink>

Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css	2008-02-15 02:30:12 UTC (rev 7425)
@@ -1451,16 +1451,18 @@
     border: 0;
 }
 
-#searchControl .searchControlLink{
+#searchControl .searchControlButton {
+    font-family:  'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
     font-size: 90%;
 	color: #fff;
-	padding-left: 5px;
-	padding-right: 5px;
-    margin-left: 5px;
     margin-right: 5px;
+    text-decoration: none;
+    cursor: pointer;
+    background:none;
+    border: none;
 }
 
-#searchControl .searchControlLink:hover { color: #bbb; }
+#searchControl .searchControlButton:hover { color: #bbb; }
 
 
 /* Main Menu

Modified: trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -75,7 +75,7 @@
 
                 <h:commandButton action="#{authenticator.logout}" value="#{messages['lacewiki.button.Logout']}"/>
 
-                <h:outputLink styleClass="userControlLink" value="#{wiki:renderURL(currentUser.memberHome)}"
+                <h:outputLink styleClass="userControlLink" value="#{wikiURLRenderer.renderURL(currentUser.memberHome)}"
                         rendered="#{!empty currentUser.memberHome}">#{messages['lacewiki.button.Home']}</h:outputLink>
 
             </h:panelGrid>

Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -14,8 +14,8 @@
             <p>Hello #{currentDocument.createdBy.firstname},</p>
 
             <p>
-              you received a <a href="#{wiki:renderURL(replyHome.instance)}">response</a>
-              to <a href="#{wiki:renderURL(currentDocument)}">your posting</a> on the
+              you received a <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">response</a>
+              to <a href="#{wikiURLRenderer.renderURL(currentDocument)}">your posting</a> on the
               Seam community forum, posted by #{replyHome.instance.createdBy.fullname}:
             </p>
 
@@ -31,7 +31,7 @@
                                 enablePlugins="false"/>
 
             <hr/>
-            <h:outputLink value="#{wiki:renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
 
             </body>
         </html>
@@ -46,7 +46,7 @@
 
 Follow this link to read and reply:
 
-#{wiki:renderURL(replyHome.instance)}
+#{wikiURLRenderer.renderURL(replyHome.instance)}
 </h:outputText>
         </f:facet>
     </m:body>

Modified: trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/template.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/themes/sfwkorg/template.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -29,7 +29,7 @@
         // ###################### Session timeout alert #################################
 
         var sessionChecker = Seam.Component.getInstance("httpSessionChecker");
-        var timeoutURL = '#{wiki:renderURL(wikiStart)}';
+        var timeoutURL = '#{wikiURLRenderer.renderURL(wikiStart)}';
         var timeoutMillis = '#{sessionTimeoutSeconds}'*1000+3000;
         var sessionTimeoutInterval = null;
 
@@ -269,10 +269,10 @@
             <ui:define name="mainMenuFooter">
                 <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" styleClass="feeds"
                              rendered="#{preferences.get('Wiki').showSiteFeedInMenu}">
-                    <h:outputLink styleClass="feedLink" value="#{wiki:renderFeedURL(wikiRoot.feed, null, null)}">
+                    <h:outputLink styleClass="feedLink" value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
                         <h:graphicImage styleClass="feedIcon" value="#{themePath}/img/icon.atom.onbrown.gif" width="18" height="18"/>
                     </h:outputLink>
-                    <h:outputLink styleClass="feedLink" value="#{wiki:renderFeedURL(wikiRoot.feed, null, null)}">
+                    <h:outputLink styleClass="feedLink" value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
                         <span class="feedText">#{messages['lacewiki.button.SiteFeed']}</span>
                     </h:outputLink>
                 </h:panelGrid>
@@ -289,11 +289,11 @@
 
                 <s:fragment rendered="#{not empty currentDocument and not empty currentDocument.id}">
                     
-                    <h:outputLink styleClass="linkNavigation" value="#{wiki:renderPermURL(currentDocument)}" target="_top">
+                    <h:outputLink styleClass="linkNavigation" value="#{wikiURLRenderer.renderPermURL(currentDocument)}" target="_top">
                         <h:outputText value="#{messages['lacewiki.label.PermLink']}"/>
                     </h:outputLink>
 
-                    <h:outputLink styleClass="linkNavigation" value="#{wiki:renderWikiURL(currentDocument)}" target="_top">
+                    <h:outputLink styleClass="linkNavigation" value="#{wikiURLRenderer.renderWikiURL(currentDocument)}" target="_top">
                         <h:outputText value="#{messages['lacewiki.label.WikiLink']}"/>
                     </h:outputLink>
 

Modified: trunk/examples/wiki/view/uploadEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadEdit_d.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/uploadEdit_d.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -85,7 +85,7 @@
                         <div class="label">#{messages['lacewiki.label.uploadEdit.FileDetails']}:</div>
                         <div class="output">
                             <h:panelGroup>
-                                <h:outputLink value="#{wiki:renderURL(uploadHome.instance)}" styleClass="sessionEventTrigger">
+                                <h:outputLink value="#{wikiURLRenderer.renderURL(uploadHome.instance)}" styleClass="sessionEventTrigger">
                                     <h:outputText value="#{uploadHome.instance.filename}, #{wiki:displayFilesize(uploadHome.instance.filesize)}, #{uploadHome.instance.contentType}"/>
                                 </h:outputLink>
                             </h:panelGroup>

Modified: trunk/examples/wiki/view/uploadEdit_m.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadEdit_m.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/uploadEdit_m.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -34,7 +34,7 @@
         <s:div rendered="#{uploadHome.managed}">
             #{messages['lacewiki.label.uploadEdit.FileDetails']}:&#160;
             <h:panelGroup>
-                <h:outputLink value="#{wiki:renderURL(uploadHome.instance)}">
+                <h:outputLink value="#{wikiURLRenderer.renderURL(uploadHome.instance)}">
                     <h:outputText value="#{uploadHome.instance.filename}, #{wiki:displayFilesize(uploadHome.instance.filesize)}, #{uploadHome.instance.contentType}"/>
                 </h:outputLink>
             </h:panelGroup>

Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml	2008-02-14 23:11:13 UTC (rev 7424)
+++ trunk/examples/wiki/view/userList_d.xhtml	2008-02-15 02:30:12 UTC (rev 7425)
@@ -151,7 +151,7 @@
                     <h:outputText value="#{u.username}"/>
                 </s:fragment>
                 <s:fragment rendered="#{not u.admin and not u.guest}">
-                    <h:outputLink value="#{wiki:renderUserInfoURL(u)}">
+                    <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(u)}">
                         <h:outputText value="#{u.username}"/>
                     </h:outputLink>
                     <h:outputText rendered="#{!u.activated}" value="&#160;(#{messages['lacewiki.label.userList.NotActivated']})"/>




More information about the seam-commits mailing list