Seam SVN: r7421 - trunk/ui/src/main/java/org/jboss/seam/ui/validator.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-14 02:57:43 -0500 (Thu, 14 Feb 2008)
New Revision: 7421
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/validator/FormattedTextValidator.java
Log:
Avoid IOOBE when extracting ANTLR error message
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/validator/FormattedTextValidator.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/validator/FormattedTextValidator.java 2008-02-14 07:55:02 UTC (rev 7420)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/validator/FormattedTextValidator.java 2008-02-14 07:57:43 UTC (rev 7421)
@@ -93,13 +93,15 @@
*/
public static String getErrorMessage(String originalText,
RecognitionException re) {
- int beginIndex = Math.max(re.getColumn() - 1
- - NUMBER_OF_CONTEXT_CHARS_BEFORE, 0);
- int endIndex = Math.min(re.getColumn() + NUMBER_OF_CONTEXT_CHARS_AFTER,
- originalText.length());
- String msg = re.getMessage() + " at '" + (beginIndex == 0 ? "" : "...")
- + originalText.substring(beginIndex, endIndex)
- + (endIndex == originalText.length() ? "" : "...") + "'";
- return msg.replace("\n", " ").replace("\r", " ").replace("\uFFFF","[END OF TEXT]").replace("#{", "# {");
+
+ // Avoid IOOBE even if what we show is wrong, we need to figure out why the indexes are off sometimes
+ int beginIndex = Math.max(re.getColumn() - 1 - NUMBER_OF_CONTEXT_CHARS_BEFORE, 0);
+ int endIndex = Math.min(re.getColumn() + NUMBER_OF_CONTEXT_CHARS_AFTER, originalText.length());
+ String snippet = originalText.length() > 50 ? originalText.substring(0, 50) : originalText;
+ if (beginIndex > 0 && beginIndex < endIndex && endIndex > 0 && endIndex < originalText.length())
+ snippet = "..." + originalText.substring(beginIndex, endIndex) + "...";
+
+ String msg = re.getMessage() + " at '" + snippet + "'";
+ return msg.replace("\n", " ").replace("\r", " ").replace("\uFFFF","END OF TEXT").replace("#{", "# {");
}
}
16 years, 10 months
Seam SVN: r7420 - in trunk/examples/wiki: src/etc/WEB-INF and 32 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-14 02:55:02 -0500 (Thu, 14 Feb 2008)
New Revision: 7420
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java
Removed:
trunk/examples/wiki/view/includes/statusIndicator.xhtml
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/components.xml
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
trunk/examples/wiki/src/etc/WEB-INF/web.xml
trunk/examples/wiki/src/etc/i18n/messages_en.properties
trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties
trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Clipboard.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/DocumentHistory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagQuery.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiIdentity.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/TagDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiFile.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/plugin/forum/ForumTopicReadManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsAggregator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsPreferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/dao/TagDAOTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Linking.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Tagging.java
trunk/examples/wiki/view/adminHome_d.xhtml
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/dirEdit_d.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/docHistory_d.xhtml
trunk/examples/wiki/view/includes/commentForm.xhtml
trunk/examples/wiki/view/includes/preferences/editor.xhtml
trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml
trunk/examples/wiki/view/includes/preferencesEditor.xhtml
trunk/examples/wiki/view/includes/tagEditor.xhtml
trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml
trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml
trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml
trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml
trunk/examples/wiki/view/plugins/faqBrowser/faqQuestionForm.xhtml
trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml
trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml
trunk/examples/wiki/view/plugins/forumReplies/replyForm.xhtml
trunk/examples/wiki/view/plugins/forumTopics/topicForm.xhtml
trunk/examples/wiki/view/plugins/tags/plugin.xhtml
trunk/examples/wiki/view/search_d.xhtml
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/default/img/icon.resize_se.gif
trunk/examples/wiki/view/themes/default/template.xhtml
trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
trunk/examples/wiki/view/themes/inrelationto/img/icon.resize_se.gif
trunk/examples/wiki/view/themes/inrelationto/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/themes/sfwkorg/img/icon.resize_se.gif
trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
trunk/examples/wiki/view/uploadCreate_d.xhtml
trunk/examples/wiki/view/uploadEdit_d.xhtml
trunk/examples/wiki/view/userHome_d.xhtml
trunk/examples/wiki/view/userList_d.xhtml
trunk/examples/wiki/view/userRegister_d.xhtml
Log:
New tag editor, global AJAX status indicator, other cleanup
Modified: trunk/examples/wiki/src/etc/META-INF/components-dev.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -58,4 +58,13 @@
</property>
</component>
+ <!-- Base path for links includes port number -->
+ <factory name="basePath"
+ value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
+ }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
+
+ <factory name="themePathGetRequest" scope="CONVERSATION"
+ value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
+ }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
+
</components>
Modified: trunk/examples/wiki/src/etc/META-INF/components-prod.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -41,4 +41,13 @@
<core:init debug="false"/>
<persistence:entity-manager-factory name="wikiEntityManagerFactory" persistence-unit-name="wiki"/>
+ <!-- Base path for links includes port number -->
+ <factory name="basePath"
+ value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
+ }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
+
+ <factory name="themePathGetRequest" scope="CONVERSATION"
+ value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
+ }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
+
</components>
Modified: trunk/examples/wiki/src/etc/META-INF/components-test.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -41,4 +41,13 @@
<core:init debug="false" jndi-pattern="#{ejbName}/local"/>
<transaction:ejb-transaction/>
+ <!-- Base path for links includes port number -->
+ <factory name="basePath"
+ value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
+ }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
+
+ <factory name="themePathGetRequest" scope="CONVERSATION"
+ value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
+ }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
+
</components>
Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -13,6 +13,12 @@
</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>
@@ -162,6 +168,12 @@
<function-signature>boolean isRegularUser(org.jboss.seam.wiki.core.model.User)</function-signature>
</function>
+ <function>
+ <function-name>isLastItemInList</function-name>
+ <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
+ <function-signature>boolean isLastItemInList(java.util.List,java.lang.Object)</function-signature>
+ </function>
+
<tag>
<tag-name>formattedText</tag-name>
<handler-class>org.jboss.seam.wiki.core.ui.WikiFormattedTextHandler</handler-class>
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -123,16 +123,8 @@
</property>
</component>
- <factory name="basePath"
- value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
- }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
-
<factory name="themePath" scope="CONVERSATION" value="#{basePath}/themes/#{preferences.get('Wiki').themeName}"/>
- <factory name="themePathGetRequest" scope="CONVERSATION"
- value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
- }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
-
<factory name="skin" scope="SESSION" value="d"/>
<factory name="sessionTimeoutSeconds" scope="SESSION"
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -364,11 +364,11 @@
<exception>
<end-conversation/>
- <redirect view-id="/message.xhtml">
+ <http-error error-code="400"> <!-- We send a BAD REQUEST here because we don't want the client to retry later (Googlebot...) -->
<message severity="ERROR">
#{messages['lacewiki.msg.FatalError']} (#{wikiInit.adminContact})
</message>
- </redirect>
+ </http-error>
</exception>
</pages>
Modified: trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -3,10 +3,24 @@
<!--
- Rewrite various Wiki-like URL paths to request parameters (http://tuckey.org/urlrewrite/)
+ Rewrite nice URIs to "ugly" internal URIs. This is preparation for any RESTful service layer
+ we might want to expose later.
+ We basically have three kinds of GET URIs:
+
+ - Wiki document/directory URIs with either numeric identifiers (/123.lace) or area/node names such as /Foo/Bar.
+ The named URIs rely on the fact that WikiWord names for area/nodes are always starting with an uppercase letter.
+ The named URIs can have various other modifiers appended, such as /Page/3 or /Tag/Foobar. The representation is
+ always human-readable HTML.
+
+ - URIs to global information pages, such as /user/johndoe or /tag/Foo+Bar. These resources usually aggregate some
+ information. The distinction between named WikiWord URIs is the lowercase first letter. The representation
+ is always humand-readable HTML.
+
+ - URIs to services, such as feeds and downloads. These always start with /service and representations can vary, e.g.
+ binary data for image downloads or Atom XML for feeds.
+
@author Christian Bauer
-
-->
<urlrewrite>
@@ -44,6 +58,12 @@
<to last="true">/userInfo_%{session-attribute:skin}.seam?username=$1</to>
</rule>
+ <!-- /tag/Foo Bar-->
+ <rule>
+ <from casesensitive="true">^/tag/(.+)$</from>
+ <to last="true">/tagDisplay_%{session-attribute:skin}.seam?tag=$1</to>
+ </rule>
+
<!-- /service/Feed/atom (/Area/Foo) (/Node/Bar) (/Comments/exclude/) (/Tag/foobar) (/Aggregate/My Aggregate) -->
<rule>
<from casesensitive="true">^/service/Feed/atom(?:/Area/([A-Z0-9]+[A-Za-z0-9]*))?(?:/Node/([A-Z0-9]+[A-Za-z0-9]*))?(?:/Comments/([a-z]+))?(?:/Tag/(.+))?(?:/Aggregate/(.+))?$</from>
Modified: trunk/examples/wiki/src/etc/WEB-INF/web.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -93,17 +93,6 @@
<url-pattern>/servlets/feeds/*</url-pattern>
</servlet-mapping>
- <!-- In-place upgrades
- -->
- <servlet>
- <servlet-name>Upgrade Servlet</servlet-name>
- <servlet-class>org.jboss.seam.wiki.core.ui.UpgradeServlet</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>Upgrade Servlet</servlet-name>
- <url-pattern>/servlets/upgrade/*</url-pattern>
- </servlet-mapping>
-
<!-- Misc Settings -->
<!-- Session timeout: half hour (careful, large and long sessions need heap size>-->
Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-02-14 07:55:02 UTC (rev 7420)
@@ -571,8 +571,13 @@
# Tag Editor
-lacewiki.label.tagEdit.Tags=Tags
-lacewiki.label.tagEdit.PopularTags=Popular tags
+lacewiki.label.tagEdit.RemoveTags=Remove tags
+lacewiki.label.tagEdit.AddPopularTags=Add popular tags
+lacewiki.label.tagEdit.NewTag=New tag
+lacewiki.label.tagEdit.NoTags=No tags defined.
+lacewiki.label.tagEdit.NoPopularTags=No popular tags available.
+lacewiki.button.tagEdit.Add=Add
+lacewiki.msg.tagEdit.TagCantContainAmpersand=Tag can not contain an ampersand.
# Owner Selector
@@ -661,7 +666,7 @@
lacewiki.msg.ImportOk=Created file '{0}' in current directory.
lacewiki.msg.OptimisticLockError=Someone modified the same record while you were editing it. Your workspace has been closed.
lacewiki.msg.AccessDenied=Access Denied
-lacewiki.msg.FatalError=An unrecoverable error occured, please check the application log or contact the administrator!
+lacewiki.msg.FatalError=Request failed, please check the application log or contact the administrator!
lacewiki.msg.Trash.Emptied=All items in the trash have been permanently deleted.
lacewiki.msg.AutomaticallyGeneratedFeed=Aggregated Feed
@@ -673,7 +678,7 @@
lacewiki.preferences.wiki.Name=Core: Wiki
lacewiki.preferences.wiki.BaseURL=Static URL (in e-mails etc.) without trailing slash (e.g. 'http://my.wiki.server/installdir')
-lacewiki.preferences.wiki.TimeZone=Timezone of server (ID as defined in java.util.TimeZone
+lacewiki.preferences.wiki.TimeZone=Timezone of server
lacewiki.preferences.wiki.ThemeName=Theme directory name
lacewiki.preferences.wiki.MemberArea=Wiki area for user home directories
lacewiki.preferences.wiki.HelpArea=Wiki area containing help texts
Modified: trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties 2008-02-14 07:55:02 UTC (rev 7420)
@@ -12,5 +12,6 @@
feedAggregator.label.More=more...
feedAggregator.label.By=by
+feedAggregator.label.On=on
feedAggregator.label.Subscribe=Subscribe
feedAggregator.label.NoEntriesFound=No feed entries found.
\ No newline at end of file
Modified: trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties 2008-02-14 07:55:02 UTC (rev 7420)
@@ -1,5 +1,7 @@
tags.preferences.Name=Plugin: Tags
tags.preferences.LinkToCurrentDocument=Link to current (aggregator) document
+tags.preferences.MaxNumberOfTags=Maximum number of tags displayed
+tags.preferences.MinimumCount=Minimum number of occurences of a tag
tags.label.Tags=Tags
tags.label.All=All...
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/feed/FeedConnectorCache.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -59,7 +59,8 @@
ConnectorCacheKey<FeedConnectorCacheKey> key) {
List<FeedEntryDTO> result = feedConnector.getFeedEntries(key.getKeyValue().getUrl());
- super.writeIntoCache(cache, key, result);
+ if (result.size() > 0)
+ super.writeIntoCache(cache, key, result);
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/connectors/jira/JiraIssueListCache.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -64,7 +64,8 @@
key.getKeyValue().getPassword(),
key.getKeyValue().getFilterId()
);
- super.writeIntoCache(cache, key, result);
+ if (result.size() >0)
+ super.writeIntoCache(cache, key, result);
}
}
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-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -88,7 +88,7 @@
if (User.GUEST_USERNAME.equals(username)) return null;
User user = userDAO.findUser(username, true, true);
if (user == null || password == null || !user.getPasswordHash().equalsIgnoreCase(hashUtil.hash(password))) {
- log.info("Invalid authentication credentials for username '" + username + "'");
+ log.debug("Invalid authentication credentials for username '" + username + "'");
return null;
}
log.debug("Successfully authenticated user: " + user.getUsername());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Clipboard.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Clipboard.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Clipboard.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -1,3 +1,9 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.ScopeType;
@@ -8,6 +14,11 @@
import java.util.*;
import java.io.Serializable;
+/**
+ * Holds cut/copied node identifiers in a session-scoped clipboard.
+ *
+ * @author Christian Bauer
+ */
@Name("clipboard")
@Scope(ScopeType.SESSION)
@AutoCreate
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-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -227,7 +227,7 @@
quoted.append("<blockquote>").append("\n");
quoted.append("_").append(authorName);
quoted.append(" ").append(Messages.instance().get("forum.label.WroteOn")).append(" ");
- quoted.append(WikiUtil.formatDate(date)).append(":").append("_").append("<br/>\n");
+ quoted.append(WikiUtil.formatDate(date)).append(":").append("_").append("<br/>\n\n");
quoted.append(text);
quoted.append("\n").append("</blockquote>").append("\n\n");
quoted.append(Messages.instance().get("lacewiki.msg.wikiTextEditor.EditThisTextPreviewUpdatesAutomatically"));
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHistory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHistory.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHistory.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -82,15 +82,22 @@
}
}
- public String init() {
+ public void init() {
if (!isInitialized) {
- if (fileId == null) return "missingParameter";
+ if (getFileId() == null)
+ throw new org.jboss.seam.framework.EntityNotFoundException(getFileId(), WikiDocument.class);
+
log.debug("initializing document history with file id: " + getFileId());
if (currentFile == null) {
log.debug("loading current file: " + getFileId());
currentFile = wikiNodeDAO.findWikiDocument(getFileId());
+
+ if (currentFile == null) {
+ throw new org.jboss.seam.framework.EntityNotFoundException(getFileId(), WikiDocument.class);
+ }
+
if (!Identity.instance().hasPermission("Node", "read", currentFile) ) {
throw new AuthorizationException("You don't have permission for this operation");
}
@@ -99,8 +106,8 @@
initializeHistoricalFileList();
}
+
isInitialized = true;
- return null;
}
public void displayHistoricalRevision() {
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-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -36,13 +36,14 @@
private DocumentHistory documentHistory;
@In
private FeedDAO feedDAO;
+ @In
+ private TagEditor tagEditor;
/* -------------------------- Internal State ------------------------------ */
private WikiDocument historicalCopy;
private Boolean minorRevision;
private String formContent;
- private String tagString;
Set<WikiFile> linkTargets;
private boolean enabledPreview = false;
private boolean pushOnFeeds = false;
@@ -72,6 +73,8 @@
public WikiDocument afterNodeCreated(WikiDocument doc) {
doc = super.afterNodeCreated(doc);
+ tagEditor.setTags(doc.getTags());
+
outjectDocumentAndDirectory(doc, getParentNode());
return doc;
}
@@ -80,6 +83,8 @@
public WikiDocument beforeNodeEditNew(WikiDocument doc) {
doc = super.beforeNodeEditNew(doc);
+ tagEditor.setTags(doc.getTags());
+
doc.setEnableComments( Preferences.getInstance(CommentsPreferences.class).getEnableByDefault() );
return doc;
@@ -89,6 +94,8 @@
public WikiDocument afterNodeFound(WikiDocument doc) {
doc = super.afterNodeFound(doc);
+ tagEditor.setTags(doc.getTags());
+
findHistoricalFiles(doc);
syncMacros(doc);
outjectDocumentAndDirectory(doc, getParentNode());
@@ -100,6 +107,8 @@
public WikiDocument beforeNodeEditFound(WikiDocument doc) {
doc = super.beforeNodeEditFound(doc);
+ tagEditor.setTags(doc.getTags());
+
// Rollback to historical revision?
if (documentHistory != null && documentHistory.getSelectedHistoricalFile() != null) {
getLog().debug("rolling back to revision: " + documentHistory.getSelectedHistoricalFile().getRevision());
@@ -108,7 +117,6 @@
}
isOnSiteFeed = feedDAO.isOnSiteFeed(doc);
- tagString = doc.getTagsCommaSeparated();
return doc;
}
@@ -120,7 +128,6 @@
// Sync document content
syncFormContentToInstance(getParentNode());
syncLinks();
- syncTags();
// Set createdOn date _now_
getInstance().setCreatedOn(new Date());
@@ -159,7 +166,6 @@
// Sync document content
syncFormContentToInstance(getParentNode());
syncLinks();
- syncTags();
// Update feed entries
if (isPushOnFeeds()) {
@@ -284,10 +290,6 @@
if (linkTargets != null) getInstance().setOutgoingLinks(linkTargets);
}
- private void syncTags() {
- getInstance().setTagsCommaSeparated(tagString);
- }
-
public void syncMacros(WikiDocument doc) {
if (doc.getHeader() != null) {
MacroWikiTextRenderer renderer = MacroWikiTextRenderer.renderMacros(doc.getHeader());
@@ -400,16 +402,7 @@
return historicalFiles;
}
- public String getTagString() {
- return tagString;
+ public TagEditor getTagEditor() {
+ return tagEditor;
}
-
- public void setTagString(String tagString) {
- this.tagString = tagString;
- }
-
- public boolean isTagInTagString(String tag) {
- return tag != null && getTagString() != null && getTagString().contains(tag);
- }
-
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -19,6 +19,8 @@
/**
* Holds the nodes that are displayed in the site menu
*
+ * TODO: Caches the menu in the session, better would be a page fragment cache.
+ *
* @author Christian Bauer
*/
@Name("menu")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -41,8 +41,6 @@
@In
private UserDAO userDAO;
@In
- private TagDAO tagDAO;
- @In
private WikiDirectory wikiRoot;
@In
protected User currentUser;
@@ -51,7 +49,6 @@
public WikiNodeDAO getWikiNodeDAO() { return wikiNodeDAO; }
public UserDAO getUserDAO() { return userDAO; }
- public TagDAO getTagDAO() { return tagDAO; }
public WikiDirectory getWikiRoot() { return wikiRoot; }
public User getCurrentUser() { return currentUser; }
public List<Role.AccessLevel> getAccessLevelsList() { return accessLevelsList; }
@@ -477,12 +474,4 @@
);
}
- private List<DisplayTagCount> popularTags;
-
- public List<DisplayTagCount> getPopularTags() {
- // Load 6 most popular tags
- if (popularTags == null) popularTags = tagDAO.findTagCounts(getWikiRoot(), null, 6);
- return popularTags;
- }
-
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.action;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.wiki.core.dao.TagDAO;
+import org.jboss.seam.wiki.core.model.DisplayTagCount;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiFile;
+
+import javax.faces.application.FacesMessage;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.SortedSet;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("tagEditor")
+(a)Scope(ScopeType.CONVERSATION)
+@AutoCreate
+public class TagEditor implements Serializable {
+
+ @In
+ private TagDAO tagDAO;
+
+ @In
+ private WikiDirectory wikiRoot;
+
+ @In
+ private FacesMessages facesMessages;
+
+ private SortedSet<String> tags;
+ private String newTag;
+ private List<DisplayTagCount> popularTags;
+
+ public SortedSet<String> getTags() {
+ return tags;
+ }
+
+ public void setTags(SortedSet<String> tags) {
+ this.tags = tags;
+ }
+
+ public List<String> getTagsAsList() {
+ return new ArrayList<String>(tags);
+ }
+
+ public String getNewTag() {
+ return newTag;
+ }
+
+ public void setNewTag(String newTag) {
+ this.newTag = newTag;
+ }
+
+ public void removeTag(String tag) {
+ tags.remove(tag);
+ }
+
+ public void addTag(String tag) {
+ tags.add(tag);
+ }
+
+ public void addNewTag() {
+ if (newTag.contains("&")) {
+ facesMessages.addToControlFromResourceBundleOrDefault(
+ "newTag",
+ FacesMessage.SEVERITY_WARN,
+ "lacewiki.msg.tagEdit.TagCantContainAmpersand",
+ "Tag can not contain an ampersand."
+ );
+ } else if (newTag.length() > 0) {
+ tags.add(newTag);
+ newTag = null;
+ }
+ }
+
+ public List<DisplayTagCount> getPopularTags() {
+ // Load 6 most popular tags
+ if (popularTags == null) popularTags = tagDAO.findTagCounts(wikiRoot, null, 6, 1l);
+
+ // Filter out the ones we already have
+ List<DisplayTagCount> filtered = new ArrayList<DisplayTagCount>();
+ for (DisplayTagCount popularTag : popularTags) {
+ if (!tags.contains(popularTag.getTag()))
+ filtered.add(popularTag);
+ }
+ return filtered;
+ }
+
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagQuery.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagQuery.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagQuery.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -1,9 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.log.Log;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Logger;
import org.jboss.seam.wiki.core.dao.TagDAO;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiFile;
@@ -12,10 +20,16 @@
import java.io.Serializable;
import java.util.List;
+/**
+ * @author Christian Bauer
+ */
@Name("tagQuery")
@Scope(ScopeType.CONVERSATION)
public class TagQuery implements Serializable {
+ @Logger
+ Log log;
+
@In
TagDAO tagDAO;
@@ -36,6 +50,7 @@
}
public void loadTaggedFiles() {
+ log.debug("loading wiki files tagged with: " + tag);
taggedFiles = tagDAO.findWikFiles(wikiRoot, null, tag, WikiNode.SortableProperty.createdOn, false);
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -31,10 +31,12 @@
@In
Map<String, UploadType> uploadTypes;
+ @In
+ private TagEditor tagEditor;
+
/* -------------------------- Internal State ------------------------------ */
protected UploadEditor uploadEditor;
- private String tagString;
/* -------------------------- Basic Overrides ------------------------------ */
@@ -62,21 +64,37 @@
WikiUpload upload = uploader.getUpload();
upload = super.afterNodeCreated(upload);
initUploadEditor(upload);
+
+ tagEditor.setTags(upload.getTags());
+
return upload;
}
@Override
+ public WikiUpload beforeNodeEditNew(WikiUpload upload) {
+ tagEditor.setTags(upload.getTags());
+ return super.beforeNodeEditNew(upload);
+ }
+
+ @Override
public WikiUpload afterNodeFound(WikiUpload upload) {
upload = super.afterNodeFound(upload);
getLog().debug("initializing with existing upload '" + upload + "' and content type: " + upload.getContentType());
- tagString = upload.getTagsCommaSeparated();
-
initUploadEditor(upload);
+
+ tagEditor.setTags(upload.getTags());
+
return upload;
}
+ @Override
+ public WikiUpload beforeNodeEditFound(WikiUpload upload) {
+ tagEditor.setTags(upload.getTags());
+ return super.beforeNodeEditFound(upload);
+ }
+
/* -------------------------- Custom CUD ------------------------------ */
@Override
@@ -84,21 +102,10 @@
// Set createdOn date _now_
getInstance().setCreatedOn(new Date());
- // Tags
- getInstance().setTagsCommaSeparated(tagString);
-
return uploadEditor.beforePersist();
}
@Override
- protected boolean beforeUpdate() {
- // Tags
- getInstance().setTagsCommaSeparated(tagString);
-
- return uploadEditor.beforeUpdate();
- }
-
- @Override
public String remove() {
return trash();
}
@@ -185,15 +192,7 @@
}
}
- public String getTagString() {
- return tagString;
+ public TagEditor getTagEditor() {
+ return tagEditor;
}
-
- public void setTagString(String tagString) {
- this.tagString = tagString;
- }
-
- public boolean isTagInTagString(String tag) {
- return tag != null && getTagString() != null && getTagString().contains(tag);
- }
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiIdentity.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiIdentity.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiIdentity.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -7,8 +7,7 @@
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.Component;
-import org.jboss.seam.contexts.Contexts;
-import static org.jboss.seam.ScopeType.SESSION;
+import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Install;
import static org.jboss.seam.annotations.Install.APPLICATION;
@@ -27,7 +26,7 @@
*
*/
@Name("org.jboss.seam.security.identity")
-@Scope(SESSION)
+(a)Scope(ScopeType.SESSION)
@BypassInterceptors
@Install(precedence=APPLICATION)
@AutoCreate
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/TagDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/TagDAO.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/TagDAO.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -28,7 +28,7 @@
@In
protected EntityManager restrictedEntityManager;
- public List<DisplayTagCount> findTagCounts(WikiDirectory startDir, WikiFile ignoreFile, int limit) {
+ public List<DisplayTagCount> findTagCounts(WikiDirectory startDir, WikiFile ignoreFile, int limit, long minimumCount) {
StringBuilder queryString = new StringBuilder();
@@ -38,12 +38,14 @@
queryString.append("(").append(getNestedDirectoryQuery(startDir)).append(")").append(" ");
if (ignoreFile != null && ignoreFile.getId() != null) queryString.append("and not f = :ignoreFile").append(" ");
queryString.append("group by t").append(" ");
+ queryString.append("having count(t) >= :minimumCount").append(" ");
queryString.append("order by count(t) desc, t asc ");
Query nestedSetQuery = getSession().createQuery(queryString.toString());
nestedSetQuery.setParameter("nsThread", startDir.getNodeInfo().getNsThread());
nestedSetQuery.setParameter("nsLeft", startDir.getNodeInfo().getNsLeft());
nestedSetQuery.setParameter("nsRight", startDir.getNodeInfo().getNsRight());
+ nestedSetQuery.setParameter("minimumCount", minimumCount);
if (ignoreFile != null && ignoreFile.getId() != null)
nestedSetQuery.setParameter("ignoreFile", ignoreFile);
if (limit > 0) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiFile.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiFile.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiFile.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -94,6 +94,7 @@
return getTags().contains(tag);
}
+ /* TODO: Remove this at some point, when we are sure we don't need it anymore
public String getTagsCommaSeparated() {
if (getTags().size() == 0) return null;
StringBuilder tagString = new StringBuilder();
@@ -113,6 +114,7 @@
getTags().add(s.trim());
}
}
+ */
public abstract String getHistoricalEntityName();
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-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -271,7 +271,7 @@
syndFeed.setTitle(prefs.getFeedTitlePrefix() + feed.getTitle());
if (tag != null) {
syndFeed.setTitle(
- syndFeed.getTitle() + " (" + Messages.instance().get("lacewiki.label.tagDisplay.Tag") + " '" + tag + "')"
+ syndFeed.getTitle() + " - " + Messages.instance().get("lacewiki.label.tagDisplay.Tag") + " '" + tag + "'"
);
}
syndFeed.setLink(feed.getLink());
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-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -51,6 +51,14 @@
WikiUpload file = null;
if (!"".equals(id)) {
+
+ Long fileId = null;
+ try {
+ fileId = Long.valueOf(id);
+ } catch (NumberFormatException ex) {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND, "File" + id);
+ }
+
// TODO: Seam should use its transaction interceptor for java beans: http://jira.jboss.com/jira/browse/JBSEAM-957
UserTransaction userTx = null;
boolean startedTx = false;
@@ -63,7 +71,7 @@
}
WikiNodeDAO wikiNodeDAO = (WikiNodeDAO)org.jboss.seam.Component.getInstance(WikiNodeDAO.class);
- file = wikiNodeDAO.findWikiUpload(Long.parseLong(id));
+ file = wikiNodeDAO.findWikiUpload(fileId);
if (startedTx) userTx.commit();
} catch (Exception ex) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopicReadManager.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -1,3 +1,9 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
package org.jboss.seam.wiki.plugin.forum;
import org.jboss.seam.annotations.Name;
@@ -11,6 +17,13 @@
import java.util.HashMap;
import java.util.HashSet;
+/**
+ * For each forum (keyed by identifier), holds a set of topic threads the user read in
+ * the current session. Used to display unread topics (topics that are newer than last
+ * login and that are not managed here).
+ *
+ * @author Christian Bauer
+ */
@Name("forumTopicReadManager")
@Scope(ScopeType.SESSION)
@AutoCreate
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsAggregator.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsAggregator.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsAggregator.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -1,6 +1,7 @@
package org.jboss.seam.wiki.plugin.tags;
import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.ScopeType;
import org.jboss.seam.wiki.core.model.WikiDirectory;
@@ -27,9 +28,19 @@
@In
WikiDocument currentDocument;
+ @In("#{preferences.get('Tags', currentMacro)}")
+ TagsPreferences prefs;
+
@Factory("tagsSortedByCount")
+ @Observer(value = "Macro.render.tags", create = false)
public void aggregateTags() {
- tagsSortedByCount = tagDAO.findTagCounts(currentDirectory, currentDocument, 0);
+ tagsSortedByCount =
+ tagDAO.findTagCounts(
+ currentDirectory,
+ currentDocument,
+ prefs.getMaxNumberOfTags() != null ? prefs.getMaxNumberOfTags().intValue() : 0,
+ prefs.getMinimumCount() != null ? prefs.getMinimumCount() : 1l
+ );
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsPreferences.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsPreferences.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -7,6 +7,7 @@
package org.jboss.seam.wiki.plugin.tags;
import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
import org.jboss.seam.wiki.preferences.annotations.Preferences;
import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
import org.jboss.seam.wiki.preferences.PreferenceVisibility;
@@ -24,7 +25,31 @@
@NotNull
private Boolean linkToCurrentDocument;
+ @PreferenceProperty(
+ description = "#{messages['tags.preferences.MaxNumberOfTags']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 99l)
+ private Long maxNumberOfTags;
+
+ @PreferenceProperty(
+ description = "#{messages['tags.preferences.MinimumCount']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 99l)
+ private Long minimumCount;
+
public Boolean getLinkToCurrentDocument() {
return linkToCurrentDocument;
}
+
+ public Long getMaxNumberOfTags() {
+ return maxNumberOfTags;
+ }
+
+ public Long getMinimumCount() {
+ return minimumCount;
+ }
}
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-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -107,6 +107,10 @@
return dateUrl.toString();
}
+ public static boolean isLastItemInList(List list, Object o) {
+ return list.contains(o) && !(list.indexOf(o) < list.size()-1);
+ }
+
// Display all roles for a particular access level
public static Role.AccessLevel resolveAccessLevel(Integer accessLevel) {
List<Role.AccessLevel> accessLevels = (List<Role.AccessLevel>)Component.getInstance("accessLevelsList");
@@ -115,6 +119,13 @@
);
}
+ 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();
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/dao/TagDAOTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/dao/TagDAOTests.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/dao/TagDAOTests.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -32,7 +32,7 @@
WikiDirectory wikiRoot = (WikiDirectory)getInstance("wikiRoot");
TagDAO dao = (TagDAO)getInstance(TagDAO.class);
- List<DisplayTagCount> tags = dao.findTagCounts(wikiRoot, null, 0);
+ List<DisplayTagCount> tags = dao.findTagCounts(wikiRoot, null, 0, 1l);
assert tags.size() == 3;
assert tags.get(0).getTag().equals("Tag One");
assert tags.get(0).getCount().equals(3l);
@@ -53,7 +53,7 @@
WikiDirectory startDir = ((WikiNodeDAO)getInstance(WikiNodeDAO.class)).findWikiDirectory(4l);
TagDAO dao = (TagDAO)getInstance(TagDAO.class);
- List<DisplayTagCount> tags = dao.findTagCounts(startDir, null, 2);
+ List<DisplayTagCount> tags = dao.findTagCounts(startDir, null, 2, 1l);
assert tags.size() == 2;
assert tags.get(0).getTag().equals("Tag One");
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Linking.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Linking.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Linking.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -17,6 +17,7 @@
import org.jboss.seam.wiki.util.WikiUtil;
import org.testng.annotations.Test;
+import javax.persistence.EntityManager;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -241,27 +242,37 @@
assert docHome.getInstance().getContent().equals("[=>wiki://7] and [=>wiki://8] and [=>wiki://30]");
assert docHome.getInstance().getOutgoingLinks().size() == 3;
- docHome.getEntityManager().clear();
+ }
+
+ }.run();
+
+ new FacesRequest() {
+
+ protected void invokeApplication() throws Exception {
+ EntityManager em = (EntityManager) getInstance("restrictedEntityManager");
+
WikiDocument d = (WikiDocument)
- docHome.getEntityManager().createQuery("select d from WikiDocument d left join fetch d.incomingLinks where d.id = :id")
+ em.createQuery("select d from WikiDocument d left join fetch d.incomingLinks where d.id = :id")
.setParameter("id", 7l)
.getSingleResult();
assert d.getIncomingLinks().size() == 1;
- docHome.getEntityManager().clear();
+ em.clear();
+
d = (WikiDocument)
- docHome.getEntityManager().createQuery("select d from WikiDocument d left join fetch d.incomingLinks where d.id = :id")
+ em.createQuery("select d from WikiDocument d left join fetch d.incomingLinks where d.id = :id")
.setParameter("id", 8l)
.getSingleResult();
assert d.getIncomingLinks().size() == 2;
- docHome.getEntityManager().clear();
+ em.clear();
+
WikiUpload f = (WikiUpload)
- docHome.getEntityManager().createQuery("select f from WikiUpload f left join fetch f.incomingLinks where f.id = :id")
+ em.createQuery("select f from WikiUpload f left join fetch f.incomingLinks where f.id = :id")
.setParameter("id", 30l)
.getSingleResult();
assert f.getIncomingLinks().size() == 1;
}
+ }.run();
- }.run();
}
private void checkLink(WikiLinkResolver resolver, Long fileId, String wikiText, String databaseText) {
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Tagging.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Tagging.java 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Tagging.java 2008-02-14 07:55:02 UTC (rev 7420)
@@ -48,9 +48,11 @@
assert docHome.getInstance().getId().equals(6l); // Init!
- assert docHome.getTagString().equals("Tag One");
assert docHome.getInstance().getTags().size() == 1;
- docHome.setTagString(docHome.getTagString() + ", New Tag");
+ assert docHome.getInstance().getTags().contains("Tag One");
+ assert docHome.getTagEditor().getTagsAsList().contains("Tag One");
+ docHome.getTagEditor().setNewTag("New Tag");
+ docHome.getTagEditor().addNewTag();
assert invokeMethod("#{documentHome.update}").equals("updated");
}
@@ -90,7 +92,8 @@
assert uploadHome.getInstance().getId().equals(30l); // Init!
assert uploadHome.getInstance().getTags().size() == 0;
- uploadHome.setTagString("New Tag");
+ uploadHome.getTagEditor().setNewTag("New Tag");
+ uploadHome.getTagEditor().addNewTag();
assert invokeMethod("#{uploadHome.update}").equals("updated");
}
Modified: trunk/examples/wiki/view/adminHome_d.xhtml
===================================================================
--- trunk/examples/wiki/view/adminHome_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/adminHome_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -56,10 +56,6 @@
<h:form id="adminForm" styleClass="box">
<div class="form">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="adminFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<script type="text/javascript">jQuery(function() {
@@ -144,7 +140,7 @@
<script type="text/javascript">
jQuery(function(){ getIndexingProgress("#{ie.clazz.name}") });
</script>
- <a:commandLink status="adminFormStatus" id="resetSearchIndex" styleClass="button resetIndexButton sessionEventTrigger" reRender="indexStatistics"
+ <a:commandLink status="globalStatus" id="resetSearchIndex" styleClass="button resetIndexButton sessionEventTrigger" reRender="indexStatistics"
action="#{adminHome.resetSearchIndex()}" oncomplete="onAjaxRequestComplete()">
<h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.adminHome.RebuildIndex']}"/>
</a:commandLink>
@@ -187,7 +183,7 @@
#{lp.link}
</h:column>
<h:column>
- <a:commandLink status="adminFormStatus" id="removeLinkProtocol"
+ <a:commandLink status="globalStatus" id="removeLinkProtocol"
styleClass="buttonNonpersistent sessionEventTrigger" reRender="linkProtocolsRegion"
action="#{adminHome.removeLinkProtocol()}" oncomplete="onAjaxRequestComplete()">
<h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.Remove']}"/>
@@ -212,7 +208,7 @@
<div class="entry">
<div class="label"> </div>
<div class="input">
- <a:commandLink status="adminFormStatus" id="addLinkProtocol"
+ <a:commandLink status="globalStatus" id="addLinkProtocol"
styleClass="buttonNonpersistent sessionEventTrigger" reRender="linkProtocolsRegion"
action="#{adminHome.addLinkProtocol}" oncomplete="onAjaxRequestComplete()">
<h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.Add']}"/>
@@ -229,7 +225,6 @@
<div class="formFields">
<ui:include src="includes/preferencesEditor.xhtml">
<ui:param name="tabId" value="systemPrefsTab"/>
- <ui:param name="statusId" value="adminFormStatus"/>
<ui:param name="preferenceEntities" value="#{systemPreferenceEntities}"/>
</ui:include>
</div>
@@ -243,7 +238,7 @@
<div class="label"> </div>
<div class="input">
- <a:commandLink status="adminFormStatus" id="update"
+ <a:commandLink status="globalStatus" id="update"
styleClass="button saveButton sessionEventTrigger" reRender="body"
action="#{adminHome.update}"
oncomplete="onAjaxRequestComplete()"
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -110,21 +110,21 @@
<h:panelGroup styleClass="undecoratedLink"
rendered="#{directoryHome.childNodes.size() > 0 and directoryHome.instance.id != wikiRoot.id}">
<h:outputText value="#{messages['lacewiki.label.Clipboard.Select']}: "/>
- <h:outputLink value="#" onclick="selectCheckBoxes('wikiFileSelect'); switchClipboardControl();" tabindex="1">
+ <h:outputLink value="javascript:selectCheckBoxes('wikiFileSelect'); switchClipboardControl();" tabindex="1">
<h:outputText value="#{messages['lacewiki.label.Clipboard.All']}"/>
</h:outputLink>
<h:outputText value=" | "/>
- <h:outputLink value="#" onclick="deselectCheckBoxes('wikiFileSelect'); switchClipboardControl();" tabindex="1">
+ <h:outputLink value="javascript:deselectCheckBoxes('wikiFileSelect'); switchClipboardControl();" tabindex="1">
<h:outputText value="#{messages['lacewiki.label.Clipboard.None']}"/>
</h:outputLink>
<h:outputText value=" | "/>
- <h:outputLink value="#" tabindex="1"
- onclick="deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiDocumentSelect'); switchClipboardControl();">
+ <h:outputLink value="javascript:deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiDocumentSelect'); switchClipboardControl();"
+ tabindex="1">
<h:outputText value="#{messages['lacewiki.label.Clipboard.Documents']}"/>
</h:outputLink>
<h:outputText value=" | "/>
- <h:outputLink value="#" tabindex="1"
- onclick="deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiUploadSelect'); switchClipboardControl();">
+ <h:outputLink value="javascript:deselectCheckBoxes('wikiFileSelect'); selectCheckBoxes('wikiUploadSelect'); switchClipboardControl();"
+ tabindex="1">
<h:outputText value="#{messages['lacewiki.label.Clipboard.UploadedFiles']}"/>
</h:outputLink>
</h:panelGroup>
@@ -422,10 +422,10 @@
<s:fragment rendered="#{directoryHome.isRemovable(node)}">
<a:jsFunction name="deleteDocumentId#{node.id}"
+ status="globalStatus"
action="#{documentHome.remove(node.id)}"/>
<li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#"
- onclick="deleteConfirmation('\\'#{node.name}\\'', 'deleteDocumentId#{node.id}')">
+ <h:outputLink value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteDocumentId#{node.id}')">
<h:outputText value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
</h:outputLink>
</li>
@@ -476,10 +476,10 @@
<s:fragment rendered="#{directoryHome.isRemovable(node)}">
<a:jsFunction name="deleteUploadId#{node.id}"
+ status="globalStatus"
action="#{uploadHome.remove(node.id)}"/>
<li class="undecoratedLink noWrapWhitespace">
- <h:outputLink value="#"
- onclick="deleteConfirmation('\\'#{node.name}\\'', 'deleteUploadId#{node.id}')">
+ <h:outputLink value="javascript:deleteConfirmation('\\'#{node.name}\\'','deleteUploadId#{node.id}')">
<h:outputText value="#{messages['lacewiki.button.dirDisplay.Delete']}"/>
</h:outputLink>
</li>
Modified: trunk/examples/wiki/view/dirEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirEdit_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/dirEdit_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -40,10 +40,6 @@
<h:form id="directoryEditForm" styleClass="box">
<div class="form">
-<ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="directoryEditFormStatus"/>
-</ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<div class="formHead">
@@ -82,14 +78,14 @@
<s:decorate id="nameDecorate" template="includes/formFieldDecorate.xhtml">
<ui:define name="label">#{messages['lacewiki.label.dirEdit.Name']}</ui:define>
<h:inputText styleClass="ajaxSupport" size="25" maxlength="255" required="true" tabindex="1" value="#{directoryHome.instance.name}">
- <a:support status="directoryEditFormStatus" event="onchange" reRender="nameDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="nameDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
<s:decorate id="descriptionDecorate" template="includes/formFieldDecorate.xhtml">
<ui:define name="label">#{messages['lacewiki.label.dirEdit.Description']}</ui:define>
<h:inputText styleClass="ajaxSupport" size="50" maxlength="512" required="false" tabindex="1" value="#{directoryHome.instance.description}">
- <a:support status="directoryEditFormStatus" event="onchange" reRender="descriptionDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="descriptionDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -133,7 +129,7 @@
var="dir"
label="#{wiki:truncateString(dir.name, 40, '...')}"/>
</h:selectOneMenu>
- <a:commandLink status="directoryEditFormStatus" tabindex="1"
+ <a:commandLink status="globalStatus" tabindex="1"
action="#{directoryHome.addMenuItem}"
reRender="menuEditor"
oncomplete="onAjaxRequestComplete()"
@@ -163,7 +159,7 @@
</h:column>
<h:column>
- <a:commandLink status="directoryEditFormStatus" tabindex="1"
+ <a:commandLink status="globalStatus" tabindex="1"
action="#{directoryHome.removeMenuItem(menuItem.directoryId)}"
reRender="menuEditor"
oncomplete="onAjaxRequestComplete()"
@@ -174,7 +170,7 @@
<h:column>
<a:commandLink rendered="#{uiComponent['directoryEditForm:menuItemTable'].rowIndex != 0}"
- status="directoryEditFormStatus"
+ status="globalStatus"
action="#{directoryHome.moveMenuItem(uiComponent['directoryEditForm:menuItemTable'].rowIndex, uiComponent['directoryEditForm:menuItemTable'].rowIndex-1)}"
oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger" tabindex="1"
@@ -184,7 +180,7 @@
</h:column>
<h:column>
<a:commandLink rendered="#{uiComponent['directoryEditForm:menuItemTable'].rowIndex != uiComponent['directoryEditForm:menuItemTable'].rowCount-1}"
- status="directoryEditFormStatus"
+ status="globalStatus"
action="#{directoryHome.moveMenuItem(uiComponent['directoryEditForm:menuItemTable'].rowIndex, uiComponent['directoryEditForm:menuItemTable'].rowIndex+1)}"
oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger" tabindex="1"
@@ -246,10 +242,11 @@
<s:fragment rendered="#{directoryHome.removable}">
<a:jsFunction name="deleteDirectory"
+ status="globalStatus"
action="#{directoryHome.remove}"/>
- <h:outputLink value="#" tabindex="1"
+ <h:outputLink tabindex="1"
accesskey="#{messages['lacewiki.button.dirEdit.Delete.accesskey']}"
- onclick="deleteConfirmation('\\'#{directoryHome.instance.name}\\'', 'deleteDirectory')"
+ value="javascript:deleteConfirmation('\\'#{directoryHome.instance.name}\\'','deleteDirectory')"
styleClass="button sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['lacewiki.button.dirEdit.Delete']}"/>
</h:outputLink>
Modified: trunk/examples/wiki/view/docDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/docDisplay_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -123,13 +123,11 @@
styleClass="documentTags undecoratedLink smallFont">
<s:div>
#{messages['lacewiki.label.docDisplay.Tags']}: 
- <ui:repeat var="tag" value="#{documentHome.instance.tagsAsList}">
- <s:link view="/tagDisplay_#{skin}.xhtml" value="#{tag}" propagation="none">
- <f:param value="#{tag}" name="tag"/>
- </s:link>
-
- <h:outputText rendered="#{documentHome.instance.tagsAsList.indexOf(tag) < documentHome.instance.tagsAsList.size()-1}"
- value=" | "/>
+ <ui:repeat var="tag" value="#{documentHome.tagEditor.tagsAsList}">
+ <h:outputLink value="#{wiki:renderTagURL(tag)}">
+ <h:outputText value="#{tag}"/>
+ </h:outputLink>
+ <h:outputText rendered="#{not wiki:isLastItemInList(documentHome.tagEditor.tagsAsList, tag)}" value=" | "/>
</ui:repeat>
</s:div>
</s:div>
@@ -226,10 +224,10 @@
<s:fragment rendered="#{s:hasPermission('Comment', 'delete', currentDocument) and not commentHome.showForm}">
<a:jsFunction name="deleteCommentId#{c.id}"
reRender="commentDisplayForm"
+ status="globalStatus"
action="#{commentHome.remove(c.id)}"/>
- <h:outputLink value="#"
- onclick="deleteConfirmation('#{messages['lacewiki.label.commentsDisplay.CommentThread']} \\'#{c.subject}\\'', 'deleteCommentId#{c.id}')"
- styleClass="button">
+ <h:outputLink value="javascript:deleteConfirmation('#{messages['lacewiki.label.commentsDisplay.CommentThread']} \\'#{c.subject}\\'','deleteCommentId#{c.id}')"
+ styleClass="button">
<h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.commentsDisplay.RemoveComment']}"/>
</h:outputLink>
</s:fragment>
Modified: trunk/examples/wiki/view/docDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_m.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/docDisplay_m.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -179,13 +179,11 @@
styleClass="smallFont">
<s:div>
#{messages['lacewiki.label.docDisplay.Tags']}: 
- <ui:repeat var="tag" value="#{documentHome.instance.tagsAsList}">
- <s:link view="/tagDisplay_#{skin}.xhtml" value="#{tag}" propagation="none">
- <f:param value="#{tag}" name="tag"/>
- </s:link>
-
- <h:outputText rendered="#{documentHome.instance.tagsAsList.indexOf(tag) < documentHome.instance.tagsAsList.size()-1}"
- value=" | "/>
+ <ui:repeat var="tag" value="#{documentHome.tagEditor.tagsAsList}">
+ <h:outputLink value="#{wiki:renderTagURL(tag)}">
+ <h:outputText value="#{tag}"/>
+ </h:outputLink>
+ <h:outputText rendered="#{not wiki:isLastItemInList(documentHome.tagEditor.tagsAsList, tag)}" value=" | "/>
</ui:repeat>
</s:div>
</s:div>
Modified: trunk/examples/wiki/view/docEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/docEdit_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -42,10 +42,6 @@
<h:form id="docEditForm">
<div class="form">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="docEditFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck();</script>
<script type="text/javascript">jQuery(function() {
@@ -96,7 +92,7 @@
<ui:param name="fieldId" value="name"/>
<ui:define name="label">#{messages['lacewiki.label.docEdit.Name']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="65" maxlength="200" required="true" value="#{documentHome.instance.name}">
- <a:support status="docEditFormStatus" event="onchange" reRender="nameDecorate, contentPreview" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="nameDecorate, contentPreview" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -104,7 +100,7 @@
<div class="label"> </div>
<div class="input">
<h:selectBooleanCheckbox styleClass="ajaxSupport" value="#{documentHome.instance.nameAsTitle}" tabindex="1">
- <a:support status="docEditFormStatus" event="onchange" reRender="contentPreview" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="contentPreview" oncomplete="onAjaxRequestComplete()"/>
</h:selectBooleanCheckbox>
<h:outputText value="#{messages['lacewiki.label.docEdit.RenderNameAsTitle']}"/>
</div>
@@ -123,7 +119,7 @@
<div class="label"> </div>
<div class="input">
<h:selectBooleanCheckbox styleClass="ajaxSupport" value="#{documentHome.pushOnFeeds}" tabindex="1">
- <a:support status="docEditFormStatus" event="onchange" reRender="pushOnSiteFeedSwitchUnmanaged" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="pushOnSiteFeedSwitchUnmanaged" oncomplete="onAjaxRequestComplete()"/>
</h:selectBooleanCheckbox>
<h:outputText value="#{messages['lacewiki.label.docEdit.CreateOnParentFeeds']}"/>
</div>
@@ -156,7 +152,7 @@
<div class="label"> </div>
<div class="input">
<h:selectBooleanCheckbox styleClass="ajaxSupport" value="#{documentHome.pushOnFeeds}" tabindex="1">
- <a:support status="docEditFormStatus" event="onchange" reRender="pushOnSiteFeedSwitch" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="pushOnSiteFeedSwitch" oncomplete="onAjaxRequestComplete()"/>
</h:selectBooleanCheckbox>
<h:outputText value="#{messages['lacewiki.label.docEdit.PushOnParentFeeds']}"/>
</div>
@@ -180,7 +176,6 @@
<ui:param name="textEditorId" value="content"/>
<ui:param name="textPreviewId" value="#{documentHome.enabledPreview ? 'contentPreview' : ''}"/>
<ui:param name="namingContainer" value="docEditForm"/>
- <ui:param name="statusId" value="docEditFormStatus"/>
<ui:param name="label" value="#{messages['lacewiki.label.docEdit.Content']}"/>
<ui:param name="textEditorColumns" value="#{preferences.get('DocEditor').regularEditAreaColumns}"/>
<ui:param name="textEditorRows" value="#{preferences.get('DocEditor').regularEditAreaRows}"/>
@@ -194,7 +189,7 @@
<div class="label"> </div>
<div class="input">
<h:selectBooleanCheckbox styleClass="ajaxSupport" value="#{documentHome.enabledPreview}" tabindex="1" id="previewSwitch">
- <a:support status="docEditFormStatus"
+ <a:support status="globalStatus"
event="onchange"
oncomplete="onAjaxRequestComplete()"
reRender="contentPreview, docEditForm:contentTextEditor, pluginSwitch"/>
@@ -208,7 +203,7 @@
<div class="label"> </div>
<div class="input">
<h:selectBooleanCheckbox styleClass="ajaxSupport" value="#{documentHome.showPluginPrefs}" tabindex="1">
- <a:support status="docEditFormStatus" event="onchange" reRender="contentPreview" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="contentPreview" oncomplete="onAjaxRequestComplete()"/>
</h:selectBooleanCheckbox>
<h:outputText value="#{messages['lacewiki.label.docEdit.ShowPluginSettings']}"/>
</div>
@@ -250,7 +245,7 @@
</div>
<div class="input">
<h:selectBooleanCheckbox styleClass="ajaxSupport" value="#{documentHome.instance.enableComments}" tabindex="1">
- <a:support status="docEditFormStatus" event="onchange" reRender="commentFormSwitch" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="commentFormSwitch" oncomplete="onAjaxRequestComplete()"/>
</h:selectBooleanCheckbox>
<h:outputText value="#{messages['lacewiki.label.docEdit.EnableComments']}"/>
</div>
@@ -279,8 +274,7 @@
</s:div>
<ui:include src="includes/tagEditor.xhtml">
- <ui:param name="namingContainer" value="docEditForm"/>
- <ui:param name="home" value="#{documentHome}"/>
+ <ui:param name="editor" value="#{documentHome.tagEditor}"/>
</ui:include>
</div>
@@ -339,10 +333,11 @@
<s:fragment rendered="#{documentHome.removable}">
<a:jsFunction name="deleteDocument"
+ status="globalStatus"
action="#{documentHome.remove}"/>
- <h:outputLink value="#" tabindex="1"
+ <h:outputLink tabindex="1"
accesskey="#{messages['lacewiki.button.docEdit.Delete.accesskey']}"
- onclick="deleteConfirmation('\\'#{documentHome.instance.name}\\'', 'deleteDocument')"
+ value="javascript:deleteConfirmation('\\'#{documentHome.instance.name}\\'','deleteDocument')"
styleClass="button sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['lacewiki.button.docEdit.Delete']}"/>
</h:outputLink>
Modified: trunk/examples/wiki/view/docHistory_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docHistory_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/docHistory_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -28,10 +28,6 @@
<div class="form">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="historyFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<div class="formHead">#{messages['lacewiki.label.docHistory.DocumentHistory']}: #{documentHistory.currentFile.name}</div>
@@ -101,7 +97,7 @@
</h:column>
<h:column>
- <a:commandLink id="show" status="historyFormStatus"
+ <a:commandLink id="show" status="globalStatus"
oncomplete="onAjaxRequestComplete()"
action="#{documentHistory.displayHistoricalRevision}"
reRender="messageBoxContainer, historyTable, diffResult, historicalPreview"
Modified: trunk/examples/wiki/view/includes/commentForm.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentForm.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/commentForm.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -10,10 +10,6 @@
<h:form id="commentForm" styleClass="commentForm">
<div class="form">
- <ui:include src="statusIndicator.xhtml">
- <ui:param name="statusId" value="commentFormStatus"/>
- </ui:include>
-
<div class="formHead bottomBorder">
<script type="text/javascript">
@@ -54,7 +50,7 @@
<ui:define name="label">#{messages['lacewiki.label.commentForm.Name']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="100" required="true"
id="userName" value="#{commentHome.instance.fromUserName}">
- <a:support status="commentFormStatus" event="onchange" reRender="userNameDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="userNameDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
</a:region>
@@ -79,7 +75,7 @@
<ui:define name="label">#{messages['lacewiki.label.commentForm.Subject']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="255" required="true"
id="subject" value="#{commentHome.instance.subject}">
- <a:support status="commentFormStatus" event="onchange" reRender="subjectDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="subjectDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
</a:region>
@@ -89,7 +85,6 @@
<ui:param name="textEditorId" value="comment"/>
<ui:param name="textPreviewId" value="commentPreview"/>
<ui:param name="namingContainer" value="commentForm"/>
- <ui:param name="statusId" value="commentFormStatus"/>
<ui:param name="label" value="#{messages['lacewiki.label.commentForm.Comment']}"/>
<ui:param name="valueBinding" value="#{commentHome.instance.content}"/>
<ui:param name="valueMaxLength" value="32768"/>
@@ -108,7 +103,6 @@
</a:region>
<s:decorate id="verifyCaptchaEntry" template="captchaEntry.xhtml">
- <ui:param name="statusId" value="commentFormStatus"/>
<ui:param name="rendered" value="#{!identity.loggedIn}"/>
</s:decorate>
@@ -123,7 +117,7 @@
<a:commandLink id="post"
action="#{commentHome.persist}" tabindex="1"
reRender="commentDisplayForm, messageBoxContainer"
- status="commentFormStatus"
+ status="globalStatus"
eventsQueue="ajaxEventQueue"
oncomplete="onAjaxRequestComplete()"
styleClass="button sessionEventTrigger">
Modified: trunk/examples/wiki/view/includes/preferences/editor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferences/editor.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/preferences/editor.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -12,7 +12,7 @@
<s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'String'}">
<h:inputText styleClass="ajaxSupport" value="#{v.value}" size="25">
- <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ <a:support status="globalStatus" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
reRender="preferenceValidationErrors"/>
</h:inputText>
</s:div>
@@ -20,7 +20,7 @@
<s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'Long'}">
<h:inputText styleClass="ajaxSupport" value="#{v.value}" size="5">
<f:converter converterId="javax.faces.Long"/>
- <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ <a:support status="globalStatus" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
reRender="preferenceValidationErrors"/>
</h:inputText>
</s:div>
@@ -28,7 +28,7 @@
<s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'Double'}">
<h:inputText styleClass="ajaxSupport" value="#{v.value}" size="10">
<f:converter converterId="javax.faces.Double"/>
- <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ <a:support status="globalStatus" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
reRender="preferenceValidationErrors"/>
</h:inputText>
</s:div>
@@ -36,7 +36,7 @@
<s:div rendered="#{v.preferenceProperty.fieldType.simpleName == 'Date'}">
<h:inputText styleClass="ajaxSupport" id="dt" value="#{v.value}">
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
- <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ <a:support status="globalStatus" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
reRender="preferenceValidationErrors"/>
</h:inputText>
<s:selectDate for="dt" dateFormat="dd. MMM yyyy, HH:mm">
Modified: trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/preferences/editorAdaptiveTextInput.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -12,7 +12,7 @@
value="#{v.value}"
size="#{editorAdaptiveTextInput.getSize(v.preferenceProperty)}"
maxlength="#{editorAdaptiveTextInput.getMaxLength(v.preferenceProperty)}">
- <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
+ <a:support status="globalStatus" event="onchange" action="#{preferenceEditor.validate}" oncomplete="onAjaxRequestComplete()"
reRender="preferenceValidationErrors"/>
</h:inputText>
</s:fragment>
@@ -21,7 +21,7 @@
cols="#{editorAdaptiveTextInput.getTextAreaCols(v.preferenceProperty)}"
rows="#{editorAdaptiveTextInput.getTextAreaRows(v.preferenceProperty)}"
style="margin:5px;">
- <a:support status="#{statusId}" event="onchange" action="#{preferenceEditor.validate}"
+ <a:support status="globalStatus" event="onchange" action="#{preferenceEditor.validate}"
reRender="preferenceValidationErrors"/>
</h:inputTextarea>
</s:fragment>
Modified: trunk/examples/wiki/view/includes/preferencesEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferencesEditor.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/preferencesEditor.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -19,7 +19,7 @@
<h:column>
<s:div styleClass="#{preferenceEntity == preferenceEditor.preferenceEntity ? 'formListSelectedItem' : 'formListItem'}">
<a:commandLink action="#{preferenceEditor.selectPreferenceEntity(preferenceEntity)}"
- status="#{statusId}"
+ status="globalStatus"
reRender="preferenceEntityList, preferencePropertyPanel" oncomplete="onAjaxRequestComplete()">
#{preferenceEntity.description}
</a:commandLink>
Deleted: trunk/examples/wiki/view/includes/statusIndicator.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/statusIndicator.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/statusIndicator.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -1,23 +0,0 @@
-<s:div styleClass="statusIndicator"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:wiki="http://jboss.com/products/seam/wiki"
- xmlns:a="https://ajax4jsf.dev.java.net/ajax"
- xmlns:s="http://jboss.com/products/seam/taglib">
-
- <a:status id="#{statusId}" forceId="true">
- <f:facet name="start">
- <s:div styleClass="statusStart">
- <h:graphicImage value="#{themePath}/img/statusindicator.gif" width="20" height="25"/>
- </s:div>
- </f:facet>
- <f:facet name="stop">
- <s:div styleClass="statusStop">
- <h:graphicImage value="#{themePath}/img/blank.gif" width="20" height="25"/>
- </s:div>
- </f:facet>
- </a:status>
-
-</s:div>
Modified: trunk/examples/wiki/view/includes/tagEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/tagEditor.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/tagEditor.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -7,54 +7,60 @@
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib">
- <s:div styleClass="entry">
- <div class="label">
- <h:outputText value="#{messages['lacewiki.label.tagEdit.Tags']}:"/>
- </div>
- <div class="input">
- <h:inputText id="tagsInput" styleClass="ajaxSupport" tabindex="1" size="55" maxlength="1024" required="false" value="#{home.tagString}">
- <a:support event="onchange" reRender="popularTagsList" oncomplete="onAjaxRequestComplete()"/>
- </h:inputText>
- </div>
- </s:div>
+ <a:region>
+ <s:decorate id="removeTagsDecorate" template="formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['lacewiki.label.tagEdit.RemoveTags']}</ui:define>
- <script type="text/javascript">
- function appendTag(tag) {
- oldValue = jQuery('##{namingContainer}\\:tagsInput').val();
- if (oldValue != null && oldValue.length > 0) {
- jQuery('##{namingContainer}\\:tagsInput').val(
- trimString(oldValue) + (stringEndsWith(trimString(oldValue), ",") ? " " : ", ") + tag
- );
- } else {
- jQuery('##{namingContainer}\\:tagsInput').val(tag);
- }
- refreshPopularTagsList();
- }
- </script>
- <a:jsFunction name="refreshPopularTagsList"
- reRender="popularTagsList"/>
+ <s:fragment rendered="#{empty tagEditor.tags}">
+ <h:outputText value="#{messages['lacewiki.label.tagEdit.NoTags']}"/>
+ </s:fragment>
+ <ui:repeat var="tag" value="#{tagEditor.tagsAsList}">
+ <s:span styleClass="undecoratedLink">
+ <a:commandLink tabindex="1" oncomplete="onAjaxRequestComplete()" status="globalStatus"
+ action="#{tagEditor.removeTag(tag)}"
+ reRender="removeTagsDecorate, popularTagsDecorate, newTagDecorate">
+ <h:outputText value="#{tag}"/>
+ </a:commandLink>
+ </s:span>
+ <h:outputText rendered="#{not wiki:isLastItemInList(tagEditor.tagsAsList, tag)}" value=" | "/>
+ </ui:repeat>
- <s:div styleClass="entry" id="popularTagsList">
- <div class="label">
- <h:outputText value="#{messages['lacewiki.label.tagEdit.PopularTags']}:"/>
- </div>
- <div class="input">
- <h:panelGroup>
- <ui:repeat var="tagCount" value="#{home.popularTags}">
- <s:span styleClass="undecoratedLink">
- <s:fragment rendered="#{not home.isTagInTagString(tagCount.tag)}">
- <h:outputLink value="#" styleClass="sessionEventTrigger"
- onclick="appendTag('#{tagCount.tag}')">#{tagCount.tag}</h:outputLink>
- <h:outputText rendered="#{home.popularTags.indexOf(tagCount) < home.popularTags.size()-1}"
- value=" | "/>
- </s:fragment>
- </s:span>
- </ui:repeat>
- </h:panelGroup>
-  
- </div>
- </s:div>
+ </s:decorate>
+ <s:decorate id="popularTagsDecorate" template="formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['lacewiki.label.tagEdit.AddPopularTags']}</ui:define>
+
+ <s:fragment rendered="#{empty tagEditor.popularTags}">
+ <h:outputText value="#{messages['lacewiki.label.tagEdit.NoPopularTags']}"/>
+ </s:fragment>
+ <ui:repeat var="tagCount" value="#{tagEditor.popularTags}">
+ <s:span styleClass="undecoratedLink">
+ <a:commandLink tabindex="1" oncomplete="onAjaxRequestComplete()" status="globalStatus"
+ action="#{tagEditor.addTag(tagCount.tag)}"
+ reRender="removeTagsDecorate, popularTagsDecorate, newTagDecorate">
+ <h:outputText value="#{tagCount.tag}"/>
+ </a:commandLink>
+ </s:span>
+ <h:outputText rendered="#{not wiki:isLastItemInList(tagEditor.popularTags, tagCount)}" value=" | "/>
+ </ui:repeat>
+ </s:decorate>
+
+ <s:decorate id="newTagDecorate" template="formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['lacewiki.label.tagEdit.NewTag']}</ui:define>
+ <h:panelGroup>
+ <h:inputText id="newTag" styleClass="ajaxSupport" tabindex="1" size="25" maxlength="255" required="false"
+ value="#{tagEditor.newTag}"/>
+ <a:commandLink tabindex="1" styleClass="buttonNonpersistent" oncomplete="onAjaxRequestComplete()"
+ status="globalStatus"
+ action="#{tagEditor.addNewTag}"
+ reRender="removeTagsDecorate, popularTagsDecorate, newTagDecorate">
+ <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.tagEdit.Add']}"/>
+ </a:commandLink>
+
+ </h:panelGroup>
+ </s:decorate>
+ </a:region>
+
</s:fragment>
Modified: trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiTextEditor.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/wikiTextEditor.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -23,21 +23,20 @@
function noopCallback() {}
</script>
-<s:div styleClass="entry" id="#{textEditorId}TextEditor" style="margin-bottom:10px;">
+<s:div styleClass="entry" id="#{textEditorId}TextEditor">
<script type="text/javascript">
- if(!jQuery.browser.safari && !jQuery.browser.msie){
-
- /* Assign resize handle to text area */
+ if(jQuery.browser.mozilla){
jQuery(function() {
- jQuery("##{namingContainer}\\:#{textEditorId}TextEditDiv").Resizable({
+ jQuery("##{namingContainer}\\:#{textEditorId}TextAreaDiv").Resizable({
minHeight: 50,
+ minWidth: 250,
handlers: {
- s: '##{namingContainer}\\:#{textEditorId}TextEditResizeHandle'
+ se: '##{namingContainer}\\:#{textEditorId}TextEditResizeHandle'
},
onResize: function(size) {
- jQuery("##{namingContainer}\\:#{textEditorId}TextArea").attr("rows", Math.floor(size.height/15));
- jQuery("##{namingContainer}\\:#{textEditorId}TextArea").css({ height: size.height + "px" });
+ jQuery("##{namingContainer}\\:#{textEditorId}TextArea").css({ height: size.height-15 + "px" });
+ jQuery("##{namingContainer}\\:#{textEditorId}TextArea").css({ width: size.width-10 + "px" });
},
onStop: function() {
storeTextAreaRows('#{textEditorId}', jQuery("##{namingContainer}\\:#{textEditorId}TextArea").attr('rows'));
@@ -88,53 +87,53 @@
<s:validateAll>
- <s:div id="#{textEditorId}TextEditDiv" styleClass="textEditResizable">
+ <h:panelGrid columns="1" cellpadding="0" cellspacing="0" border="0">
- <h:panelGrid columns="1" cellpadding="0" cellspacing="0" border="0">
+ <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
+ <s:fragment>
+ <select id="#{textEditorId}Formatter"
+ onchange="formatText(
+ jQuery('##{namingContainer}\\:#{textEditorId}TextArea')[0],
+ jQuery('##{textEditorId}Formatter')[0].options[jQuery('##{textEditorId}Formatter')[0].selectedIndex].value
+ );
+ #{textEditorId}RefreshPreview();
+ jQuery('##{textEditorId}Formatter')[0].options[0].selected = true;">
+ <option value="">#{messages['lacewiki.msg.wikiTextEditor.FormatSelection']}</option>
+ <option value="">#{messages['lacewiki.msg.wikiTextEditor.FormatInline']}</option>
+ <option value="|{i}|">#{messages['lacewiki.msg.wikiTextEditor.FormatMonospace']}</option>
+ <option value="*{i}*">#{messages['lacewiki.msg.wikiTextEditor.FormatEmphasis']}</option>
+ <option value="_{i}_">#{messages['lacewiki.msg.wikiTextEditor.FormatUnderline']}</option>
+ <option value="~{i}~">#{messages['lacewiki.msg.wikiTextEditor.FormatStrikeout']}</option>
+ <option value="^{i}^">#{messages['lacewiki.msg.wikiTextEditor.FormatSuperscript']}</option>
+ <option value=""{i}"">#{messages['lacewiki.msg.wikiTextEditor.FormatQuote']}</option>
+ <option value="[My Link=>{i}]">#{messages['lacewiki.msg.wikiTextEditor.FormatLink']}</option>
+ <option value="">#{messages['lacewiki.msg.wikiTextEditor.FormatBlock']}</option>
+ <option value="`{b}`">#{messages['lacewiki.msg.wikiTextEditor.FormatCodeBlock']}</option>
+ <option value=""{b}"">#{messages['lacewiki.msg.wikiTextEditor.FormatQuoteBlock']}</option>
+ <option value="= {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatUnorderedList']}</option>
+ <option value="# {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatOrderedList']}</option>
+ <option value="+ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline1']}</option>
+ <option value="++ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline2']}</option>
+ <option value="+++ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline3']}</option>
+ <option value="++++ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline4']}</option>
+ </select>
- <s:fragment>
- <select id="#{textEditorId}Formatter"
- onchange="formatText(
- jQuery('##{namingContainer}\\:#{textEditorId}TextArea')[0],
- jQuery('##{textEditorId}Formatter')[0].options[jQuery('##{textEditorId}Formatter')[0].selectedIndex].value
- );
- #{textEditorId}RefreshPreview();
- jQuery('##{textEditorId}Formatter')[0].options[0].selected = true;">
- <option value="">#{messages['lacewiki.msg.wikiTextEditor.FormatSelection']}</option>
- <option value="">#{messages['lacewiki.msg.wikiTextEditor.FormatInline']}</option>
- <option value="|{i}|">#{messages['lacewiki.msg.wikiTextEditor.FormatMonospace']}</option>
- <option value="*{i}*">#{messages['lacewiki.msg.wikiTextEditor.FormatEmphasis']}</option>
- <option value="_{i}_">#{messages['lacewiki.msg.wikiTextEditor.FormatUnderline']}</option>
- <option value="~{i}~">#{messages['lacewiki.msg.wikiTextEditor.FormatStrikeout']}</option>
- <option value="^{i}^">#{messages['lacewiki.msg.wikiTextEditor.FormatSuperscript']}</option>
- <option value=""{i}"">#{messages['lacewiki.msg.wikiTextEditor.FormatQuote']}</option>
- <option value="[My Link=>{i}]">#{messages['lacewiki.msg.wikiTextEditor.FormatLink']}</option>
- <option value="">#{messages['lacewiki.msg.wikiTextEditor.FormatBlock']}</option>
- <option value="`{b}`">#{messages['lacewiki.msg.wikiTextEditor.FormatCodeBlock']}</option>
- <option value=""{b}"">#{messages['lacewiki.msg.wikiTextEditor.FormatQuoteBlock']}</option>
- <option value="= {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatUnorderedList']}</option>
- <option value="# {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatOrderedList']}</option>
- <option value="+ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline1']}</option>
- <option value="++ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline2']}</option>
- <option value="+++ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline3']}</option>
- <option value="++++ {b}">#{messages['lacewiki.msg.wikiTextEditor.FormatHeadline4']}</option>
- </select>
+ <a:jsFunction name="#{textEditorId}RefreshPreview" status="globalStatus"
+ reRender="#{textEditorId}MessageLabel, #{textPreviewId}"/>
+ </s:fragment>
- <a:jsFunction name="#{textEditorId}RefreshPreview" status="#{statusId}"
- reRender="#{textEditorId}MessageLabel, #{textPreviewId}"/>
- </s:fragment>
+ <ui:decorate template="helpPopupButton.xhtml">
+ <ui:param name="label" value="#{messages['lacewiki.button.help.Help']}"/>
+ <ui:param name="width" value="450"/>
+ <ui:param name="height" value="350"/>
+ <ui:param name="offsetId" value="#{namingContainer}\\\\:#{textEditorId}TextAreaDiv"/>
+ <ui:param name="helpDocument" value="Wiki Text Markup"/>
+ </ui:decorate>
- <ui:decorate template="helpPopupButton.xhtml">
- <ui:param name="label" value="#{messages['lacewiki.button.help.Help']}"/>
- <ui:param name="width" value="450"/>
- <ui:param name="height" value="350"/>
- <ui:param name="offsetId" value="#{namingContainer}\\\\:#{textEditorId}TextEditDiv"/>
- <ui:param name="helpDocument" value="Wiki Text Markup"/>
- </ui:decorate>
+ </h:panelGrid>
- </h:panelGrid>
+ <s:div id="#{textEditorId}TextAreaDiv" styleClass="textEditResizable">
<h:inputTextarea id="#{textEditorId}TextArea"
styleClass="ajaxSupport"
@@ -148,7 +147,7 @@
<a:support event="onkeyup"
action="#{wikiTextEditor.validate(textEditorId, valueBinding)}"
reRender="#{textEditorId}MessageLabel, #{textPreviewId}"
- status="#{statusId}"
+ status="globalStatus"
ignoreDupResponses="true"
requestDelay="3000"
ajaxSingle="true"
@@ -157,10 +156,10 @@
rendered="#{not empty textPreviewId}"/>
</h:inputTextarea>
- </h:panelGrid>
+ <s:div id="#{textEditorId}TextEditResizeHandle" styleClass="textEditResizeHandle" style="display:none;float:right;"/>
+ </s:div>
- <s:div id="#{textEditorId}TextEditResizeHandle" styleClass="textEditResizeHandle" style="display:none;"/>
- </s:div>
+ </h:panelGrid>
</s:validateAll>
Modified: trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -19,17 +19,17 @@
<h:panelGrid columns="1">
<h:panelGroup>
<a:region>
- <a:commandLink status="uploadEditFormStatus" id="zoomOut" tabindex="2" action="#{editor.zoomPreviewOut}"
+ <a:commandLink status="globalStatus" id="zoomOut" tabindex="2" action="#{editor.zoomPreviewOut}"
reRender="imagePreview, messageBoxContainer" oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
<h:graphicImage value="#{themePath}/img/minus.gif" width="18" height="18"/>
</a:commandLink>
- <a:commandLink status="uploadEditFormStatus" id="actualSize" tabindex="2" action="#{editor.zoomActualSize}"
+ <a:commandLink status="globalStatus" id="actualSize" tabindex="2" action="#{editor.zoomActualSize}"
reRender="imagePreview, messageBoxContainer" oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
<h:graphicImage value="#{themePath}/img/equals.gif" width="18" height="18"/>
</a:commandLink>
- <a:commandLink status="uploadEditFormStatus" id="zoomIn" tabindex="2" action="#{editor.zoomPreviewIn}"
+ <a:commandLink status="globalStatus" id="zoomIn" tabindex="2" action="#{editor.zoomPreviewIn}"
reRender="imagePreview, messageBoxContainer" oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
<h:graphicImage value="#{themePath}/img/plus.gif" width="18" height="18"/>
@@ -54,7 +54,7 @@
<f:selectItem itemLabel="#{messages['lacewiki.label.uploadEdit.LargeThumbnail']}" itemValue="L"/>
<f:selectItem itemLabel="#{messages['lacewiki.label.uploadEdit.FullSize']}" itemValue="F"/>
<f:selectItem itemLabel="#{messages['lacewiki.label.uploadEdit.AsAttachment']}" itemValue="A"/>
- <a:support event="onchange" status="uploadEditFormStatus" action="#{editor.selectThumbnail}"
+ <a:support event="onchange" status="globalStatus" action="#{editor.selectThumbnail}"
reRender="imagePreview, messageBoxContainer" oncomplete="onAjaxRequestComplete()"/>
</h:selectOneMenu>
</div>
Modified: trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -58,14 +58,13 @@
<s:div rendered="#{preferences.get('Wiki').showTags and not blogEntry.entryDocument.macroPresent('hideTags') and not empty blogEntry.entryDocument.tags}"
styleClass="documentTags undecoratedLink">
<s:div>
- <h:outputText rendered="#{blogEntry.tagsAsList.size()==1}" value="#{messages['blogDirectory.label.Tag']}: "/>
- <h:outputText rendered="#{blogEntry.tagsAsList.size()>1}" value="#{messages['blogDirectory.label.Tags']}: "/>
+ <h:outputText rendered="#{blogEntry.tags.size()==1}" value="#{messages['blogDirectory.label.Tag']}: "/>
+ <h:outputText rendered="#{blogEntry.tags.size()>1}" value="#{messages['blogDirectory.label.Tags']}: "/>
<ui:repeat var="tag" value="#{blogEntry.tagsAsList}">
- <s:link view="/tagDisplay_#{skin}.xhtml" value="#{tag}" propagation="none">
- <f:param value="#{tag}" name="tag"/>
- </s:link>
- <h:outputText rendered="#{blogEntry.tagsAsList.indexOf(tag) < blogEntry.tagsAsList.size()-1}"
- value=" | "/>
+ <h:outputLink value="#{wiki:renderTagURL(tag)}">
+ <h:outputText value="#{tag}"/>
+ </h:outputLink>
+ <h:outputText rendered="#{not wiki:isLastItemInList(blogEntry.tagsAsList, tag)}" value=" | "/>
</ui:repeat>
</s:div>
</s:div>
Modified: trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -56,7 +56,7 @@
<h:column>
<h:outputLink styleClass="blogRecentEntriesItemLink" target="_top" value="#{wiki:renderURL(be.entryDocument)}">
<h:outputText styleClass="blogRecentEntriesItemLinkText"
- value="#{wiki:truncateString(be.entryDocument.name, preferences.get('Blog').recentEntriesTruncateTitle, '...')}"/>
+ value="#{wiki:truncateString(be.entryDocument.name, preferences.get('Blog', currentMacro).recentEntriesTruncateTitle, '...')}"/>
</h:outputLink>
</h:column>
</h:dataTable>
Modified: trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -13,7 +13,7 @@
<s:div styleClass="faqBrowserPanel">
- <h:panelGrid columns="5"
+ <h:panelGrid columns="4"
columnClasses="categoryLabel, categoryMenu, questionsControl, categoryLink, status"
cellpadding="0" cellspacing="0" border="0">
@@ -29,7 +29,7 @@
<s:selectItems value="#{faqBrowser.tree.wrappedChildren}"
var="faqsDir"
label="#{wiki:repeatString(' · ',faqsDir.level-1)}#{wiki:truncateString(faqsDir.wrappedNode.name, 40, '...')}"/>
- <a:support event="onchange" status="faqsSelectorFormStatus"
+ <a:support event="onchange" status="globalStatus"
action="#{faqBrowser.showQuestions}"
reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"/>
</h:selectOneMenu>
@@ -40,13 +40,13 @@
<s:span id="faqQuestionsControl">
<a:commandLink action="#{faqBrowser.showQuestions}" tabindex="1"
reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"
- status="faqsSelectorFormStatus"
+ status="globalStatus"
rendered="#{not faqBrowser.directorySelected and not empty faqBrowser.tree and faqBrowser.tree.wrappedChildren.size() > 0}">
<h:graphicImage value="#{themePath}/img/down.gif" width="18" height="18"/>
</a:commandLink>
<a:commandLink action="#{faqBrowser.hideQuestions}" tabindex="1"
reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"
- status="faqsSelectorFormStatus"
+ status="globalStatus"
rendered="#{faqBrowser.directorySelected and not empty faqBrowser.tree and faqBrowser.tree.wrappedChildren.size() > 0}">
<h:graphicImage value="#{themePath}/img/up.gif" width="18" height="18"/>
</a:commandLink>
@@ -60,12 +60,6 @@
</s:fragment>
</s:span>
- <s:span>
- <ui:include src="../../includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="faqsSelectorFormStatus"/>
- </ui:include>
- </s:span>
-
</h:panelGrid>
</s:div>
@@ -80,7 +74,7 @@
<s:fragment rendered="#{s:hasPermission('Node', 'create', faqBrowser.selectedDir.wrappedNode)}">
<a:commandLink action="#{faqQuestionHome.newQuestion()}"
reRender="faqBrowserPluginContainer, messageBoxContainer"
- status="faqsSelectorFormStatus"
+ status="globalStatus"
accesskey="#{messages['faqBrowser.button.NewQuestion.accesskey']}"
tabindex="1" styleClass="buttonNonpersistent">
<h:outputText styleClass="buttonLabel" escape="false" value="#{messages['faqBrowser.button.NewQuestion']}"/>
Modified: trunk/examples/wiki/view/plugins/faqBrowser/faqQuestionForm.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/faqBrowser/faqQuestionForm.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/faqBrowser/faqQuestionForm.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -16,10 +16,6 @@
<h:form id="faqQuestionForm">
<div class="form">
- <ui:include src="../../includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="faqQuestionFormStatus"/>
- </ui:include>
-
<div class="formHead">
<h:outputText value="#{messages['faqBrowser.label.NewFaqQuestion']}: #{faqQuestionHome.parentNode.name}"/>
</div>
@@ -35,7 +31,6 @@
<ui:param name="textEditorId" value="faqQuestion"/>
<ui:param name="textPreviewId" value="faqQuestionPreview"/>
<ui:param name="namingContainer" value="faqBrowserPlugin\\\\:faqQuestionForm"/>
- <ui:param name="statusId" value="faqQuestionFormStatus"/>
<ui:param name="label" value="#{messages['faqBrowser.label.QuestionText']}"/>
<ui:param name="valueBinding" value="#{faqQuestionHome.formContent}"/>
<ui:param name="valueMaxLength" value="32768"/>
@@ -64,7 +59,7 @@
<a:commandLink id="save" action="#{faqQuestionHome.persist}"
eventsQueue="ajaxEventQueue"
reRender="faqBrowserPluginContainer, messageBoxContainer"
- status="faqQuestionFormStatus"
+ status="globalStatus"
tabindex="1"
styleClass="button saveButton sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['faqBrowser.button.SaveNoKey']}"/>
@@ -73,7 +68,7 @@
<a:commandLink action="#{faqQuestionHome.cancel}"
reRender="faqBrowserPluginContainer, messageBoxContainer"
immediate="true"
- status="faqQuestionFormStatus"
+ status="globalStatus"
eventsQueue="ajaxEventQueue"
tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['faqBrowser.button.CancelNoKey']}"/>
Modified: trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -58,9 +58,10 @@
<s:span styleClass="undecoratedLink"
rendered="#{not preferences.get('FeedAggregator', currentMacro).hideFeedInfo}">
- (<h:outputLink value="#{feDTO.feed.link}">
+ <h:outputText value=" #{messages['feedAggregator.label.On']} "/>
+ <h:outputLink value="#{feDTO.feed.link}">
<h:outputText value="#{feDTO.feed.title}"/>
- </h:outputLink>)
+ </h:outputLink>
</s:span>
</s:div>
Modified: trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -16,10 +16,6 @@
<div class="form">
- <ui:include src="../../includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="forumFormStatus"/>
- </ui:include>
-
<div class="formHead">
<h:outputText value="#{forumHome.managed ? messages['forum.label.EditForum'] : messages['forum.label.NewForum']}"/>
</div>
@@ -29,14 +25,14 @@
<s:decorate id="nameDecorate" template="../../includes/formFieldDecorate.xhtml">
<ui:define name="label">#{messages['forum.label.ForumName']}</ui:define>
<h:inputText styleClass="ajaxSupport" size="40" maxlength="255" required="true" tabindex="1" value="#{forumHome.instance.name}">
- <a:support event="onchange" status="forumFormStatus" reRender="nameDecorate"/>
+ <a:support event="onchange" status="globalStatus" reRender="nameDecorate"/>
</h:inputText>
</s:decorate>
<s:decorate id="descriptionDecorate" template="../../includes/formFieldDecorate.xhtml">
<ui:define name="label">#{messages['forum.label.ForumDescription']}</ui:define>
<h:inputText styleClass="ajaxSupport" size="70" maxlength="512" required="false" tabindex="1" value="#{forumHome.instance.description}">
- <a:support event="onchange" status="forumFormStatus" reRender="descriptionDecorate"/>
+ <a:support event="onchange" status="globalStatus" reRender="descriptionDecorate"/>
</h:inputText>
</s:decorate>
@@ -51,7 +47,7 @@
<h:outputText value="#{messages['forum.label.EnableFeed']}"/>
<a:commandLink id="resetFeed" reRender="messageBoxContainer"
action="#{forumHome.resetFeed}"
- status="forumFormStatus"
+ status="globalStatus"
rendered="#{!empty forumHome.instance.feed}"
styleClass="buttonNonpersistent sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['forum.button.ResetFeed']}"/>
@@ -68,7 +64,7 @@
<a:commandLink action="#{forumHome.update}" rendered="#{forumHome.managed}"
reRender="forumListPluginContainer, messageBoxContainer"
- status="forumFormStatus"
+ status="globalStatus"
tabindex="1" accesskey="#{messages['forum.button.Update.accesskey']}"
styleClass="button saveButton sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['forum.button.Update']}"/>
@@ -78,11 +74,11 @@
<s:fragment rendered="#{forumHome.removable}">
<a:jsFunction name="deleteForum"
reRender="forumListPluginContainer, messageBoxContainer"
- status="forumFormStatus"
+ status="globalStatus"
action="#{forumHome.remove}"/>
- <h:outputLink value="#" tabindex="1"
+ <h:outputLink tabindex="1"
accesskey="#{messages['forum.button.Remove.accesskey']}"
- onclick="deleteConfirmation('\\'#{forumHome.instance.name}\\'', 'deleteForum')"
+ value="javascript:deleteConfirmation('\\'#{forumHome.instance.name}\\'','deleteForum')"
styleClass="button saveButton sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['forum.button.Remove']}"/>
</h:outputLink>
@@ -90,7 +86,7 @@
<a:commandLink action="#{forumHome.persist}" rendered="#{!forumHome.managed}"
reRender="forumListPluginContainer, messageBoxContainer"
- status="forumFormStatus"
+ status="globalStatus"
tabindex="1" accesskey="#{messages['forum.button.Save.accesskey']}"
styleClass="button saveButton sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['forum.button.Save']}"/>
@@ -99,7 +95,7 @@
<a:region>
<a:commandLink action="#{forumHome.cancel}"
immediate="true"
- status="forumFormStatus"
+ status="globalStatus"
reRender="forumListPluginContainer, messageBoxContainer"
tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger"
accesskey="#{messages['forum.button.Cancel.accesskey']}">
Modified: trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -26,6 +26,19 @@
enablePlugins="false"/>
</s:div>
+ <s:div rendered="#{not empty currentDocument.tags}"
+ styleClass="documentTags undecoratedLink smallFont">
+ <s:div>
+ #{messages['lacewiki.label.docDisplay.Tags']}: 
+ <ui:repeat var="tag" value="#{currentDocument.tagsAsList}">
+ <h:outputLink value="#{wiki:renderTagURL(tag)}">
+ <h:outputText value="#{tag}"/>
+ </h:outputLink>
+ <h:outputText rendered="#{not wiki:isLastItemInList(currentDocument.tagsAsList, tag)}" value=" | "/>
+ </ui:repeat>
+ </s:div>
+ </s:div>
+
<s:div id="forumPostingControls" styleClass="forumPostingControls">
<h:panelGroup rendered="#{not replyHome.showForm and replyHome.isPersistAllowed(null,null)}">
@@ -60,8 +73,8 @@
<ui:param name="titlePlural" value="#{messages['forum.label.Replies']}"/>
<ui:define name="controls">
- <h:panelGrid columns="3" styleClass="forumReplyControls"
- columnClasses="forumReplyRating, forumReplyStatus, forumReplyControl"
+ <h:panelGrid columns="2" styleClass="forumReplyControls"
+ columnClasses="forumReplyRating, forumReplyControl"
cellpadding="0" cellspacing="0" border="0">
<s:fragment>
@@ -79,7 +92,7 @@
<c:forEach begin="1" var="r" end="5">
<a:commandLink action="#{replyHome.rate(c.id, r)}"
reRender="comments, messageBoxContainer"
- status="commentStatus#{c.id}">
+ status="globalStatus">
<h:graphicImage styleClass="item#{c.id}-rate#{r}"
onmouseover="highlightStars('#{c.id}', '5', '#{r}')"
onmouseout="highlightStars('#{c.id}', '5', '0')"
@@ -106,13 +119,7 @@
</s:fragment>
<s:fragment>
- <ui:include src="../../includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="commentStatus#{c.id}"/>
- </ui:include>
- </s:fragment>
- <s:fragment>
-
<s:fragment rendered="#{not replyHome.showForm and replyHome.isPersistAllowed(null,null)}">
<s:link tabindex="102" propagation="none"
@@ -134,10 +141,10 @@
<s:fragment rendered="#{s:hasPermission('Comment', 'delete', currentDocument) and not replyHome.showForm}">
<a:jsFunction name="deleteReplyId#{c.id}"
reRender="forumRepliesContainer"
+ status="globalStatus"
action="#{replyHome.remove(c.id)}"/>
- <h:outputLink value="#"
- onclick="deleteConfirmation('#{messages['lacewiki.label.commentsDisplay.CommentThread']} \\'#{c.subject}\\'', 'deleteReplyId#{c.id}')"
- styleClass="button sessionEventTrigger">
+ <h:outputLink value="javascript:deleteConfirmation('#{messages['lacewiki.label.commentsDisplay.CommentThread']} \\'#{c.subject}\\'','deleteReplyId#{c.id}')"
+ styleClass="button sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.commentsDisplay.RemoveComment']}"/>
</h:outputLink>
</s:fragment>
Modified: trunk/examples/wiki/view/plugins/forumReplies/replyForm.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumReplies/replyForm.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/forumReplies/replyForm.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -31,10 +31,6 @@
<h:form id="replyForm">
<div class="form">
- <ui:include src="../../includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="replyFormStatus"/>
- </ui:include>
-
<div class="formHead bottomBorder">
<h:outputText value="#{messages['forum.label.NewReply']}"/>
</div>
@@ -49,7 +45,7 @@
<ui:define name="label">#{messages['forum.label.replyForm.Name']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="100" required="true"
id="userName" value="#{replyHome.instance.fromUserName}">
- <a:support status="replyFormStatus" event="onchange" reRender="userNameDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="userNameDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
</a:region>
@@ -73,7 +69,7 @@
<ui:define name="label">#{messages['forum.label.replyForm.Subject']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="255" required="true"
id="subject" value="#{replyHome.instance.subject}">
- <a:support status="replyFormStatus" event="onchange" reRender="subjectDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="subjectDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -82,7 +78,6 @@
<ui:param name="textEditorId" value="reply"/>
<ui:param name="textPreviewId" value="replyPreview"/>
<ui:param name="namingContainer" value="forumRepliesPlugin\\\\:replyForm"/>
- <ui:param name="statusId" value="replyFormStatus"/>
<ui:param name="label" value="#{messages['forum.label.replyForm.Message']}"/>
<ui:param name="valueBinding" value="#{replyHome.instance.content}"/>
<ui:param name="valueMaxLength" value="32768"/>
@@ -101,7 +96,6 @@
</a:region>
<s:decorate id="verifyCaptchaEntry" template="../../includes/captchaEntry.xhtml">
- <ui:param name="statusId" value="replyFormStatus"/>
<ui:param name="rendered" value="#{!identity.loggedIn}"/>
</s:decorate>
@@ -116,7 +110,7 @@
<a:commandLink id="post"
action="#{replyHome.persist}" tabindex="1"
reRender="documentDisplay"
- status="replyFormStatus"
+ status="globalStatus"
eventsQueue="ajaxEventQueue"
oncomplete="onAjaxRequestComplete()"
styleClass="button sessionEventTrigger">
@@ -126,7 +120,7 @@
<a:commandLink action="#{replyHome.cancel}" tabindex="1"
reRender="documentDisplay"
immediate="true"
- status="replyFormStatus"
+ status="globalStatus"
eventsQueue="ajaxEventQueue"
oncomplete="onAjaxRequestComplete()"
styleClass="buttonNonpersistent sessionEventTrigger">
Modified: trunk/examples/wiki/view/plugins/forumTopics/topicForm.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumTopics/topicForm.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/forumTopics/topicForm.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -15,10 +15,6 @@
<h:form id="topicForm">
<div class="form">
- <ui:include src="../../includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="topicFormStatus"/>
- </ui:include>
-
<div class="formHead">
<h:outputText value="#{messages['forum.label.NewTopic']}"/>
</div>
@@ -36,7 +32,6 @@
<ui:param name="textEditorId" value="topic"/>
<ui:param name="textPreviewId" value="topicPreview"/>
<ui:param name="namingContainer" value="forumTopicsPlugin\\\\:topicForm"/>
- <ui:param name="statusId" value="topicFormStatus"/>
<ui:param name="label" value="#{messages['forum.label.Message']}"/>
<ui:param name="valueBinding" value="#{topicHome.formContent}"/>
<ui:param name="valueMaxLength" value="32768"/>
@@ -84,8 +79,11 @@
</div>
</s:div>
+ <ui:include src="../../includes/tagEditor.xhtml">
+ <ui:param name="editor" value="#{topicHome.tagEditor}"/>
+ </ui:include>
+
<s:decorate id="verifyCaptchaEntry" template="../../includes/captchaEntry.xhtml">
- <ui:param name="statusId" value="topicFormStatus"/>
<ui:param name="rendered" value="#{!identity.loggedIn}"/>
</s:decorate>
@@ -99,7 +97,7 @@
<a:commandLink id="save" action="#{topicHome.persist}"
eventsQueue="ajaxEventQueue"
reRender="forumTopicsPluginContainer, messageBoxContainer"
- status="topicFormStatus"
+ status="globalStatus"
tabindex="1"
styleClass="button saveButton sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['forum.button.SaveNoKey']}"/>
@@ -108,7 +106,7 @@
<a:commandLink action="#{topicHome.cancel}"
reRender="forumTopicsPluginContainer, messageBoxContainer"
immediate="true"
- status="topicFormStatus"
+ status="globalStatus"
eventsQueue="ajaxEventQueue"
tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['forum.button.CancelNoKey']}"/>
Modified: trunk/examples/wiki/view/plugins/tags/plugin.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/tags/plugin.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/plugins/tags/plugin.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -23,16 +23,16 @@
<h:outputLink value="#{wiki:renderURL(currentDocument)}/Tag/#{wiki:encodeURL(tagCount.tag)}">#{tagCount.tag}</h:outputLink>
</s:span>
<s:span rendered="#{param.tag != tagCount.tag and not preferences.get('Tags', currentMacro).linkToCurrentDocument}" styleClass="undecoratedLink">
- <s:link view="/tagDisplay_#{skin}.xhtml" value="#{tagCount.tag}" propagation="none">
- <f:param value="#{tagCount.tag}" name="tag"/>
- </s:link>
+ <h:outputLink value="#{wiki:renderTagURL(tagCount.tag)}">
+ <h:outputText value="#{tagCount.tag}"/>
+ </h:outputLink>
</s:span>
<s:span rendered="#{param.tag == tagCount.tag}">
<h:outputText value="> #{tagCount.tag} <"/>
</s:span>
</h:column>
<h:column>
- (#{tagCount.count})
+ <h:outputText value="(#{tagCount.count})"/>
</h:column>
</h:dataTable>
Modified: trunk/examples/wiki/view/search_d.xhtml
===================================================================
--- trunk/examples/wiki/view/search_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/search_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -27,10 +27,6 @@
<h:form id="searchForm" styleClass="box">
<s:div styleClass="form" id="searchControl">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="searchFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<a:region>
@@ -54,7 +50,7 @@
var="se"
label="#{se.description}"
noSelectionLabel="#{messages['lacewiki.label.search.All']}"/>
- <a:support status="searchFormStatus" event="onchange" reRender="searchControl, searchPager, searchResult"
+ <a:support status="globalStatus" event="onchange" reRender="searchControl, searchPager, searchResult"
action="#{wikiSearch.search}" oncomplete="onAjaxRequestComplete()"/>
</h:selectOneMenu>
</h:panelGrid>
@@ -77,14 +73,14 @@
<f:selectItem itemLabel="5" itemValue="5"/>
<f:selectItem itemLabel="15" itemValue="15"/>
<f:selectItem itemLabel="50" itemValue="50"/>
- <a:support status="searchFormStatus" event="onchange" reRender="searchControl, searchPager, searchResult"
+ <a:support status="globalStatus" event="onchange" reRender="searchControl, searchPager, searchResult"
action="#{wikiSearch.search}" oncomplete="onAjaxRequestComplete()"/>
</h:selectOneMenu>
</h:panelGrid>
<a:commandLink id="find" styleClass="buttonNonpersistent sessionEventTrigger"
reRender="workspaceSwitcher, searchControl, searchPager, searchResult"
- status="searchFormStatus"
+ status="globalStatus"
action="#{wikiSearch.search()}"
oncomplete="onAjaxRequestComplete()"
tabindex="1" accesskey="#{messages['lacewiki.button.search.Find.accesskey']}">
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-02-14 07:55:02 UTC (rev 7420)
@@ -221,6 +221,15 @@
text-align: right;
}
+#status {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 20px;
+ height: 25px;
+ z-index: 5000;
+}
+
/* Header
----------------------------------------------- */
#header .screenname {
@@ -511,18 +520,6 @@
margin-top: 10px;
}
-.form .statusIndicator {
- float: right;
-}
-
-.form .statusIndicator .statusStart {
- background: transparent;
-}
-
-.form .statusIndicator .statusStop {
- background: transparent;
-}
-
.formListGridColumn {
vertical-align: top;
padding: 10px;
@@ -640,25 +637,17 @@
}
.textEditResizable {
- margin-bottom: 5px;
}
.wideLabels .textEditResizable {}
.textEditResizeHandle {
- width: 25px;
- height: 10px;
- background: #bbb url(../img/icon.resize_s.gif) 0 0 no-repeat;
- cursor: s-resize;
- position: absolute;
- margin-bottom: 10px;
- margin-left: 155px;
+ width: 15px;
+ height: 15px;
+ background: #f5f5f5 url(../img/icon.resize_se.gif) no-repeat;
+ cursor: se-resize;
}
-.wideLabels .textEditResizeHandle {
- margin-left: 240px;
-}
-
.textPreview {
border: 1px dashed #666;
margin-bottom: 10px;
Modified: trunk/examples/wiki/view/themes/default/img/icon.resize_se.gif
===================================================================
(Binary files differ)
Modified: trunk/examples/wiki/view/themes/default/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/themes/default/template.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -5,6 +5,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:j4j="http://javascript4jsf.dev.java.net/"
xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib">
<f:view contentType="text/html"/>
@@ -466,5 +467,20 @@
</s:div>
+<s:div id="status">
+ <a:status id="globalStatus" forceId="true">
+ <f:facet name="start">
+ <s:div styleClass="statusStart">
+ <h:graphicImage value="#{themePath}/img/statusindicator.gif" width="20" height="25"/>
+ </s:div>
+ </f:facet>
+ <f:facet name="stop">
+ <s:div styleClass="statusStop">
+ <h:graphicImage value="#{themePath}/img/blank.gif" width="20" height="25"/>
+ </s:div>
+ </f:facet>
+ </a:status>
+</s:div>
+
</body>
</html>
Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-02-14 07:55:02 UTC (rev 7420)
@@ -240,6 +240,14 @@
text-align: right;
}
+#status {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 20px;
+ height: 25px;
+ z-index: 5000;
+}
/* Header
----------------------------------------------- */
@@ -532,16 +540,6 @@
margin-top: 10px;
}
-.form .statusIndicator {
- float: right;
-}
-
-.form .statusIndicator .statusStart {
-}
-
-.form .statusIndicator .statusStop {
-}
-
.formListGridColumn {
vertical-align: top;
padding: 10px;
@@ -649,23 +647,18 @@
}
.textEditResizable {
- margin-bottom: 5px;
}
.wideLabels .textEditResizable {}
.textEditResizeHandle {
- width: 25px;
- height: 10px;
- background: #bbb url(../img/icon.resize_s.gif) 0 0 no-repeat;
- cursor: s-resize;
- position: absolute;
- margin-bottom: 10px;
- margin-left: 155px;
+ width: 15px;
+ height: 15px;
+ background: #f5f5f5 url(../img/icon.resize_se.gif) no-repeat;
+ cursor: se-resize;
}
.wideLabels .textEditResizeHandle {
- margin-left: 240px;
}
.textPreview {
Modified: trunk/examples/wiki/view/themes/inrelationto/img/icon.resize_se.gif
===================================================================
(Binary files differ)
Modified: trunk/examples/wiki/view/themes/inrelationto/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -4,6 +4,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib">
<f:view contentType="text/html"/>
@@ -459,5 +460,20 @@
</s:div>
+<s:div id="status">
+ <a:status id="globalStatus" forceId="true">
+ <f:facet name="start">
+ <s:div styleClass="statusStart">
+ <h:graphicImage value="#{themePath}/img/statusindicator.gif" width="20" height="25"/>
+ </s:div>
+ </f:facet>
+ <f:facet name="stop">
+ <s:div styleClass="statusStop">
+ <h:graphicImage value="#{themePath}/img/blank.gif" width="20" height="25"/>
+ </s:div>
+ </f:facet>
+ </a:status>
+</s:div>
+
</body>
</html>
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-02-14 07:55:02 UTC (rev 7420)
@@ -214,6 +214,15 @@
padding-right:20px;
}
+#status {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 20px;
+ height: 25px;
+ z-index: 5000;
+}
+
.membersAreaContainer {
margin-top: 10px;
margin-left: 10px;
@@ -808,18 +817,6 @@
margin-top: 10px;
}
-.form .statusIndicator {
- float: right;
-}
-
-.form .statusIndicator .statusStart {
- background: transparent;
-}
-
-.form .statusIndicator .statusStop {
- background: transparent;
-}
-
.formListGridColumn {
vertical-align: top;
padding: 10px;
@@ -932,25 +929,17 @@
}
.textEditResizable {
- margin-bottom: 5px;
}
.wideLabels .textEditResizable {}
.textEditResizeHandle {
- width: 25px;
- height: 10px;
- background: #bbb url(../img/icon.resize_s.gif) 0 0 no-repeat;
- cursor: s-resize;
- position: absolute;
- margin-bottom: 10px;
- margin-left: 155px;
+ width: 15px;
+ height: 15px;
+ background: #f5f5f5 url(../img/icon.resize_se.gif) no-repeat;
+ cursor: se-resize;
}
-.wideLabels .textEditResizeHandle {
- margin-left: 240px;
-}
-
.textPreview {
border: 1px dashed #666;
margin-bottom: 10px;
Modified: trunk/examples/wiki/view/themes/sfwkorg/img/icon.resize_se.gif
===================================================================
(Binary files differ)
Modified: trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -4,6 +4,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib">
<f:view contentType="text/html"/>
@@ -429,11 +430,19 @@
</p>
</div>
- <div style="margin-top: 25px; margin-left: 15px; margin-right: 15px; text-align:center;">
- <h:outputLink value="http://seamframework.org/Community/GetASeamIcon">
- <h:graphicImage value="#{themePath}/img/runningon_seamlogo_beige.gif"
- width="200" height="50"/>
- </h:outputLink>
+ <div style="margin-top: 25px; margin-left: 15px; margin-right: 15px; ">
+ <h2>Built with Seam</h2>
+ <p>
+ You can find the full source code for this website in the
+ <a href="http://www.seamframework.org/Download">Seam package</a> in
+ the directory /examples/wiki. It is licensed under the LGPL.
+ </p>
+ <div style="text-align:center;">
+ <h:outputLink value="http://www.seamframework.org/Community/GetASeamIcon">
+ <h:graphicImage value="#{themePath}/img/runningon_seamlogo_beige.gif"
+ width="200" height="50"/>
+ </h:outputLink>
+ </div>
</div>
</div>
@@ -494,11 +503,26 @@
</div>
<div id="footer" class="undecoratedLink">
- <p> © Copyright 2007, Red Hat Middleware, LLC. All rights reserved. JBoss and Seam are registered trademarks
+ <p> © Copyright 2008, Red Hat Middleware, LLC. All rights reserved. JBoss and Seam are registered trademarks
and servicemarks of <a href="http://www.redhat.com/">Red Hat, Inc</a>.
[<a href="http://www.redhat.com/legal/privacy_statement.html">Privacy Policy</a>]</p>
</div>
+<s:div id="status">
+ <a:status id="globalStatus" forceId="true">
+ <f:facet name="start">
+ <s:div styleClass="statusStart">
+ <h:graphicImage value="#{themePath}/img/statusindicator.gif" width="20" height="25"/>
+ </s:div>
+ </f:facet>
+ <f:facet name="stop">
+ <s:div styleClass="statusStop">
+ <h:graphicImage value="#{themePath}/img/blank.gif" width="20" height="25"/>
+ </s:div>
+ </f:facet>
+ </a:status>
+</s:div>
+
</body>
</html>
Modified: trunk/examples/wiki/view/uploadCreate_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/uploadCreate_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -27,10 +27,6 @@
<h:form id="uploadForm" styleClass="box" enctype="multipart/form-data">
<div class="form">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="uploadFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<div class="formHead">
Modified: trunk/examples/wiki/view/uploadEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/uploadEdit_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/uploadEdit_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -35,10 +35,6 @@
<h:form id="uploadEditForm" styleClass="box" enctype="multipart/form-data">
<div class="form">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="uploadEditFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<div class="formHead">
@@ -71,7 +67,7 @@
<s:decorate id="nameDecorate" template="includes/formFieldDecorate.xhtml">
<ui:define name="label">#{messages['lacewiki.label.uploadEdit.Name']}</ui:define>
<h:inputText styleClass="ajaxSupport" size="50" maxlength="255" required="true" tabindex="1" value="#{uploadHome.instance.name}">
- <a:support status="uploadEditFormStatus" event="onchange" reRender="nameDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="nameDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -120,8 +116,7 @@
</ui:include>
<ui:include src="includes/tagEditor.xhtml">
- <ui:param name="namingContainer" value="uploadEditForm"/>
- <ui:param name="home" value="#{uploadHome}"/>
+ <ui:param name="editor" value="#{uploadHome.tagEditor}"/>
</ui:include>
</div>
@@ -147,10 +142,11 @@
<s:fragment rendered="#{uploadHome.removable}">
<a:jsFunction name="deleteUpload"
+ status="globalStatus"
action="#{uploadHome.remove}"/>
- <h:outputLink value="#" tabindex="1"
+ <h:outputLink tabindex="1"
accesskey="#{messages['lacewiki.button.uploadEdit.Delete.accesskey']}"
- onclick="deleteConfirmation('\\'#{uploadHome.instance.name}\\'', 'deleteUpload')"
+ value="javascript:deleteConfirmation('\\'#{uploadHome.instance.name}\\'','deleteUpload')"
styleClass="button sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['lacewiki.button.uploadEdit.Delete']}"/>
</h:outputLink>
Modified: trunk/examples/wiki/view/userHome_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userHome_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/userHome_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -27,10 +27,6 @@
<h:form id="userHomeForm" styleClass="box" enctype="multipart/form-data">
<div class="form">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="userHomeFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<script type="text/javascript">jQuery(function() {
@@ -70,7 +66,7 @@
<ui:param name="fieldId" value="firstname"/>
<ui:define name="label">#{messages['lacewiki.label.userHome.FirstName']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="63" required="true" value="#{userHome.instance.firstname}">
- <a:support status="userHomeFormStatus" event="onchange" reRender="firstnameDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="firstnameDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
</a:region>
@@ -81,7 +77,7 @@
<ui:param name="fieldId" value="lastname"/>
<ui:define name="label">#{messages['lacewiki.label.userHome.LastName']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="63" required="true" value="#{userHome.instance.lastname}">
- <a:support status="userHomeFormStatus" event="onchange" reRender="lastnameDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="lastnameDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
</a:region>
@@ -93,7 +89,7 @@
<ui:define name="label">#{messages['lacewiki.label.userHome.Email']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="255" required="true" value="#{userHome.instance.email}"
disabled="#{userHome.instance.username == guestUser.username}">
- <a:support status="userHomeFormStatus" event="onchange" reRender="emailDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="emailDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
</a:region>
@@ -106,7 +102,7 @@
<h:inputText styleClass="ajaxSupport" tabindex="1" size="16" maxlength="16" required="true" value="#{userHome.instance.username}"
disabled="#{userHome.instance.username == adminUser.username
or userHome.instance.username == guestUser.username}">
- <a:support status="userHomeFormStatus" event="onchange" action="#{userHome.validateUsername}"
+ <a:support status="globalStatus" event="onchange" action="#{userHome.validateUsername}"
reRender="usernameDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -120,7 +116,7 @@
<h:inputSecret styleClass="ajaxSupport" tabindex="1" size="15" maxlength="15"
redisplay="true" value="#{userHome.password}"
disabled="#{userHome.instance.username == guestUser.username}">
- <a:support status="userHomeFormStatus" event="onchange" action="#{userHome.validatePassword}"
+ <a:support status="globalStatus" event="onchange" action="#{userHome.validatePassword}"
reRender="passwordDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputSecret>
</s:decorate>
@@ -134,7 +130,7 @@
<h:inputSecret styleClass="ajaxSupport" tabindex="1" size="15" maxlength="15"
redisplay="true" value="#{userHome.passwordControl}"
disabled="#{userHome.instance.username == guestUser.username}">
- <a:support status="userHomeFormStatus" event="onchange" action="#{userHome.validatePasswordControl}"
+ <a:support status="globalStatus" event="onchange" action="#{userHome.validatePasswordControl}"
reRender="passwordControlDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputSecret>
</s:decorate>
@@ -222,7 +218,6 @@
<ui:param name="textEditorId" value="bio"/>
<ui:param name="textPreviewId" value="bioPreview"/>
<ui:param name="namingContainer" value="userHomeForm"/>
- <ui:param name="statusId" value="userHomeFormStatus"/>
<ui:param name="label" value="#{messages['lacewiki.label.userHome.Bio']}"/>
<ui:param name="valueBinding" value="#{userHome.instance.profile.bio}"/>
<ui:param name="valueMaxLength" value="1000"/>
@@ -242,7 +237,7 @@
<ui:param name="fieldId" value="website"/>
<ui:define name="label">#{messages['lacewiki.label.userHome.Website']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="55" maxlength="1000" value="#{userHome.instance.profile.website}">
- <a:support status="userHomeFormStatus" event="onchange" reRender="websiteDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="websiteDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -251,7 +246,7 @@
<ui:param name="fieldId" value="location"/>
<ui:define name="label">#{messages['lacewiki.label.userHome.Location']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="55" maxlength="255" value="#{userHome.instance.profile.location}">
- <a:support status="userHomeFormStatus" event="onchange" reRender="locationDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="locationDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -260,7 +255,7 @@
<ui:param name="fieldId" value="occupation"/>
<ui:define name="label">#{messages['lacewiki.label.userHome.Occupation']}</ui:define>
<h:inputText styleClass="ajaxSupport" tabindex="1" size="55" maxlength="1000" value="#{userHome.instance.profile.occupation}">
- <a:support status="userHomeFormStatus" event="onchange" reRender="occupationDecorate" oncomplete="onAjaxRequestComplete()"/>
+ <a:support status="globalStatus" event="onchange" reRender="occupationDecorate" oncomplete="onAjaxRequestComplete()"/>
</h:inputText>
</s:decorate>
@@ -269,7 +264,6 @@
<ui:param name="textEditorId" value="signature"/>
<ui:param name="textPreviewId" value="signaturePreview"/>
<ui:param name="namingContainer" value="userHomeForm"/>
- <ui:param name="statusId" value="userHomeFormStatus"/>
<ui:param name="label" value="#{messages['lacewiki.label.userHome.Signature']}"/>
<ui:param name="valueBinding" value="#{userHome.instance.profile.signature}"/>
<ui:param name="valueMaxLength" value="1000"/>
@@ -293,7 +287,6 @@
<div class="formFields">
<ui:include src="includes/preferencesEditor.xhtml">
<ui:param name="tabId" value="userPrefsTab"/>
- <ui:param name="statusId" value="userHomeFormStatus"/>
<ui:param name="preferenceEntities" value="#{userPreferenceEntities}"/>
</ui:include>
</div>
@@ -325,10 +318,11 @@
<s:fragment rendered="#{s:hasPermission('User', 'delete', userHome.instance)}">
<a:jsFunction name="deleteUser"
+ status="globalStatus"
action="#{userHome.remove}"/>
- <h:outputLink value="#" tabindex="1"
+ <h:outputLink tabindex="1"
accesskey="#{messages['lacewiki.button.userHome.Delete.accesskey']}"
- onclick="deleteConfirmation('\\'#{userHome.instance.username}\\'', 'deleteUser')"
+ value="javascript:deleteConfirmation('\\'#{userHome.instance.username}\\'','deleteUser')"
styleClass="button sessionEventTrigger">
<h:outputText escape="false" styleClass="buttonLabel" value="#{messages['lacewiki.button.userHome.Delete']}"/>
</h:outputLink>
Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/userList_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -33,10 +33,6 @@
<h:form id="userSearchForm" styleClass="box">
<div class="form" id="userSearchControl">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="userSearchFormStatus"/>
- </ui:include>
-
<h:panelGrid columns="6"
styleClass="datatable topLeftBottomBorder smallFont"
headerClass="regularHeader rightBorder"
Modified: trunk/examples/wiki/view/userRegister_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userRegister_d.xhtml 2008-02-13 14:46:43 UTC (rev 7419)
+++ trunk/examples/wiki/view/userRegister_d.xhtml 2008-02-14 07:55:02 UTC (rev 7420)
@@ -25,10 +25,6 @@
<h:form id="userRegisterForm" styleClass="box">
<div class="form">
- <ui:include src="includes/statusIndicator.xhtml">
- <ui:param name="statusId" value="userRegisterFormStatus"/>
- </ui:include>
-
<script type="text/javascript">startSessionTimeoutCheck()</script>
<div class="formHead">
@@ -73,7 +69,6 @@
</s:decorate>
<s:decorate id="verifyCaptchaEntry" template="includes/captchaEntry.xhtml">
- <ui:param name="statusId" value="userRegisterFormStatus"/>
<ui:param name="rendered" value="#{not s:hasPermission('User', 'isAdmin', currentUser)}"/>
</s:decorate>
16 years, 10 months
Seam SVN: r7419 - in trunk/src/main/org/jboss/seam: security and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-13 09:46:43 -0500 (Wed, 13 Feb 2008)
New Revision: 7419
Added:
trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java
Modified:
trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java
Log:
support for annotated permission checks in security interceptor
Added: trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java 2008-02-13 14:46:43 UTC (rev 7419)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Meta-annotation that designates an annotation as being a permission action,
+ * requiring a security check prior to invoking the annotated method or class
+ *
+ * @author Shane Bryzak
+ */
+@Target({TYPE})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface PermissionAction
+{
+ String value() default "";
+}
Modified: trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java 2008-02-13 04:21:03 UTC (rev 7418)
+++ trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java 2008-02-13 14:46:43 UTC (rev 7419)
@@ -1,10 +1,14 @@
package org.jboss.seam.security;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
import org.jboss.seam.annotations.intercept.AroundInvoke;
import org.jboss.seam.annotations.intercept.Interceptor;
import org.jboss.seam.annotations.intercept.InterceptorType;
+import org.jboss.seam.annotations.security.PermissionAction;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.async.AsynchronousInterceptor;
import org.jboss.seam.intercept.AbstractInterceptor;
@@ -16,44 +20,137 @@
*
* @author Shane Bryzak
*/
-@Interceptor(stateless = true, type=InterceptorType.CLIENT,
+(a)Interceptor(type=InterceptorType.CLIENT,
around=AsynchronousInterceptor.class)
public class SecurityInterceptor extends AbstractInterceptor
{
private static final long serialVersionUID = -6567750187000766925L;
+
+ private Map<Method,Restriction> restrictions = new HashMap<Method,Restriction>();
+
+ private class Restriction
+ {
+ private String expression;
+
+ private Object target;
+ private String action;
+
+ public void setExpression(String expression)
+ {
+ this.expression = expression;
+ }
+
+ public void setTarget(Object target)
+ {
+ this.target = target;
+ }
+
+ public void setAction(String action)
+ {
+ this.action = action;
+ }
+
+ public void check()
+ {
+ if (Identity.isSecurityEnabled())
+ {
+ if (expression != null)
+ {
+ Identity.instance().checkRestriction(expression);
+ }
+ else if (target != null && action != null)
+ {
+ // TODO implement the security check
+ }
+ }
+ }
+ }
@AroundInvoke
public Object aroundInvoke(InvocationContext invocation) throws Exception
{
Method interfaceMethod = invocation.getMethod();
- //TODO: optimize this:
- Method method = getComponent().getBeanClass()
- .getMethod( interfaceMethod.getName(), interfaceMethod.getParameterTypes() );
- Restrict restrict = getRestriction(method);
- if ( restrict!=null && Identity.isSecurityEnabled() )
- {
- String expr = !Strings.isEmpty( restrict.value() ) ?
- restrict.value() : createDefaultExpr(method);
- Identity.instance().checkRestriction(expr);
- }
+ Restriction restriction = getRestriction(interfaceMethod);
+
+ if ( restriction != null ) restriction.check();
+
return invocation.proceed();
}
- private Restrict getRestriction(Method method)
+ private Restriction getRestriction(Method interfaceMethod) throws Exception
{
- if ( method.isAnnotationPresent(Restrict.class) )
+ if (!restrictions.containsKey(interfaceMethod))
{
- return method.getAnnotation(Restrict.class);
- }
- else if ( getComponent().getBeanClass().isAnnotationPresent(Restrict.class) )
- {
- if ( !getComponent().isLifecycleMethod(method) )
+ synchronized(restrictions)
{
- return getComponent().getBeanClass().getAnnotation(Restrict.class);
+ if (!restrictions.containsKey(interfaceMethod))
+ {
+ Method method = getComponent().getBeanClass().getMethod(
+ interfaceMethod.getName(), interfaceMethod.getParameterTypes() );
+
+ Restrict restrict = null;
+
+ if ( method.isAnnotationPresent(Restrict.class) )
+ {
+ restrict = method.getAnnotation(Restrict.class);
+ }
+ else if ( getComponent().getBeanClass().isAnnotationPresent(Restrict.class) )
+ {
+ if ( !getComponent().isLifecycleMethod(method) )
+ {
+ restrict = getComponent().getBeanClass().getAnnotation(Restrict.class);
+ }
+ }
+
+ if (restrict != null)
+ {
+ Restriction restriction = new Restriction();
+ restriction.setExpression(!Strings.isEmpty( restrict.value() ) ?
+ restrict.value() : createDefaultExpr(method));
+ restrictions.put(interfaceMethod, restriction);
+ return restriction;
+ }
+
+ for (Annotation annotation : method.getAnnotations())
+ {
+ if (annotation.annotationType().isAnnotationPresent(PermissionAction.class))
+ {
+ PermissionAction permissionAction = annotation.annotationType().getAnnotation(PermissionAction.class);
+
+ Method valueMethod = null;
+ for (Method m : annotation.annotationType().getDeclaredMethods())
+ {
+ valueMethod = m;
+ break;
+ }
+
+ if (valueMethod != null)
+ {
+ Restriction restriction = new Restriction();
+ restriction.setTarget(valueMethod.invoke(annotation));
+
+ if (!"".equals(permissionAction.value()))
+ {
+ restriction.setAction(permissionAction.value());
+ }
+ else
+ {
+ // If the PermissionAction.value isn't set, just use the lower-case version of the annotation name
+ restriction.setAction(annotation.annotationType().getSimpleName().toLowerCase());
+ }
+ restrictions.put(interfaceMethod, restriction);
+ return restriction;
+ }
+ }
+ }
+
+ restrictions.put(interfaceMethod, null);
+ return null;
+ }
}
}
- return null;
+ return restrictions.get(interfaceMethod);
}
/**
@@ -65,6 +162,7 @@
*/
private String createDefaultExpr(Method method)
{
- return String.format( "#{s:hasPermission('%s','%s', null)}", getComponent().getName(), method.getName() );
+ return String.format( "#{s:hasPermission('%s','%s', null)}",
+ getComponent().getName(), method.getName() );
}
}
16 years, 10 months
Seam SVN: r7418 - trunk/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-12 23:21:03 -0500 (Tue, 12 Feb 2008)
New Revision: 7418
Modified:
trunk/src/main/org/jboss/seam/Component.java
Log:
JBSEAM-1416
Modified: trunk/src/main/org/jboss/seam/Component.java
===================================================================
--- trunk/src/main/org/jboss/seam/Component.java 2008-02-13 02:55:42 UTC (rev 7417)
+++ trunk/src/main/org/jboss/seam/Component.java 2008-02-13 04:21:03 UTC (rev 7418)
@@ -305,14 +305,22 @@
private void initSynchronize()
{
+ boolean hasAnnotation = getBeanClass().isAnnotationPresent(Synchronized.class);
+
synchronize = ( scope==SESSION /*&& ! beanClass.isAnnotationPresent(ReadOnly.class)*/ ) ||
- getBeanClass().isAnnotationPresent(Synchronized.class);
+ hasAnnotation;
+
if (synchronize)
{
timeout = getBeanClass().isAnnotationPresent(Synchronized.class) ?
getBeanClass().getAnnotation(Synchronized.class).timeout() :
Synchronized.DEFAULT_TIMEOUT;
}
+
+ if (hasAnnotation && !interceptionEnabled)
+ {
+ log.warn("Interceptors are disabled for @Synchronized component - synchronization will be disabled for: " + name);
+ }
}
private void registerConverterOrValidator(Context applicationContext)
16 years, 10 months
Seam SVN: r7417 - trunk/doc/reference/en/modules.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-12 21:55:42 -0500 (Tue, 12 Feb 2008)
New Revision: 7417
Modified:
trunk/doc/reference/en/modules/concepts.xml
Log:
JBSEAM-1416
Modified: trunk/doc/reference/en/modules/concepts.xml
===================================================================
--- trunk/doc/reference/en/modules/concepts.xml 2008-02-13 00:31:30 UTC (rev 7416)
+++ trunk/doc/reference/en/modules/concepts.xml 2008-02-13 02:55:42 UTC (rev 7417)
@@ -265,7 +265,9 @@
</para>
<para>
Since the session context is multithreaded, and often contains volatile state, session scope
- components are always protected by Seam from concurrent access. Seam serializes requests to session
+ components are always protected by Seam from concurrent access, so long as the Seam interceptors
+ are not disabled for that component. If interceptors are disabled, then any thread-safety that is
+ required must be implemented by the component itself. Seam serializes requests to session
scope session beans and JavaBeans by default (and detects and breaks any deadlocks that occur). This is
not the default behaviour for application scoped components however, since application scoped components
do not usually hold volatile state and because synchronization at the global level is
@@ -354,7 +356,8 @@
the page or stateless contexts.
</para>
<para>
- Concurrent requests to session-scoped stateful session beans are always serialized by Seam.
+ Concurrent requests to session-scoped stateful session beans are always serialized by Seam, as long
+ as the Seam interceptors are not disabled for the bean.
</para>
<para>
Seam stateful session bean components may be instantiated using <literal>Component.getInstance()</literal>
16 years, 10 months
Seam SVN: r7416 - branches/Seam_2_0/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-12 19:31:30 -0500 (Tue, 12 Feb 2008)
New Revision: 7416
Modified:
branches/Seam_2_0/src/main/org/jboss/seam/security/Identity.java
Log:
madmake authenticate() synchronized
Modified: branches/Seam_2_0/src/main/org/jboss/seam/security/Identity.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/security/Identity.java 2008-02-13 00:30:10 UTC (rev 7415)
+++ branches/Seam_2_0/src/main/org/jboss/seam/security/Identity.java 2008-02-13 00:31:30 UTC (rev 7416)
@@ -239,7 +239,7 @@
catch (LoginException ex) { }
}
- public void authenticate()
+ public synchronized void authenticate()
throws LoginException
{
// If we're already authenticated, then don't authenticate again
16 years, 10 months
Seam SVN: r7415 - trunk/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-12 19:30:10 -0500 (Tue, 12 Feb 2008)
New Revision: 7415
Modified:
trunk/src/main/org/jboss/seam/security/Identity.java
Log:
make authenticate() synchronized
Modified: trunk/src/main/org/jboss/seam/security/Identity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/Identity.java 2008-02-11 21:43:16 UTC (rev 7414)
+++ trunk/src/main/org/jboss/seam/security/Identity.java 2008-02-13 00:30:10 UTC (rev 7415)
@@ -254,7 +254,7 @@
*
* @throws LoginException
*/
- public void authenticate()
+ public synchronized void authenticate()
throws LoginException
{
// If we're already authenticated, then don't authenticate again
16 years, 10 months
Seam SVN: r7414 - tags/JBoss_Seam_2_1_0_A1/build.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-02-11 16:43:16 -0500 (Mon, 11 Feb 2008)
New Revision: 7414
Modified:
tags/JBoss_Seam_2_1_0_A1/build/default.build.properties
Log:
version
Modified: tags/JBoss_Seam_2_1_0_A1/build/default.build.properties
===================================================================
--- tags/JBoss_Seam_2_1_0_A1/build/default.build.properties 2008-02-11 21:27:20 UTC (rev 7413)
+++ tags/JBoss_Seam_2_1_0_A1/build/default.build.properties 2008-02-11 21:43:16 UTC (rev 7414)
@@ -8,7 +8,7 @@
major.version 2
minor.version .1
patchlevel .0
-qualifier -SNAPSHOT
+qualifier .A1
#
# Other program locations
# -----------------------
16 years, 10 months
Seam SVN: r7413 - tags.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-02-11 16:27:20 -0500 (Mon, 11 Feb 2008)
New Revision: 7413
Added:
tags/JBoss_Seam_2_1_0_A1/
Log:
tag
Copied: tags/JBoss_Seam_2_1_0_A1 (from rev 7412, trunk)
16 years, 10 months
Seam SVN: r7412 - tags.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-02-11 16:26:45 -0500 (Mon, 11 Feb 2008)
New Revision: 7412
Removed:
tags/JBoss_Seam_2_1_0_A1/
Log:
remove tag
16 years, 10 months