Seam SVN: r8399 - branches/Seam_1_2_1_AP/lib.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-06-20 14:44:11 -0400 (Fri, 20 Jun 2008)
New Revision: 8399
Modified:
branches/Seam_1_2_1_AP/lib/commons-beanutils-1.7.0.jar
Log:
JBPAPP-330 upgrade common-beanutils to version 1.7.0clean-brew
Modified: branches/Seam_1_2_1_AP/lib/commons-beanutils-1.7.0.jar
===================================================================
(Binary files differ)
16 years, 6 months
Seam SVN: r8398 - in trunk/examples/wiki: src/etc/i18n and 17 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-06-20 13:44:36 -0400 (Fri, 20 Jun 2008)
New Revision: 8398
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml
trunk/examples/wiki/view/includes/userProfileLink.xhtml
trunk/examples/wiki/view/userProfile_d.xhtml
trunk/examples/wiki/view/userProfile_m.xhtml
Removed:
trunk/examples/wiki/view/includes/userInfoLink.xhtml
trunk/examples/wiki/view/userInfo_d.xhtml
trunk/examples/wiki/view/userInfo_m.xhtml
Modified:
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
trunk/examples/wiki/src/etc/i18n/messages_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/docDisplay_m.xhtml
trunk/examples/wiki/view/includes/commentsDisplay.xhtml
trunk/examples/wiki/view/includes/userControl.xhtml
trunk/examples/wiki/view/includes/userInfo.xhtml
trunk/examples/wiki/view/tagDisplay_d.xhtml
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/userHome_d.xhtml
trunk/examples/wiki/view/userList_d.xhtml
Log:
Introduced user profile plugin modules
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -21,7 +21,7 @@
</page>
<page view-id="/docDisplay*">
- <param name="documentId" value="#{documentHome.nodeId}"/>
+ <param name="documentId" value="#{documentHome.nodeId}" required="true"/>
</page>
<page view-id="/docHistory*" no-conversation-view-id="/wiki.xhtml">
@@ -79,7 +79,7 @@
</page>
<page view-id="/dirDisplay*">
- <param name="directoryId" value="#{directoryBrowser.directoryId}"/>
+ <param name="directoryId" value="#{directoryBrowser.directoryId}" required="true"/>
<navigation>
<rule if-outcome="removed">
<redirect view-id="/dirDisplay_#{skin}.xhtml">
@@ -164,7 +164,7 @@
</page>
<page view-id="/tagDisplay*">
- <param name="tag" value="#{tagQuery.tag}"/>
+ <param name="tag" value="#{tagQuery.tag}" required="true"/>
</page>
<page view-id="/search*">
@@ -214,7 +214,7 @@
</navigation>
</page>
- <page view-id="/userInfo*">
+ <page view-id="/userProfile*">
<param name="userId" value="#{userHome.userId}"/>
<param name="username" value="#{userHome.requestedUsername}"/>
<action execute="#{userHome.initDisplay}"/>
@@ -225,7 +225,7 @@
</page>
<page view-id="/confirmRegistration.xhtml" action="#{authenticator.activate}">
- <param name="activationCode" value="#{authenticator.activationCode}"/>
+ <param name="activationCode" value="#{authenticator.activationCode}" required="true"/>
<navigation>
<rule if-outcome="activated">
<redirect view-id="/wiki.xhtml">
@@ -242,7 +242,7 @@
</page>
<page view-id="/resetPassword.xhtml" action="#{userPasswordReset.prepare}">
- <param name="activationCode" value="#{userPasswordReset.activationCode}"/>
+ <param name="activationCode" value="#{userPasswordReset.activationCode}" required="true"/>
<navigation>
<rule if-outcome="prepared">
<redirect view-id="/wiki.xhtml">
@@ -362,6 +362,13 @@
</http-error>
</exception>
+ <exception class="javax.faces.validator.ValidatorException">
+ <end-conversation/>
+ <http-error error-code="400">
+ <message>#{messages['lacewiki.msg.RequestError']}</message>
+ </http-error>
+ </exception>
+
<!-- We send a BAD REQUEST here because we don't want the client to retry later (Googlebot...) -->
<exception log="true" logLevel="error">
<end-conversation/>
Modified: trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -53,7 +53,7 @@
<set type="session" name="skin">m</set>
</rule>
- <!-- /123.lace -->
+ <!-- /123.html -->
<rule>
<from>^/([0-9]+)\.[a-zA-z]+$</from>
<to last="true">/wiki.seam?nodeId=$1</to>
@@ -68,7 +68,7 @@
<!-- /user/foo -->
<rule>
<from casesensitive="true">^/user/([a-zA-Z]?[a-zA-Z0-9]+)$</from>
- <to last="true">/userInfo_%{session-attribute:skin}.seam?username=$1</to>
+ <to last="true">/userProfile_%{session-attribute:skin}.seam?username=$1</to>
</rule>
<!-- /tag/Foo+Bar-->
@@ -122,7 +122,7 @@
</rule>
<rule>
<from casesensitive="true">^/cgi-bin/blosxom.cgi/index.rss$</from>
- <to last="true" type="permanent-redirect">%{scheme}://%{server-name}%{context-path}/Feed/atom</to>
+ <to last="true" type="permanent-redirect">%{scheme}://%{server-name}%{context-path}/service/Feed/atom</to>
</rule>
<!-- ROOT / -->
Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-06-20 17:44:36 UTC (rev 8398)
@@ -466,17 +466,11 @@
lacewiki.label.userList.Edit=Edit
lacewiki.label.userList.NotAvailableForSkin=User search is not available with this skin.
-# User Info
+# User Profile
-lacewiki.label.userInfo.UserInfo=User Summary
-lacewiki.label.userInfo.NotActivated=Not Activated
-lacewiki.label.userInfo.NoProfile=No profile available.
-lacewiki.label.userInfo.Name=Name
-lacewiki.label.userInfo.JoinedOn=Joined
-lacewiki.label.userInfo.LastLoginOn=Last Login
-lacewiki.label.userInfo.RatingPoints=Rating Points
-lacewiki.button.userInfo.EditAccount=<u>E</u>dit Account
-lacewiki.button.userInfo.EditAccount.accesskey=E
+lacewiki.label.userProfile.UserProfile=User Profile
+lacewiki.button.userProfile.EditAccount=<u>E</u>dit Account/Profile
+lacewiki.button.userProfile.EditAccount.accesskey=E
# Document History
@@ -700,6 +694,7 @@
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=Request failed, please check the application log or contact the administrator
+lacewiki.msg.RequestError=Request failed, most likely because a request parameter was missing
lacewiki.msg.Trash.Emptied=All items in the trash have been permanently deleted.
lacewiki.msg.AutomaticallyGeneratedFeed=Aggregated Feed
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -365,6 +365,8 @@
getLog().debug("request parameter sets comment form visible, starts conversation");
Conversation.instance().begin(true, false);
Conversation.instance().changeFlushMode(FlushModeType.MANUAL);
+
+ setParentNodeId(documentHome.getInstance().getId());
newComment();
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -17,6 +17,7 @@
import org.jboss.seam.log.Logging;
import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
import org.jboss.seam.wiki.core.plugin.metamodel.MacroPluginModule;
+import org.jboss.seam.wiki.core.plugin.metamodel.ProfilePluginModule;
import org.jboss.seam.wiki.core.plugin.binding.PluginBinder;
import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
import org.jboss.seam.wiki.core.model.WikiTextMacro;
@@ -42,6 +43,7 @@
private SortedMap<String, Plugin> plugins = new TreeMap<String, Plugin>();
private SortedMap<String, MacroPluginModule> macroPluginModulesByKey = new TreeMap<String, MacroPluginModule>();
private SortedMap<String, MacroPluginModule> macroPluginModulesByMacroName = new TreeMap<String, MacroPluginModule>();
+ private SortedSet<ProfilePluginModule> profilePluginModulesByPriority = new TreeSet<ProfilePluginModule>();
public void addPlugin(String key, Plugin p) {
if (plugins.containsKey(key)) {
@@ -76,6 +78,15 @@
return macroPluginModulesByMacroName;
}
+ // TODO: This should be unmodifiable and additions only allowed through a new registry method
+ public SortedSet<ProfilePluginModule> getProfilePluginModulesByPriority() {
+ return profilePluginModulesByPriority;
+ }
+
+ public List<ProfilePluginModule> getProfilePluginModulesAsList() {
+ return new ArrayList<ProfilePluginModule>(profilePluginModulesByPriority);
+ }
+
public WikiPluginMacro createWikiPluginMacro(WikiTextMacro wikiTextMacro) {
if (getMacroPluginModulesByMacroName().containsKey(wikiTextMacro.getName())) {
log.debug("binding WikiTextMacro metadata to create WikiPluginMacro instance: " + wikiTextMacro);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -68,7 +68,8 @@
plugin.setLabel(pluginLabel);
bindPluginInfo(root, plugin);
- bindMacroPluginsModules(registry, root, plugin);
+ bindMacroPluginModules(registry, root, plugin);
+ bindProfilePluginModules(registry, root, plugin);
}
bindMacroParameters(registry);
@@ -105,78 +106,101 @@
}
}
- private void bindMacroPluginsModules(PluginRegistry registry, Element root, Plugin plugin) {
+ private void bindMacroPluginModules(PluginRegistry registry, Element root, Plugin plugin) {
// Iterate through the XML descriptor and bind every <macro> to corresponding metamodel instances
List<Element> macroPlugins = root.elements("macro");
- for (Element macroPluginModuleDescriptor : macroPlugins) {
+ for (Element descriptor : macroPlugins) {
- String moduleKey = macroPluginModuleDescriptor.attributeValue("key");
- MacroPluginModule macroPluginModule = new MacroPluginModule(plugin, moduleKey);
+ String moduleKey = descriptor.attributeValue("key");
+ MacroPluginModule module = new MacroPluginModule(plugin, moduleKey);
- log.debug("binding macro plugin module: " + macroPluginModule.getFullyQualifiedKey());
+ log.debug("binding macro plugin module: " + module.getFullyQualifiedKey());
+ bindLabelDescription(descriptor, module, plugin);
+ bindMacroApplicableTo(descriptor, module);
+ bindMacroRenderOptions(descriptor, module);
+ bindSkins(descriptor, module);
+ bindCacheRegions(descriptor, module);
- String macroName = macroPluginModuleDescriptor.attributeValue("name");
+ String macroName = descriptor.attributeValue("name");
if (registry.getMacroPluginModulesByMacroName().containsKey(macroName)) {
throw new InvalidWikiConfigurationException("Duplicate macro name, needs to be globally unique: " + macroName);
}
- macroPluginModule.setName(macroName);
+ module.setName(macroName);
- String label = macroPluginModuleDescriptor.attributeValue("label");
- if (label == null) label = getMessage(plugin.getKey() + "." + moduleKey + ".label");
- macroPluginModule.setLabel(label);
- String description = macroPluginModuleDescriptor.attributeValue("description");
- if (description == null) description = getMessage(plugin.getKey() + "." + moduleKey + ".description");
- macroPluginModule.setDescription(description);
+ // Finally, bind it
+ plugin.getModules().add(module);
+ registry.getMacroPluginModulesByKey().put(module.getFullyQualifiedKey(), module);
+ registry.getMacroPluginModulesByMacroName().put(module.getName(), module);
+ }
- bindMacroApplicableTo(macroPluginModuleDescriptor, macroPluginModule);
- bindMacroRenderOptions(macroPluginModuleDescriptor, macroPluginModule);
+ }
- Element skins = macroPluginModuleDescriptor.element("skins");
- if (skins != null) {
- bindMacroSkins(skins, macroPluginModule);
- }
+ private void bindProfilePluginModules(PluginRegistry registry, Element root, Plugin plugin) {
- Element cacheRegions = macroPluginModuleDescriptor.element("cache-regions");
- if (cacheRegions != null) {
- bindFragmentCacheRegions(cacheRegions, macroPluginModule);
- }
+ // Iterate through the XML descriptor and bind every <profile> to corresponding metamodel instances
+ List<Element> profilePlugins = root.elements("profile");
+ for (Element descriptor : profilePlugins) {
+ String moduleKey = descriptor.attributeValue("key");
+ ProfilePluginModule module = new ProfilePluginModule(plugin, moduleKey);
+
+ log.debug("binding profile plugin module: " + module.getFullyQualifiedKey());
+
+ bindLabelDescription(descriptor, module, plugin);
+ bindSkins(descriptor, module);
+
+ module.setTemplate(descriptor.attributeValue("template"));
+ module.setPriority(new Integer(descriptor.attributeValue("priority")));
+
// Finally, bind it
- plugin.getModules().add(macroPluginModule);
- registry.getMacroPluginModulesByKey().put(macroPluginModule.getFullyQualifiedKey(), macroPluginModule);
- registry.getMacroPluginModulesByMacroName().put(macroPluginModule.getName(), macroPluginModule);
+ plugin.getModules().add(module);
+ registry.getProfilePluginModulesByPriority().add(module);
}
}
- private void bindFragmentCacheRegions(Element moduleDescriptor, PluginModule module) {
+ private void bindLabelDescription(Element descriptor, PluginModule module, Plugin plugin) {
+ String label = descriptor.attributeValue("label");
+ if (label == null) label = getMessage(plugin.getKey() + "." + module.getKey() + ".label");
+ module.setLabel(label);
+ String description = descriptor.attributeValue("description");
+ if (description == null) description = getMessage(plugin.getKey() + "." + module.getKey() + ".description");
+ module.setDescription(description);
+ }
- List<Element> cacheRegions = moduleDescriptor.elements("cache-region");
- if (cacheRegions.size() > 0) {
- for (Element cacheRegion : cacheRegions) {
+ private void bindCacheRegions(Element descriptor, PluginModule module) {
+ Element cacheRegionsDescriptor = descriptor.element("cache-regions");
+ if (cacheRegionsDescriptor != null) {
+ List<Element> cacheRegions = cacheRegionsDescriptor.elements("cache-region");
+ if (cacheRegions.size() > 0) {
+ for (Element cacheRegion : cacheRegions) {
+ String unqualifiedCacheRegionName = cacheRegion.attributeValue("name");
+ module.addFragmentCacheRegion(unqualifiedCacheRegionName);
- String unqualifiedCacheRegionName = cacheRegion.attributeValue("name");
- module.addFragmentCacheRegion(unqualifiedCacheRegionName);
-
- List<Element> invalidationEvents = cacheRegion.elements("invalidation-event");
- if (invalidationEvents != null) {
- for (Element invalidationEvent : invalidationEvents) {
- String eventName = invalidationEvent.attributeValue("name");
- PluginCacheManager.registerBinding(
- eventName,
- module.getQualifiedCacheRegionName(unqualifiedCacheRegionName)
- );
+ List<Element> invalidationEvents = cacheRegion.elements("invalidation-event");
+ if (invalidationEvents != null) {
+ for (Element invalidationEvent : invalidationEvents) {
+ String eventName = invalidationEvent.attributeValue("name");
+ PluginCacheManager.registerBinding(
+ eventName,
+ module.getQualifiedCacheRegionName(unqualifiedCacheRegionName)
+ );
+ }
}
}
-
}
}
}
- private void bindMacroSkins(Element moduleDescriptor, MacroPluginModule module) {
- List<Element> skins = moduleDescriptor.elements("skin");
+ private void bindSkins(Element descriptor, PluginModule module) {
+ Element skins = descriptor.element("skins");
+ if (skins != null) bindSkin(skins, module);
+ }
+
+ private void bindSkin(Element descriptor, PluginModule module) {
+ List<Element> skins = descriptor.elements("skin");
if (skins.size() > 0) {
String[] skinNames = new String[skins.size()];
for (int i = 0; i < skins.size(); i++)
@@ -185,8 +209,8 @@
}
}
- private void bindMacroApplicableTo(Element moduleDescriptor, MacroPluginModule module) {
- Element applicableTo = moduleDescriptor.element("applicable-to");
+ private void bindMacroApplicableTo(Element descriptor, MacroPluginModule module) {
+ Element applicableTo = descriptor.element("applicable-to");
if (applicableTo != null) {
boolean header = Boolean.parseBoolean(applicableTo.attributeValue("header"));
boolean content = Boolean.parseBoolean(applicableTo.attributeValue("content"));
@@ -200,8 +224,8 @@
}
}
- private void bindMacroRenderOptions(Element moduleDescriptor, MacroPluginModule module) {
- Element renderOptions = moduleDescriptor.element("render-options");
+ private void bindMacroRenderOptions(Element descriptor, MacroPluginModule module) {
+ Element renderOptions = descriptor.element("render-options");
if (renderOptions != null) {
List<MacroPluginModule.RenderOption> renderOptionList =
new ArrayList<MacroPluginModule.RenderOption>();
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -17,7 +17,6 @@
public class MacroPluginModule extends PluginModule {
private String name;
- private String[] skins = {"d"};
private DocumentArea[] applicableTo = {DocumentArea.CONTENT};
private RenderOption[] renderOptions;
private RenderDependency[] renderDependencies;
@@ -69,21 +68,6 @@
this.name = name;
}
- public String[] getSkins() {
- return skins;
- }
-
- public void setSkins(String[] skins) {
- this.skins = skins;
- }
-
- public boolean isAvailableForSkin(String skin) {
- for (String s : skins) {
- if (skin.equals(s)) return true;
- }
- return false;
- }
-
public DocumentArea[] getApplicableTo() {
return applicableTo;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -105,10 +105,10 @@
+ "/" + currentTheme;
}
- public String getPackageDefaultTemplatePath(String macroName) {
+ public String getPackageDefaultTemplatePath(String templateName) {
return getDescriptorPackagePath()
+ "/" + Plugin.PACKAGE_TEMPLATES
- + "/" + macroName + ".xhtml";
+ + "/" + templateName + ".xhtml";
}
public String getPackageI18NPath() {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -22,6 +22,7 @@
private String label;
private String description;
private String className;
+ private String[] skins = {"d"};
private SortedSet<String> fragmentCacheRegions = new TreeSet<String>();
protected PluginModule(Plugin plugin, String key) {
@@ -69,6 +70,21 @@
this.className = className;
}
+ public String[] getSkins() {
+ return skins;
+ }
+
+ public void setSkins(String[] skins) {
+ this.skins = skins;
+ }
+
+ public boolean isAvailableForSkin(String skin) {
+ for (String s : skins) {
+ if (skin.equals(s)) return true;
+ }
+ return false;
+ }
+
public SortedSet<String> getFragmentCacheRegions() {
return fragmentCacheRegions;
}
@@ -92,6 +108,4 @@
public String getQualifiedCacheRegionName(String name) {
return getFullyQualifiedKey() + "." + name;
}
-
-
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin.metamodel;
+
+/**
+ * @author Christian Bauer
+ */
+public class ProfilePluginModule extends PluginModule implements Comparable {
+
+ private String template;
+ private int priority = 100;
+ private String[] skins = {"d"};
+
+ public ProfilePluginModule(Plugin plugin, String key) {
+ super(plugin, key);
+ }
+
+ public String getTemplate() {
+ return template;
+ }
+
+ public void setTemplate(String template) {
+ this.template = template;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
+
+ public void setPriority(int priority) {
+ this.priority = priority;
+ }
+
+ public String[] getSkins() {
+ return skins;
+ }
+
+ public void setSkins(String[] skins) {
+ this.skins = skins;
+ }
+
+ public int compareTo(Object o) {
+ int result = new Integer(((ProfilePluginModule)o).getPriority()).compareTo(this.getPriority());
+ return result == 0
+ ? this.getKey().compareTo( ((ProfilePluginModule)o).getKey() )
+ : result;
+ }
+
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd 2008-06-20 17:44:36 UTC (rev 8398)
@@ -3,6 +3,8 @@
targetNamespace="http://jboss.com/products/seam/wiki/plugin"
xmlns:plugin="http://jboss.com/products/seam/wiki/plugin">
+ <!-- Plugin root -->
+
<xs:element name="plugin">
<xs:annotation>
<xs:documentation>Wiki plugin.</xs:documentation>
@@ -11,6 +13,7 @@
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" ref="plugin:plugin-info"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="plugin:macro"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="plugin:profile"/>
</xs:sequence>
<xs:attribute name="key" type="xs:string" use="required">
<xs:annotation>
@@ -28,6 +31,8 @@
</xs:complexType>
</xs:element>
+ <!-- Plugin details -->
+
<xs:element name="plugin-info">
<xs:annotation>
<xs:documentation>
@@ -36,8 +41,18 @@
</xs:annotation>
<xs:complexType>
<xs:all>
- <xs:element ref="plugin:application-version"/>
- <xs:element ref="plugin:vendor"/>
+ <xs:element name="application-version">
+ <xs:complexType>
+ <xs:attribute name="min" type="xs:string" use="required"/>
+ <xs:attribute name="max" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vendor">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="url" type="xs:string" use="required"/>
+ </xs:complexType>
+ </xs:element>
</xs:all>
<xs:attribute name="description" type="xs:string">
<xs:annotation>
@@ -50,20 +65,8 @@
</xs:complexType>
</xs:element>
- <xs:element name="application-version">
- <xs:complexType>
- <xs:attribute name="min" type="xs:string" use="required"/>
- <xs:attribute name="max" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
+ <!-- Macro module -->
- <xs:element name="vendor">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="url" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
-
<xs:element name="macro">
<xs:annotation>
<xs:documentation>
@@ -72,24 +75,7 @@
</xs:annotation>
<xs:complexType>
<xs:all>
- <xs:element name="skins">
- <xs:complexType>
- <xs:sequence maxOccurs="unbounded">
- <xs:element name="skin">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>
- Wiki skins this macro is available in, e.g. "d" for desktop and "m" for mobile skins.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
-
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xs:element minOccurs="1" maxOccurs="1" ref="plugin:skins"/>
<xs:element name="applicable-to">
<xs:annotation>
<xs:documentation>
@@ -122,38 +108,71 @@
</xs:element>
<xs:element minOccurs="0" ref="plugin:cache-regions"/>
</xs:all>
- <xs:attribute name="key" type="xs:string" use="required">
+ <xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
- Plugin module key, unique within the plugin.
+ The name of the wiki text macro.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="label" type="xs:string">
+ <xs:attributeGroup ref="plugin:key"/>
+ <xs:attributeGroup ref="plugin:labelDescription"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Profile module -->
+
+ <xs:element name="profile">
+ <xs:annotation>
+ <xs:documentation>
+ Plugin module for user profile screen
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:all>
+ <xs:element minOccurs="1" maxOccurs="1" ref="plugin:skins"/>
+ </xs:all>
+ <xs:attribute name="template" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
- Plain text description of plugin module, used in menus.
- If empty, the key is looked up in the message bundles.
+ The name of the XHTML template to include on the profile screen.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="name" type="xs:string" use="required">
+ <xs:attribute name="priority" type="xs:int" use="required">
<xs:annotation>
<xs:documentation>
- The name of the wiki text macro.
+ Priority of rendering position, compared to other profile plugin modules.
+ Lowest values are rendered first, use values greater than 100.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="description" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Short English description/documentation of the plugin.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
+ <xs:attributeGroup ref="plugin:key"/>
+ <xs:attributeGroup ref="plugin:labelDescription"/>
</xs:complexType>
</xs:element>
+
+ <!-- Commons -->
+
+ <xs:element name="skins">
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="skin">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Wiki skins this plugin can be rendered in, e.g. "d" for desktop and "m" for mobile skins.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
<xs:element name="cache-regions">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
@@ -186,5 +205,41 @@
</xs:complexType>
</xs:element>
+ <xs:attributeGroup name="key">
+ <xs:attribute name="key" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Plugin module key, unique within the plugin.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="labelDescription">
+ <xs:attribute name="label" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Plain text description of plugin module, used in menus.
+ If empty, the key is looked up in the message bundles.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="description" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Short English description/documentation of the plugin.
+ If empty, the key is looked up in the message bundles.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+
+
+
+
+
+
+
+
</xs:schema>
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java 2008-06-20 17:44:36 UTC (rev 8398)
@@ -66,11 +66,11 @@
return url.toString();
}
- public String renderUserInfoURL(User user) {
- return renderUserInfoURL(user, false);
+ public String renderUserProfileURL(User user) {
+ return renderUserProfileURL(user, false);
}
- public String renderUserInfoURL(User user, boolean usePrefsPath) {
+ public String renderUserProfileURL(User user, boolean usePrefsPath) {
if (user == null || user.getUsername() == null) return "";
StringBuilder url = new StringBuilder();
url.append(usePrefsPath ? prefs.getBaseUrl() : contextPath);
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -169,5 +169,12 @@
-->
</macro>
+ <profile key="userSummary" template="profile_userSummary" priority="10">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ </profile>
+
</plugin>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-06-20 17:44:36 UTC (rev 8398)
@@ -81,3 +81,16 @@
basic.userProfile.label=User Profile
basic.userProfile.description=Display the profile of the current document owner/creator
+
+basic.userSummary.label=User Summary
+basic.userSummary.description=Display a summary of a users statistics
+basic.userSummary.label.Portrait=Portrait
+basic.userSummary.label.Bio=Bio
+basic.userSummary.label.Website=Website
+basic.userSummary.label.Location=Location
+basic.userSummary.label.Occupation=Occupation
+basic.userSummary.label.JoinedOn=Joined
+basic.userSummary.label.LastLoginOn=Last Login
+basic.userSummary.label.RatingPoints=Rating Points
+basic.userSummary.label.NotActivated=Not Activated
+basic.userSummary.button.GoToUserHome=Go to users home
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -31,7 +31,7 @@
<s:fragment rendered="#{preferences.get('LastModifiedDocuments', currentMacro).showUsernames}">
(<s:span styleClass="undecoratedLink" rendered="#{wiki:isRegularUser(doc.lastModifiedBy)}">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(doc.lastModifiedBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(doc.lastModifiedBy)}">
<h:outputText value="#{doc.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -0,0 +1,111 @@
+<s:fragment
+ 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:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="box">
+
+ <s:div styleClass="boxHeader">
+
+ <h:panelGrid columns="3" style="width:100%;"
+ columnClasses="noWrapWhitespace alignLeft, fullWidth alignRight, noWrapWhitespace alignRight"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputText value="#{userHome.instance.fullname}"/>
+
+ <s:fragment>
+ <h:outputLink rendered="#{wiki:showEmailAddress() and not userHome.instance.guest}"
+ styleClass="smallFont minorPadding"
+ value="#{wiki:escapeEmailURL(wiki:concat('mailto:', userHome.instance.email))}">
+ <h:outputText value="#{wiki:escapeAtSymbol(userHome.instance.email)}"/>
+ </h:outputLink>
+ </s:fragment>
+
+ <s:fragment>
+ <h:outputLink styleClass="buttonNonpersistent"
+ value="#{wikiURLRenderer.renderURL(userHome.instance.memberHome)}"
+ rendered="#{!empty userHome.instance.memberHome}">
+ <h:outputText styleClass="buttonLabel" value="#{messages['basic.userSummary.button.GoToUserHome']}"/>
+ </h:outputLink>
+ </s:fragment>
+
+ </h:panelGrid>
+
+ </s:div>
+
+ <s:div styleClass="boxContent">
+
+ <h:panelGrid columns="2"
+ styleClass="wideEntry" columnClasses="label, output"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputText value="#{messages['basic.userSummary.label.Portrait']}:"
+ rendered="#{!empty userHome.instance.profile.imageContentType}"/>
+
+ <s:graphicImage rendered="#{!empty userHome.instance.profile.imageContentType}"
+ styleClass="userInfoPortraitImage" value="#{userHome.instance.profile.image}">
+ <s:transformImageSize width="80" maintainRatio="true"/>
+ </s:graphicImage>
+
+ <h:outputText value="#{messages['basic.userSummary.label.Bio']}:"
+ rendered="#{not empty userHome.instance.profile.bio}"/>
+
+ <s:span styleClass="inlineWikiText" rendered="#{not empty userHome.instance.profile.bio}">
+ <wiki:formattedText value="#{userHome.instance.profile.bio}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="regularLink"
+ thumbnailLinkStyleClass="regularLink"
+ linkBaseFile="#{wikiStart}"
+ currentAreaNumber="#{wikiStart.areaNumber}"
+ internalTargetFrame="_top"
+ externalTargetFrame="_top"
+ enableMacroRendering="false"/>
+ </s:span>
+
+ <h:outputText value="#{messages['basic.userSummary.label.Website']}:"
+ rendered="#{not empty userHome.instance.profile.website}"/>
+ <h:outputLink target="_top" value="#{userHome.instance.profile.website}"
+ rendered="#{not empty userHome.instance.profile.website}">
+ <h:outputText value="#{wiki:truncateString(userHome.instance.profile.website, 150, '...')}"/>
+ </h:outputLink>
+
+ <h:outputText value="#{messages['basic.userSummary.label.Location']}:"
+ rendered="#{not empty userHome.instance.profile.location}"/>
+ <h:outputText value="#{userHome.instance.profile.location}"
+ rendered="#{not empty userHome.instance.profile.location}"/>
+
+ <h:outputText value="#{messages['basic.userSummary.label.Occupation']}:"
+ rendered="#{not empty userHome.instance.profile.occupation}"/>
+ <h:outputText value="#{userHome.instance.profile.occupation}"
+ rendered="#{not empty userHome.instance.profile.occupation}"/>
+
+ <h:outputText value="#{messages['basic.userSummary.label.JoinedOn']}:"/>
+ <s:span>
+ <h:outputText value="#{userHome.instance.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" (#{messages['basic.userSummary.label.NotActivated']})"
+ rendered="#{wiki:isRegularUser(userHome.instance) and not userHome.instance.activated}"/>
+ </s:span>
+
+ <h:outputText value="#{messages['basic.userSummary.label.LastLoginOn']}:"/>
+ <h:outputText value="#{userHome.instance.lastLoginOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+
+ <h:outputText value="#{messages['basic.userSummary.label.RatingPoints']}:"/>
+ <h:outputText value="#{userHome.ratingPoints}"/>
+
+ </h:panelGrid>
+
+ </s:div>
+
+ </s:div>
+
+ <div class="boxFooter"/>
+
+</s:fragment>
\ No newline at end of file
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -33,7 +33,7 @@
rendered="#{!empty blogEntry.entryDocument.createdBy.memberHome}">
<h:outputText value="#{blogEntry.entryDocument.createdBy.fullname}"/>
</h:outputLink>
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(blogEntry.entryDocument.createdBy)}" target="_top"
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(blogEntry.entryDocument.createdBy)}" target="_top"
rendered="#{empty blogEntry.entryDocument.createdBy.memberHome}">
<h:outputText value="#{blogEntry.entryDocument.createdBy.fullname}"/>
</h:outputLink>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -101,7 +101,7 @@
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(q.lastModifiedBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(q.lastModifiedBy)}">
<h:outputText value="#{q.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>)
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -96,7 +96,7 @@
</div>
- <s:div styleClass="feedAggregatorEmpty"
+ <s:div styleClass="feedAggregatorEmpty minorPadding"
rendered="#{empty feedAggregator.getFeedEntries(currentMacro) or
feedAggregator.getFeedEntries(currentMacro).size() == 0}">
<h:outputText value="#{messages['feed.aggregator.label.NoEntriesFound']}"/>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -99,7 +99,7 @@
</s:div>
<s:div rendered="#{currentDocument.ownedByRegularUser}">
<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(currentDocument.createdBy)}">
<h:outputText value="#{currentDocument.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -117,7 +117,7 @@
<s:fragment rendered="#{currentDocument.ownedByRegularUser and !empty currentDocument.createdBy.profile.imageContentType}">
<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(currentDocument.createdBy)}">
<s:graphicImage styleClass="commentAuthorPortraitImage" value="#{currentDocument.createdBy.profile.image}">
<s:transformImageSize width="30" maintainRatio="true"/>
</s:graphicImage>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -38,7 +38,7 @@
<f:facet name="header">
<h:outputText value="#{messages['forum.topPosters.label.User']}"/>
</f:facet>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user" value="#{p}"/>
</ui:include>
</h:column>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -21,7 +21,7 @@
</h:outputText>
</s:div>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user" value="#{createdBy}"/>
</ui:include>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -51,7 +51,7 @@
<h:column>
<f:facet name="header">Author</f:facet>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user" value="#{t.topic.createdBy}"/>
</ui:include>
@@ -68,7 +68,7 @@
<h:graphicImage styleClass="topicGotoIcon" value="#{currentMacro.requestImagePath}/icon.posting_goto.gif" width="18" height="9"/>
</h:outputLink>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user" value="#{t.lastComment.createdBy}"/>
</ui:include>
@@ -82,7 +82,7 @@
<h:graphicImage styleClass="topicGotoIcon" value="#{currentMacro.requestImagePath}/icon.posting_goto.gif" width="18" height="9"/>
</h:outputLink>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user" value="#{t.topic.createdBy}"/>
</ui:include>
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -359,7 +359,7 @@
</ui:include>
<s:span styleClass="undecoratedLink" rendered="#{node.ownedByRegularUser}">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.createdBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(node.createdBy)}">
<h:outputText value="#{node.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -394,7 +394,7 @@
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(node.lastModifiedBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(node.lastModifiedBy)}">
<h:outputText value="#{node.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>)
Modified: trunk/examples/wiki/view/docDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_m.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/docDisplay_m.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -236,7 +236,7 @@
</h:outputText>
<s:div rendered="#{c.ownedByRegularUser}">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(c.createdBy)}">
<h:outputText value="#{c.createdBy.fullname}"/>
</h:outputLink>
<s:fragment rendered="#{wiki:showEmailAddress()}">
Modified: trunk/examples/wiki/view/includes/commentsDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -71,7 +71,7 @@
</s:div>
<s:div rendered="#{c.ownedByRegularUser}">
<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(c.createdBy)}">
<h:outputText value="#{c.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -98,7 +98,7 @@
<s:fragment rendered="#{c.ownedByRegularUser and !empty c.createdBy.profile.imageContentType}">
<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(c.createdBy)}">
<s:graphicImage styleClass="commentAuthorPortraitImage" value="#{c.createdBy.profile.image}">
<s:transformImageSize width="30" maintainRatio="true"/>
</s:graphicImage>
Modified: trunk/examples/wiki/view/includes/userControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userControl.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/includes/userControl.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -139,16 +139,15 @@
<h:outputLink styleClass="link" tabindex="70"
accesskey="#{messages['lacewiki.button.userControl.Home.accesskey']}"
value="#{wikiURLRenderer.renderURL(currentUser.memberHome)}"
- rendered="#{!empty currentUser.memberHome}">
+ rendered="#{!empty currentUser.memberHome}">
<h:outputText styleClass="linkText" escape="false" value="#{messages['lacewiki.button.userControl.Home']}"/>
</h:outputLink>
- <s:link styleClass="link" tabindex="70"
- accesskey="#{messages['lacewiki.button.userControl.Profile.accesskey']}"
- view="/userHome_#{skin}.xhtml" propagation="none">
+ <h:outputLink styleClass="link" tabindex="70"
+ accesskey="#{messages['lacewiki.button.userControl.Profile.accesskey']}"
+ value="#{wikiURLRenderer.renderUserProfileURL(currentUser)}">
<h:outputText styleClass="linkText" escape="false" value="#{messages['lacewiki.button.userControl.Profile']}"/>
- <f:param name="userId" value="#{currentUser.id}"/>
- </s:link>
+ </h:outputLink>
<s:link styleClass="link" tabindex="70"
accesskey="#{messages['lacewiki.button.userControl.Members.accesskey']}"
Modified: trunk/examples/wiki/view/includes/userInfo.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfo.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/includes/userInfo.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -11,7 +11,11 @@
<div class="box">
<div class="boxHeader">
- <h:outputText value="#{user.fullname}"/>
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(user)}">
+ <h:outputText value="#{user.fullname}"/>
+ </h:outputLink>
+ </s:span>
<s:div styleClass="userInfoEmail smallFont" rendered="#{wiki:showEmailAddress()}">
<h:outputLink value="#{wiki:escapeEmailURL(wiki:concat('mailto:', user.email))}">
<h:outputText value="#{wiki:escapeAtSymbol(user.email)}"/>
Deleted: trunk/examples/wiki/view/includes/userInfoLink.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfoLink.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/includes/userInfoLink.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -1,20 +0,0 @@
-<s:fragment
- 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:c="http://java.sun.com/jstl/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">
-
- <s:div styleClass="undecoratedLink" rendered="#{wiki:isRegularUser(user)}">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(user)}">
- <h:outputText value="#{user.fullname}"/>
- </h:outputLink>
- </s:div>
- <s:div rendered="#{not wiki:isRegularUser(user)}">
- <h:outputText value="#{user.fullname}"/>
- </s:div>
-
-</s:fragment>
\ No newline at end of file
Copied: trunk/examples/wiki/view/includes/userProfileLink.xhtml (from rev 8385, trunk/examples/wiki/view/includes/userInfoLink.xhtml)
===================================================================
--- trunk/examples/wiki/view/includes/userProfileLink.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/userProfileLink.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -0,0 +1,20 @@
+<s:fragment
+ 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:c="http://java.sun.com/jstl/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">
+
+ <s:div styleClass="undecoratedLink" rendered="#{wiki:isRegularUser(user)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(user)}">
+ <h:outputText value="#{user.fullname}"/>
+ </h:outputLink>
+ </s:div>
+ <s:div rendered="#{not wiki:isRegularUser(user)}">
+ <h:outputText value="#{user.fullname}"/>
+ </s:div>
+
+</s:fragment>
\ No newline at end of file
Property changes on: trunk/examples/wiki/view/includes/userProfileLink.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/examples/wiki/view/tagDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -85,7 +85,7 @@
<h:outputText value="#{messages['lacewiki.label.tagDisplay.Owner']}"/>
</f:facet>
<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(file.createdBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(file.createdBy)}">
<h:outputText value="#{file.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -106,7 +106,7 @@
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(file.lastModifiedBy)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(file.lastModifiedBy)}">
<h:outputText value="#{file.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>)
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-06-20 17:44:36 UTC (rev 8398)
@@ -653,6 +653,29 @@
margin-left: 240px;
}
+.wideEntry {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+.wideEntry .label {
+ color: #000000;
+ font-weight:bold;
+ font-size: 85%;
+ vertical-align: top;
+ padding-right: 10px;
+ padding-top: 10px;
+ white-space: nowrap;
+}
+
+.wideEntry .output {
+ padding-top: 10px;
+}
+
+.wideEntry .output .inlineWikiText .wikiPara:first-child {
+ display: inline;
+}
+
.errorEntry {
background-color: #ffeeee;
}
Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-06-20 17:44:36 UTC (rev 8398)
@@ -665,6 +665,28 @@
margin-left: 240px;
}
+.wideEntry {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+.wideEntry .label {
+ color: #000000;
+ font-weight:bold;
+ vertical-align: top;
+ padding-right: 10px;
+ padding-top: 10px;
+ white-space: nowrap;
+}
+
+.wideEntry .output {
+ padding-top: 10px;
+}
+
+.wideEntry .output .inlineWikiText .wikiPara:first-child {
+ display: inline;
+}
+
.errorEntry {
background-color: #ffeeee;
}
@@ -1391,13 +1413,12 @@
.boxFooter {
background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
- padding-top: 5px;
padding-left: 10px;
padding-right: 10px;
font-weight: normal;
color: #d75525;
text-decoration: none;
- text-align: right;c
+ text-align: right;
}
/* Plugin Preferences Editor
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-06-20 17:44:36 UTC (rev 8398)
@@ -950,6 +950,28 @@
margin-left: 240px;
}
+.wideEntry {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+.wideEntry .label {
+ color: #000000;
+ font-weight:bold;
+ vertical-align: top;
+ padding-right: 10px;
+ padding-top: 10px;
+ white-space: nowrap;
+}
+
+.wideEntry .output {
+ padding-top: 10px;
+}
+
+.wideEntry .output .inlineWikiText .wikiPara:first-child {
+ display: inline;
+}
+
.errorEntry {
background-color: #ffeeee;
}
Modified: trunk/examples/wiki/view/userHome_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userHome_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userHome_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -15,6 +15,7 @@
<ui:define name="controlTwo">
+ <!-- TODO: This should redirect to the /user/profile page -->
<s:link id="close" styleClass="linkNavigation sessionEventTrigger" view="/wiki.xhtml" propagation="end"
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
<h:outputText escape="false" value="#{messages['lacewiki.button.Close']}"/>
Deleted: trunk/examples/wiki/view/userInfo_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userInfo_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userInfo_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -1,94 +0,0 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:a="https://ajax4jsf.dev.java.net/ajax"
- xmlns:wiki="http://jboss.com/products/seam/wiki"
- template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
-
-<ui:param name="hideControls" value="#{not s:hasPermission('User', 'isAdmin', currentUser)}"/>
-
-<ui:define name="screenname">
- <h:outputText value="#{messages['lacewiki.label.userInfo.UserInfo']} '#{userHome.instance.username}'"/>
-</ui:define>
-
-<ui:define name="controlTwo">
-
- <s:link id="editUser" styleClass="linkNavigation"
- accesskey="#{messages['lacewiki.button.userInfo.EditAccount.accesskey']}"
- view="/userHome_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}">
- <f:param name="userId" value="#{userHome.instance.id}"/>
- <h:outputText escape="false" value="#{messages['lacewiki.button.userInfo.EditAccount']}"/>
- </s:link>
-
-</ui:define>
-
-<ui:define name="content">
-
- <h:panelGrid columns="2" styleClass="userInfo" cellpadding="0" border="0" cellspacing="0"
- columnClasses="userInfoDetails, userInfoProfile">
-
- <s:div>
-
- <s:div styleClass="box form bottomBorder">
- <s:div styleClass="formHead">
- <h:outputText value="#{messages['lacewiki.label.userInfo.UserInfo']} '#{userHome.instance.username}'"/>
- </s:div>
- <s:div styleClass="formFields formBorder">
-
- <s:div styleClass="entry">
- <s:div styleClass="label">
- <h:outputText value="#{messages['lacewiki.label.userInfo.JoinedOn']}:"/>
- </s:div>
- <s:div styleClass="output">
- <h:outputText value="#{userHome.instance.createdOn}">
- <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
- </h:outputText>
- <h:outputText value=" (#{messages['lacewiki.label.userInfo.NotActivated']})"
- rendered="#{not userHome.instance.admin and not userHome.instance.guest
- and not userHome.instance.activated}"/>
- </s:div>
- </s:div>
-
- <s:div styleClass="entry" rendered="#{not empty userHome.instance.lastLoginOn}">
- <s:div styleClass="label">
- <h:outputText value="#{messages['lacewiki.label.userInfo.LastLoginOn']}:"/>
- </s:div>
- <s:div styleClass="output">
- <h:outputText value="#{userHome.instance.lastLoginOn}">
- <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
- </h:outputText>
- </s:div>
- </s:div>
-
- <s:div styleClass="entry">
- <s:div styleClass="label">
- <h:outputText value="#{messages['lacewiki.label.userInfo.RatingPoints']}:"/>
- </s:div>
- <s:div styleClass="output">
- <h:outputText value="#{userHome.ratingPoints}"/>
- </s:div>
- </s:div>
-
- </s:div>
- </s:div>
-
- </s:div>
-
- <s:div>
- <ui:include src="includes/userInfo.xhtml">
- <ui:param name="user" value="#{userHome.instance}"/>
- </ui:include>
- </s:div>
-
- </h:panelGrid>
-
-</ui:define>
-
-<ui:define name="footer"> </ui:define>
-
-</ui:composition>
Deleted: trunk/examples/wiki/view/userInfo_m.xhtml
===================================================================
--- trunk/examples/wiki/view/userInfo_m.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userInfo_m.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -1,19 +0,0 @@
-<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:wiki="http://jboss.com/products/seam/wiki"
- template="themes/#{preferences.get('Wiki').themeName}/#{skin}/template.xhtml">
-
-<ui:define name="screenname">
- <h:outputText value="#{messages['lacewiki.label.userInfo.UserInfo']}"/>
-</ui:define>
-
-<ui:define name="content">
- <h:outputText value="#{messages['lacewiki.label.userHome.NotAvailableForSkin']}"/>
-</ui:define>
-
-</ui:composition>
Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userList_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -160,7 +160,7 @@
<h:outputText rendered="#{!u.activated}" value=" (#{messages['lacewiki.label.userList.NotActivated']})"/>
<ul>
<li>
- <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(u)}">
+ <h:outputLink value="#{wikiURLRenderer.renderUserProfileURL(u)}">
<h:outputText value="#{messages['lacewiki.label.userList.View']}"/>
</h:outputLink>
</li>
Copied: trunk/examples/wiki/view/userProfile_d.xhtml (from rev 8385, trunk/examples/wiki/view/userInfo_d.xhtml)
===================================================================
--- trunk/examples/wiki/view/userProfile_d.xhtml (rev 0)
+++ trunk/examples/wiki/view/userProfile_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -0,0 +1,47 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:c="http://java.sun.com/jstl/core"
+ template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
+
+<ui:param name="hideControls" value="#{not s:hasPermission('User', 'isAdmin', currentUser)}"/>
+
+<ui:define name="screenname">
+ <h:outputText value="#{messages['lacewiki.label.userProfile.UserProfile']} '#{userHome.instance.username}'"/>
+</ui:define>
+
+<ui:define name="controlTwo">
+
+ <s:link id="editUser" styleClass="linkNavigation"
+ accesskey="#{messages['lacewiki.button.userProfile.EditAccount.accesskey']}"
+ view="/userHome_#{skin}.xhtml" propagation="none"
+ rendered="#{s:hasPermission('User', 'isAdmin', currentUser) or userHome.instance.id == currentUser.id}">
+ <f:param name="userId" value="#{userHome.instance.id}"/>
+ <h:outputText escape="false" value="#{messages['lacewiki.button.userProfile.EditAccount']}"/>
+ </s:link>
+
+</ui:define>
+
+<ui:define name="content">
+
+ <h1 class="documentTitle">
+ <h:outputText value="#{messages['lacewiki.label.userProfile.UserProfile']} '#{userHome.instance.username}'"/>
+ </h1>
+
+ <s:div>
+ <c:forEach var="pm" items="#{pluginRegistry.profilePluginModulesAsList}">
+ <ui:include src="/#{pm.plugin.getPackageDefaultTemplatePath(pm.template)}"/>
+ </c:forEach>
+ </s:div>
+
+</ui:define>
+
+<ui:define name="footer"> </ui:define>
+
+</ui:composition>
Property changes on: trunk/examples/wiki/view/userProfile_d.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/view/userProfile_m.xhtml (from rev 8385, trunk/examples/wiki/view/userInfo_m.xhtml)
===================================================================
--- trunk/examples/wiki/view/userProfile_m.xhtml (rev 0)
+++ trunk/examples/wiki/view/userProfile_m.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -0,0 +1,19 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ template="themes/#{preferences.get('Wiki').themeName}/#{skin}/template.xhtml">
+
+<ui:define name="screenname">
+ <h:outputText value="#{messages['lacewiki.label.userInfo.UserInfo']}"/>
+</ui:define>
+
+<ui:define name="content">
+ <h:outputText value="#{messages['lacewiki.label.userHome.NotAvailableForSkin']}"/>
+</ui:define>
+
+</ui:composition>
Property changes on: trunk/examples/wiki/view/userProfile_m.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
16 years, 6 months
Seam SVN: r8397 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-06-20 01:23:39 -0400 (Fri, 20 Jun 2008)
New Revision: 8397
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Security.xml
Log:
more docs
Modified: trunk/doc/Seam_Reference_Guide/en-US/Security.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-06-20 04:08:36 UTC (rev 8396)
+++ trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-06-20 05:23:39 UTC (rev 8397)
@@ -1031,7 +1031,8 @@
<tgroup cols="2">
<colspec colnum="1" colwidth="2*" />
- <colspec colnum="2" colwidth="3*" />
+ <colspec colnum="2" colwidth="1*" />
+ <colspec colnum="3" colwidth="3*" />
<thead>
<row>
@@ -1039,6 +1040,9 @@
<para>Property</para>
</entry>
<entry align="center">
+ <para>Default</para>
+ </entry>
+ <entry align="center">
<para>Description</para>
</entry>
</row>
@@ -1052,8 +1056,11 @@
</para>
</entry>
<entry>
+ <para><literal>localhost</literal></para>
+ </entry>
+ <entry>
<para>
- The address of the LDAP server, defaults to <literal>localhost</literal>.
+ The address of the LDAP server.
</para>
</entry>
</row>
@@ -1065,8 +1072,11 @@
</para>
</entry>
<entry>
+ <para><literal>389</literal></para>
+ </entry>
+ <entry>
<para>
- The port number that the LDAP server is listening on, defaults to 389.
+ The port number that the LDAP server is listening on.
</para>
</entry>
</row>
@@ -1078,9 +1088,11 @@
</para>
</entry>
<entry>
+ <para><literal>ou=Person,dc=acme,dc=com</literal></para>
+ </entry>
+ <entry>
<para>
- The Distinguished Name (DN) of the context containing user records. The default value is
- "<literal>ou=Person,dc=acme,dc=com</literal>".
+ The Distinguished Name (DN) of the context containing user records.
</para>
</entry>
</row>
@@ -1092,9 +1104,11 @@
</para>
</entry>
<entry>
+ <para><literal>uid=</literal></para>
+ </entry>
+ <entry>
<para>
This value is prefixed to the front of the username to locate the user's record.
- The default value is "<literal>uid=</literal>".
</para>
</entry>
</row>
@@ -1106,12 +1120,289 @@
</para>
</entry>
<entry>
+ <para><literal>,ou=Person,dc=acme,dc=com</literal></para>
+ </entry>
+ <entry>
<para>
- This value is appended to the end of the username to locate the user's record. The default
- value is "<literal>,ou=Person,dc=acme,dc=com</literal>".
+ This value is appended to the end of the username to locate the user's record.
</para>
</entry>
</row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>role-context-DN</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>ou=Role,dc=acme,dc=com</literal></para>
+ </entry>
+ <entry>
+ <para>
+ The DN of the context containing role records.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>role-DN-prefix</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>cn=</literal></para>
+ </entry>
+ <entry>
+ <para>
+ This value is prefixed to the front of the role name to form the DN for locating the
+ role record.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>role-DN-suffix</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>,ou=Roles,dc=acme,dc=com</literal></para>
+ </entry>
+ <entry>
+ <para>
+ This value is appended to the role name to form the DN for locating the role record.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>bind-DN</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>cn=Manager,dc=acme,dc=com</literal></para>
+ </entry>
+ <entry>
+ <para>
+ This is the context used to bind to the LDAP server.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>bind-credentials</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>secret</literal></para>
+ </entry>
+ <entry>
+ <para>
+ These are the credentials (the password) used to bind to the LDAP server.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>user-role-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>roles</literal></para>
+ </entry>
+ <entry>
+ <para>
+ This is the name of the attribute of the user record that contains the list of roles that the
+ user is a member of.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>role-attribute-is-DN</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>true</literal></para>
+ </entry>
+ <entry>
+ <para>
+ This boolean property indicates whether the role attribute of the user record is itself a
+ distinguished name.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>user-name-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>uid</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute of the user record contains the username.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>user-password-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>userPassword</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute of the user record contains the user's password.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>first-name-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>null</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute of the user record contains the user's first name.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>last-name-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>sn</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute of the user record contains the user's last name.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>full-name-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>cn</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute of the user record contains the user's full (common) name.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>enabled-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>null</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute of the user record determines whether the user is enabled.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>role-name-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>cn</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute of the role record contains the name of the role.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>object-class-attribute</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>objectClass</literal></para>
+ </entry>
+ <entry>
+ <para>
+ Indicates which attribute determines the class of an object in the directory.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>role-object-classes</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>organizationalRole</literal></para>
+ </entry>
+ <entry>
+ <para>
+ An array of the object classes that new role records should be created as.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>user-object-classes</literal>
+ </para>
+ </entry>
+ <entry>
+ <para><literal>person,uidObject</literal></para>
+ </entry>
+ <entry>
+ <para>
+ An array of the object classes that new user records should be created as.
+ </para>
+ </entry>
+ </row>
</tbody>
</tgroup>
16 years, 6 months
Seam SVN: r8396 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-06-20 00:08:36 -0400 (Fri, 20 Jun 2008)
New Revision: 8396
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Security.xml
Log:
work in progress
Modified: trunk/doc/Seam_Reference_Guide/en-US/Security.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-06-19 20:14:32 UTC (rev 8395)
+++ trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-06-20 04:08:36 UTC (rev 8396)
@@ -3,82 +3,54 @@
<chapter id="security">
<title>Security</title>
- <para>
- The Seam Security API is an optional Seam feature that provides authentication and authorization features
- for securing both domain and page resources within your Seam project.
- </para>
-
<sect1>
<title>Overview</title>
-
+
<para>
- Seam Security provides two different modes of operation:
+ The Seam Security API provides a multitude of security-related features for your Seam-based application, covering
+ such areas as:
</para>
-
+
<itemizedlist>
<listitem>
<para>
- <emphasis>simplified mode</emphasis> - this mode supports authentication services
- and simple role-based security checks.
+ Authentication - an extensible, JAAS-based authentication layer that allows users to authenticate
+ against any security provider.
</para>
</listitem>
<listitem>
<para>
- <emphasis>advanced mode</emphasis> - this mode supports all the same features as the simplified mode,
- plus it offers rule-based security checks using JBoss Rules.
+ Identity Management - an API for managing a Seam application's users and roles at runtime.
</para>
</listitem>
- </itemizedlist>
-
- <sect2>
- <title>Which mode is right for my application?</title>
-
- <para>
- That all depends on the requirements of your application. If you have minimal security requirements, for example
- if you only wish to restrict certain pages and actions to users who are logged in, or who belong to a certain role,
- then the simplified mode will probably be sufficient. The advantages of this is a more simplified configuration,
- significantly less libraries to include, and a smaller memory footprint.
- </para>
-
- <para>
- If on the other hand, your application requires security checks based on contextual state or complex business rules,
- then you will require the features provided by the advanced mode.
- </para>
- </sect2>
- </sect1>
-
- <sect1>
- <title>Requirements</title>
-
- <para>
- If using the advanced mode features of Seam Security, the following jar files are required to be configured as modules in
- <literal>application.xml</literal>. If you are using Seam Security in simplified mode, these are <emphasis>not</emphasis>
- required:
- </para>
-
- <itemizedlist>
<listitem>
- <para>drools-compiler.jar</para>
+ <para>
+ Authorization - an extremely comprehensive authorization framework, supporting user roles, persistent and
+ rule-based permissions, and a pluggable permission resolver for easily implementing customised security logic.
+ </para>
</listitem>
<listitem>
- <para>drools-core.jar</para>
+ <para>
+ Permission Management - a set of built-in Seam components to allow easy management of an application's
+ security policy.
+ </para>
</listitem>
<listitem>
- <para>janino.jar</para>
+ <para>
+ CAPTCHA support - to assist in the prevention of automated software/scripts abusing your Seam-based site.
+ </para>
</listitem>
<listitem>
- <para>antlr-runtime.jar</para>
+ <para>
+ And much more
+ </para>
</listitem>
- <listitem>
- <para>mvel14.jar</para>
- </listitem>
- </itemizedlist>
-
+ </itemizedlist>
+
<para>
- For web-based security, <literal>jboss-seam-ui.jar</literal> must also be included in the application's war file.
- </para>
+ This chapter will cover each of these features in detail.
+ </para>
-
</sect1>
<sect1>
@@ -105,7 +77,7 @@
</listitem>
</itemizedlist>
</sect1>
-
+
<sect1>
<title>Authentication</title>
@@ -114,17 +86,22 @@
and as such provide a robust and highly configurable API for handling user authentication. However, for less complex
authentication requirements Seam offers a much more simplified method of authentication that hides the complexity of JAAS.
</para>
-
+
<sect2>
- <title>Configuration</title>
+ <title>Configuring an Authenticator component</title>
+ <note>
+ If you use Seam's Identity Management features (discussed later in this chapter) then it is not necessary to create
+ an authenticator component (and you can skip this section).
+ </note>
+
<para>
- The simplified authentication method uses a built-in JAAS login module, <literal>SeamLoginModule</literal>, which
+ The simplified authentication method provided by Seam uses a built-in JAAS login module, <literal>SeamLoginModule</literal>, which
delegates authentication to one of your own Seam components. This login module is already configured inside Seam as
part of a default application policy and as such does not require any additional configuration files. It allows you to
- write an authentication method using the entity classes that are provided by your own application. Configuring this
- simplified form of authentication requires the <literal>identity</literal> component to be configured in
- <literal>components.xml</literal>:
+ write an authentication method using the entity classes that are provided by your own application, or alternatively to
+ authenticate against some other third party provider. Configuring this simplified form of authentication requires the
+ <literal>identity</literal> component to be configured in <literal>components.xml</literal>:
</para>
<programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
@@ -140,12 +117,6 @@
</components>]]></programlisting>
<para>
- If you wish to use the advanced security features such as rule-based permission checks, all you need
- to do is include the Drools (JBoss Rules) jars in your classpath, and add some additional configuration,
- described later.
- </para>
-
- <para>
The EL expression <literal>#{authenticator.authenticate}</literal> is a method binding indicating that
the <literal>authenticate</literal> method of the <literal>authenticator</literal> component will be used
to authenticate the user.
@@ -161,29 +132,31 @@
<literal>components.xml</literal> specifies which method will be used by <literal>SeamLoginModule</literal>
to authenticate users. This method takes no parameters, and is expected to return a boolean indicating
whether authentication is successful or not. The user's username and password can be obtained from
- <literal>Identity.instance().getUsername()</literal> and <literal>Identity.instance().getPassword()</literal>,
+ <literal>Credentials.getUsername()</literal> and <literal>Credentials.getPassword()</literal>,
respectively. Any roles that the user is a member of should be assigned using
- <literal>Identity.instance().addRole()</literal>. Here's a complete example of an authentication method
- inside a JavaBean component:
+ <literal>Identity.addRole()</literal>. Here's a complete example of an authentication method
+ inside a POJO component:
</para>
<programlisting role="JAVA"><![CDATA[@Name("authenticator")
public class Authenticator {
@In EntityManager entityManager;
+ @In Credentials credentials;
+ @In Identity identity;
public boolean authenticate() {
try
{
User user = (User) entityManager.createQuery(
"from User where username = :username and password = :password")
- .setParameter("username", Identity.instance().getUsername())
- .setParameter("password", Identity.instance().getPassword())
+ .setParameter("username", credentials.getUsername())
+ .setParameter("password", credentials.getPassword())
.getSingleResult();
if (user.getRoles() != null)
{
for (UserRole mr : user.getRoles())
- Identity.instance().addRole(mr.getName());
+ identity.addRole(mr.getName());
}
return true;
@@ -204,6 +177,16 @@
In this case, if the user record is not found and a <literal>NoResultException</literal> thrown, the
authentication method returns <literal>false</literal> to indicate the authentication failed.
</para>
+
+ <note>
+ When writing an authenticator method, it is important that it is kept minimal and free from
+ any side-effects. This is because there is no guarantee as to how many times the authenticator
+ method will be called by the security API, and as such it may be invoked multiple times during
+ a single request. Because of this, any special code that should execute upon a successful or
+ failed authentication should be written by implementing an event observer. See the section on
+ Security Events further down in this chapter for more information about which events are
+ raised by Seam Security.
+ </note>
<sect3>
<title>Identity.addRole()</title>
@@ -227,24 +210,19 @@
<imagedata fileref="images/security-addrole.png" align="center"/>
</imageobject>
</mediaobject>
+
+ <para>
+ If the current session is already authenticated, then calling <literal>Identity.addRole()</literal> will
+ have the expected effect of immediate granting the current user the specified role.
+ </para>
</sect3>
<sect3>
- <title>Special Considerations</title>
+ <title>Writing an event observers for security-related events</title>
<para>
- When writing an authenticator method, it is important that it is kept minimal and free from
- any side-effects. This is because there is no guarantee as to how many times the authenticator
- method will be called by the security API, and as such it may be invoked multiple times during
- a single request. Because of this, any special code that should execute upon a successful or
- failed authentication should be written by implementing an event observer. See the section on
- Security Events further down in this chapter for more information about which events are
- raised by Seam Security.
- </para>
-
- <para>
- To give an example, let's say that upon a successful login that some user statistics must be
+ Let's say for example that upon a successful login that some user statistics must be
updated. We would do this by writing an event observer for the
<literal>org.jboss.seam.security.loginSuccessful</literal> event, like this:
</para>
@@ -257,6 +235,11 @@
userStats.setLastLoginDate(new Date());
userStats.incrementLoginCount();
}]]></programlisting>
+
+ <para>
+ This observer method can be placed anywhere, even in the Authenticator component itself.
+ You can find more information about security-related events later in this chapter.
+ </para>
</sect3>
</sect2>
@@ -265,21 +248,21 @@
<title>Writing a login form</title>
<para>
- The <literal>Identity</literal> component provides both <literal>username</literal> and <literal>password</literal>
+ The <literal>credentials</literal> component provides both <literal>username</literal> and <literal>password</literal>
properties, catering for the most common authentication scenario. These properties can be bound directly to the
- username and password fields on a login form. Once these properties are set, calling the
- <literal>identity.login()</literal> method will authenticate the user using the provided credentials.
+ username and password fields on a login form. Once these properties are set, calling
+ <literal>identity.login()</literal> will authenticate the user using the provided credentials.
Here's an example of a simple login form:
</para>
<programlisting role="XHTML"><![CDATA[<div>
<h:outputLabel for="name" value="Username"/>
- <h:inputText id="name" value="#{identity.username}"/>
+ <h:inputText id="name" value="#{credentials.username}"/>
</div>
<div>
<h:outputLabel for="password" value="Password"/>
- <h:inputSecret id="password" value="#{identity.password}"/>
+ <h:inputSecret id="password" value="#{credentials.password}"/>
</div>
<div>
@@ -288,13 +271,13 @@
<para>
Similarly, logging out the user is done by calling <literal>#{identity.logout}</literal>. Calling this
- action will clear the security state of the currently authenticated user.
+ action will clear the security state of the currently authenticated user, and invalidate the user's session.
</para>
</sect2>
<sect2>
- <title>Simplified Configuration - Summary</title>
+ <title>Configuration Summary</title>
<para>
So to sum up, there are the three easy steps to configure authentication:
</para>
@@ -509,9 +492,653 @@
itself using the configured JAAS security policy.
</para>
</sect3>
+ </sect2>
+ </sect1>
+
+ <sect1>
+ <title>Identity Management</title>
+
+ <para>
+ Identity Management provides a standard API for the management of a Seam application's users and roles,
+ regardless of which identity store (database, LDAP, etc) is used on the backend. At the center
+ of the Identity Management API is the <literal>identityManager</literal> component, which provides
+ all the methods for creating, modifying and deleting users, granting and revoking roles, changing passwords,
+ enabling and disabling user accounts, authenticating users and listing users and roles.
+ </para>
+
+ <sect2>
+ <title>Configuring IdentityManager</title>
+
+ <para>
+ The <literal>identityManager</literal> component allows for separate identity stores to be configured
+ for authentication and authorization operations. This means that it is possible for users to
+ be authenticated against one identity store, for example an LDAP directory, yet have their roles
+ loaded from another identity store, such as a relational database.
+ </para>
+
+ <para>
+ Seam provides two <literal>IdentityStore</literal> implementations out of the box;
+ <literal>JpaIdentityStore</literal> uses a relational database to store user and role information,
+ and is the default identity store that is used if nothing is explicitly configured in the
+ <literal>identityManager</literal> component. The other implementation that is provided is
+ <literal>LdapIdentityStore</literal>, which uses an LDAP directory to store users and roles.
+ </para>
+
+ <para>
+ There are two configurable properties for the <literal>identityManager</literal> component -
+ <literal>identityStore</literal> and <literal>roleIdentityStore</literal>. The value for these
+ properties must be an EL expression referring to a Seam component implementing the
+ <literal>IdentityStore</literal> interface. As already mentioned,
+ if left unconfigured then <literal>JpaIdentityStore</literal> will be assumed by default. If
+ only the <literal>identityStore</literal> property is configured, then the same value will be used for
+ <literal>roleIdentityStore</literal> also. For example, the following entry in
+ <literal>components.xml</literal> will configure <literal>identityManager</literal> to use
+ an <literal>LdapIdentityStore</literal> for both user-related and role-related operations:
+ </para>
+ <programlisting><![CDATA[
+ <security:identity-manager identity-store="#{ldapIdentityStore}"/>
+ ]]></programlisting>
+
+ <para>
+ The following example configures <literal>identityManager</literal> to use an <literal>LdapIdentityStore</literal>
+ for user-related operations, and <literal>JpaIdentityStore</literal> for role-related operations:
+ </para>
+
+ <programlisting><![CDATA[
+ <security:identity-manager
+ identity-store="#{ldapIdentityStore}"
+ role-identity-store="#{jpaIdentityStore}"/>
+ ]]></programlisting>
+
+ <para>
+ The following sections explain both of these identity store implementations in greater detail.
+ </para>
+
</sect2>
+
+ <sect2>
+ <title>JpaIdentityStore</title>
+
+ <para>
+ This identity store allows for users and roles to be stored inside a relational database. It is designed
+ to be as unrestrictive as possible in regards to database schema design, allowing a great deal of
+ flexibility in the underlying table structure. This is achieved through the use of a set of special
+ annotations, allowing entity beans to be configured to store user and role records.
+ </para>
+
+ <sect3>
+ <title>Configuring JpaIdentityStore</title>
+
+ <para>
+ <literal>JpaIdentityStore</literal> requires that both the <literal>user-class</literal> and
+ <literal>role-class</literal> properties are configured. These properties should refer to the
+ entity classes that are to be used to store both user and role records, respectively. The following
+ example shows the configuration from <literal>components.xml</literal> in the SeamSpace example:
+ </para>
+
+ <programlisting><![CDATA[
+ <security:jpa-identity-store
+ user-class="org.jboss.seam.example.seamspace.MemberAccount"
+ role-class="org.jboss.seam.example.seamspace.MemberRole"/>
+ ]]></programlisting>
+
+ </sect3>
+
+ <sect3>
+ <title>Configuring the Entities</title>
+
+ <para>
+ As already mentioned, a set of special annotations are used to configure entity beans for storing
+ users and roles. The following table lists each of the annotations, and their descriptions.
+ </para>
+
+ <table>
+ <title>User Entity Annotations</title>
+
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2*" />
+ <colspec colnum="2" colwidth="1*" />
+ <colspec colnum="3" colwidth="3*" />
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Annotation</para>
+ </entry>
+ <entry align="center">
+ <para>Status</para>
+ </entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <literal>@UserPrincipal</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Required</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the user's username.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>@UserPassword</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Required</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the user's password. It allows a <literal>hash</literal>
+ algorithm to be specified for password hashing. Possible values for <literal>hash</literal> are
+ <literal>md5</literal> and <literal>sha</literal>. E.g:
+
+ <programlisting><![CDATA[@UserPassword(hash = "md5")
+public String getPasswordHash() {
+ return passwordHash;
+}]]></programlisting>
+
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>@UserFirstName</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Optional</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the user's first name.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>@UserLastName</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Optional</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the user's last name.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>@UserEnabled</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Optional</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the enabled status of the user. This should be a boolean
+ property, and if not present then all user accounts are assumed to be enabled.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>@UserRoles</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Required</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the roles of the user. This property will be described in
+ more detail further down.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Role Entity Annotations</title>
+
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2*" />
+ <colspec colnum="2" colwidth="1*" />
+ <colspec colnum="3" colwidth="3*" />
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Annotation</para>
+ </entry>
+ <entry align="center">
+ <para>Status</para>
+ </entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <literal>@RoleName</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Required</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the name of the role.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>@RoleGroups</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Optional</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method containing the group memberships of the role.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>@RoleConditional</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>Optional</para>
+ </entry>
+ <entry>
+ <para>
+ This annotation marks the field or method indicating whether the role is conditional or not.
+ Conditional roles are explained later in this chapter.
+ </para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect3>
+
+ <sect3>
+ <title>Entity Bean Examples</title>
+
+ <para>
+ As mentioned previously, <literal>JpaIdentityStore</literal> is designed to be as flexible as possible when
+ it comes to the database schema design of your user and role tables. This section looks at a number of
+ possible database schemas that can be used to store user and role records.
+ </para>
+
+ <sect4>
+ <title>Minimal schema example</title>
+
+ <para>
+ In this bare minimal example, a simple user and role table are linked via a
+ many-to-many relationship using a cross-reference table named <literal>UserRoles</literal>.
+ </para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/security-entities-1.png" align="center" scalefit="1"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="images/security-entities-1.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <programlisting><![CDATA[@Entity
+public class User {
+ private Integer userId;
+ private String username;
+ private String passwordHash;
+ private Set<Role> roles;
+
+ @Id @GeneratedValue
+ public Integer getUserId() { return userId; }
+ public void setUserId(Integer userId) { this.userId = userId; }
+
+ @UserPrincipal
+ public String getUsername() { return username; }
+ public void setUsername(String username) { this.username = username; }
+
+ @UserPassword(hash = "md5")
+ public String getPasswordHash() { return passwordHash; }
+ public void setPasswordHash(String passwordHash) { this.passwordHash = passwordHash; }
+
+ @UserRoles
+ @ManyToMany(targetEntity = Role.class)
+ @JoinTable(name = "UserRoles",
+ joinColumns = @JoinColumn(name = "UserId"),
+ inverseJoinColumns = @JoinColumn(name = "RoleId"))
+ public Set<Role> getRoles() { return roles; }
+ public void setRoles(Set<Role> roles) { this.roles = roles; }
+}]]></programlisting>
+<programlisting><![CDATA[@Entity
+public class Role {
+ private Integer roleId;
+ private String rolename;
+
+ @Id @Generated
+ public Integer getRoleId() { return roleId; }
+ public void setRoleId(Integer roleId) { this.roleId = roleId; }
+
+ @RoleName
+ public String getRolename() { return rolename; }
+ public void setRolename(String rolename) { this.rolename = rolename; }
+}]]></programlisting>
+ </sect4>
+
+ <sect4>
+ <title>Complex Schema Example</title>
+
+ <para>
+ This example builds on the above minimal example by including all of the optional fields, and allowing
+ group memberships for roles.
+ </para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/security-entities-2.png" align="center" scalefit="1"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="images/security-entities-2.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <programlisting><![CDATA[@Entity
+public class User {
+ private Integer userId;
+ private String username;
+ private String passwordHash;
+ private Set<Role> roles;
+ private String firstname;
+ private String lastname;
+ private boolean enabled;
+
+ @Id @GeneratedValue
+ public Integer getUserId() { return userId; }
+ public void setUserId(Integer userId) { this.userId = userId; }
+
+ @UserPrincipal
+ public String getUsername() { return username; }
+ public void setUsername(String username) { this.username = username; }
+
+ @UserPassword(hash = "md5")
+ public String getPasswordHash() { return passwordHash; }
+ public void setPasswordHash(String passwordHash) { this.passwordHash = passwordHash; }
+
+ @UserFirstName
+ public String getFirstname() { return firstname; }
+ public void setFirstname(String firstname) { this.firstname = firstname; }
+
+ @UserLastName
+ public String getLastname() { return lastname; }
+ public void setLastname(String lastname) { this.lastname = lastname; }
+
+ @UserEnabled
+ public boolean isEnabled() { return enabled; }
+ public void setEnabled(boolean enabled) { this.enabled = enabled; }
+
+ @UserRoles
+ @ManyToMany(targetEntity = Role.class)
+ @JoinTable(name = "UserRoles",
+ joinColumns = @JoinColumn(name = "UserId"),
+ inverseJoinColumns = @JoinColumn(name = "RoleId"))
+ public Set<Role> getRoles() { return roles; }
+ public void setRoles(Set<Role> roles) { this.roles = roles; }
+}]]></programlisting>
+<programlisting><![CDATA[@Entity
+public class Role {
+ private Integer roleId;
+ private String rolename;
+ private boolean conditional;
+
+ @Id @Generated
+ public Integer getRoleId() { return roleId; }
+ public void setRoleId(Integer roleId) { this.roleId = roleId; }
+
+ @RoleName
+ public String getRolename() { return rolename; }
+ public void setRolename(String rolename) { this.rolename = rolename; }
+
+ @RoleConditional
+ public boolean isConditional() { return conditional; }
+ public void setConditional(boolean conditional) { this.conditional = conditional; }
+
+ @RoleGroups
+ @ManyToMany(targetEntity = Role.class)
+ @JoinTable(name = "RoleGroups",
+ joinColumns = @JoinColumn(name = "RoleId"),
+ inverseJoinColumns = @JoinColumn(name = "GroupId"))
+ public Set<Role> getGroups() { return groups; }
+ public void setGroups(Set<Role> groups) { this.groups = groups; }
+
+}]]></programlisting>
+ </sect4>
+
+ </sect3>
+
+ <sect3>
+ <title>JpaIdentityStore Events</title>
+
+ <para>
+ When using <literal>JpaIdentityStore</literal> as the identity store implementation with <literal>IdentityManager</literal>,
+ a few events are raised as a result of invoking certain <literal>IdentityManager</literal> methods.
+ </para>
+
+ <sect4>
+ <title>JpaIdentityStore.EVENT_PRE_PERSIST_USER</title>
+
+ <para>
+ This event is raised in response to calling <literal>IdentityManager.createUser()</literal>. Just before the user
+ entity is persisted to the database, this event will be raised passing the entity instance as an event parameter.
+ The entity will be an instance of the <literal>user-class</literal> configured for <literal>JpaIdentityStore</literal>.
+ </para>
+
+ <para>
+ Writing an observer for this event may be useful for setting additional field values on the entity, which aren't set
+ as part of the standard <literal>createUser()</literal> functionality.
+ </para>
+ </sect4>
+
+ <sect4>
+ <title>JpaIdentityStore.EVENT_USER_CREATED</title>
+
+ <para>
+ This event is also raised in response to calling <literal>IdentityManager.createUser()</literal>. However, it is
+ raised after the user entity has already been persisted to the database. Like the <literal>EVENT_PRE_PERSIST_USER</literal>
+ event, it also passes the entity instance as an event parameter. It may be useful to observe this event if you also
+ need to persist other entities that reference the user entity, for example contact detail records or other user-specific
+ data.
+ </para>
+ </sect4>
+
+ <sect4>
+ <title>JpaIdentityStore.EVENT_USER_AUTHENTICATED</title>
+
+ <para>
+ This event is raised when calling <literal>IdentityManager.authenticate()</literal>. It passes the user entity instance
+ as the event parameter, and is useful for reading additional properties from the user entity that is being authenticated.
+ </para>
+ </sect4>
+ </sect3>
+
+ </sect2>
+
+ <sect2>
+ <title>LdapIdentityStore</title>
+
+ <para>
+ This identity store implementation is designed for working with user records stored in an LDAP directory. It is very
+ highly configurable, allowing great flexibility in how both users and roles are stored in the directory. The following
+ sections describe the configuration options for this identity store, and provide some configuration examples.
+ </para>
+
+ <sect3>
+ <title>Configuring LdapIdentityStore</title>
+
+ <para>
+ The following table describes the available properties that can be configured in <literal>components.xml</literal> for
+ <literal>LdapIdentityStore</literal>.
+ </para>
+
+ <table>
+ <title>LdapIdentityStore Configuration Properties</title>
+
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="2*" />
+ <colspec colnum="2" colwidth="3*" />
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Property</para>
+ </entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <literal>server-address</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ The address of the LDAP server, defaults to <literal>localhost</literal>.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>server-port</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ The port number that the LDAP server is listening on, defaults to 389.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>user-context-DN</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ The Distinguished Name (DN) of the context containing user records. The default value is
+ "<literal>ou=Person,dc=acme,dc=com</literal>".
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>user-DN-prefix</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ This value is prefixed to the front of the username to locate the user's record.
+ The default value is "<literal>uid=</literal>".
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>user-DN-suffix</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ This value is appended to the end of the username to locate the user's record. The default
+ value is "<literal>,ou=Person,dc=acme,dc=com</literal>".
+ </para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </sect3>
+ </sect2>
+
+ <sect2>
+ <title>Writing your own IdentityStore implementation</title>
+
+ <para>
+
+ </para>
+ </sect2>
+
+ <sect2>
+ <title>Authentication with Identity Management</title>
+
+ <para>
+ If you are using the Identity Management features in your Seam application, then it is not required
+ to provide an authenticator component (see previous Authentication section) to enable authentication.
+ Simply omit the <literal>authenticator-method</literal> from the <literal>identity</literal> configuration
+ in <literal>components.xml</literal>, and the <literal>SeamLoginModule</literal> will by default
+ use <literal>IdentityManager</literal> to authenticate your application's users, without any special
+ configuration required.
+ </para>
+ </sect2>
</sect1>
<sect1>
@@ -1028,7 +1655,46 @@
</sect3>
</sect2>
+
+ <sect2>
+ <title>Rule-based Permissions</title>
+
+ <sect3>
+ <title>Configuration</title>
+
+ </sect3>
+
+ <sect3>
+ <title>Requirements</title>
+
+ <para>
+ If using the rule-based permission features provided by Seam Security, the following jar files are required to be
+ distributed with your project:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>drools-compiler.jar</para>
+ </listitem>
+ <listitem>
+ <para>drools-core.jar</para>
+ </listitem>
+ <listitem>
+ <para>janino.jar</para>
+ </listitem>
+ <listitem>
+ <para>antlr-runtime.jar</para>
+ </listitem>
+ <listitem>
+ <para>mvel14.jar</para>
+ </listitem>
+ </itemizedlist>
+
+ </sect3>
+
+ </sect2>
+
</sect1>
<sect1>
@@ -1666,7 +2332,7 @@
<imagedata fileref="images/security-identitymanager.png" align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../shared/images/security-identitymanager.png" align="center"/>
+ <imagedata fileref="images/security-identitymanager.png" align="center"/>
</imageobject>
</mediaobject>
@@ -1702,7 +2368,7 @@
<imagedata fileref="images/security-useraccount.png" align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../shared/images/security-useraccount.png" align="center"/>
+ <imagedata fileref="images/security-useraccount.png" align="center"/>
</imageobject>
</mediaobject>
@@ -1715,7 +2381,7 @@
<imagedata fileref="images/security-useraccountschema.png" align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../shared/images/security-useraccountschema.png" align="center"/>
+ <imagedata fileref="images/security-useraccountschema.png" align="center"/>
</imageobject>
</mediaobject>
@@ -2515,7 +3181,7 @@
<imagedata fileref="images/security-usermanager1.png" align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../shared/images/security-usermanager1.png" align="center"/>
+ <imagedata fileref="images/security-usermanager1.png" align="center"/>
</imageobject>
</mediaobject>
@@ -2528,7 +3194,7 @@
<imagedata fileref="images/security-usermanager2.png" align="center"/>
</imageobject>
<imageobject role="html">
- <imagedata fileref="../shared/images/security-usermanager2.png" align="center"/>
+ <imagedata fileref="images/security-usermanager2.png" align="center"/>
</imageobject>
</mediaobject>
16 years, 6 months
Seam SVN: r8395 - trunk/src/main/org/jboss/seam/jsf.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-06-19 16:14:32 -0400 (Thu, 19 Jun 2008)
New Revision: 8395
Modified:
trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
Log:
JBSEAM-3063
Modified: trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-06-19 17:17:59 UTC (rev 8394)
+++ trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-06-19 20:14:32 UTC (rev 8395)
@@ -596,22 +596,23 @@
}
void commitOrRollback(PhaseId phaseId)
- {
- try
- {
- if ( Transaction.instance().isActive() )
- {
- log.debug("committing transaction after phase: " + phaseId);
- Transaction.instance().commit();
- }
- else if ( Transaction.instance().isRolledBackOrMarkedRollback() )
- {
+ {
+ try {
+ if (Transaction.instance().isActive()) {
+ try {
+ log.debug("committing transaction after phase: " + phaseId);
+ Transaction.instance().commit();
+
+ } catch (IllegalStateException e) {
+ log.warn("TX commit failed with illegal state exception. This may be " +
+ "because the tx timed out and was rolled back in the background.", e);
+ }
+ } else if ( Transaction.instance().isRolledBackOrMarkedRollback()) {
log.debug("rolling back transaction after phase: " + phaseId);
Transaction.instance().rollback();
}
- }
- catch (Exception e)
- {
+
+ } catch (Exception e) {
throw new IllegalStateException("Could not commit transaction", e);
}
}
16 years, 6 months
Seam SVN: r8394 - trunk/seam-gen/icefaces/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-06-19 13:17:59 -0400 (Thu, 19 Jun 2008)
New Revision: 8394
Modified:
trunk/seam-gen/icefaces/resources/WEB-INF/web.xml
Log:
undefined ROLE name leads to erronous log message (aligning with RichFaces version)
Modified: trunk/seam-gen/icefaces/resources/WEB-INF/web.xml
===================================================================
--- trunk/seam-gen/icefaces/resources/WEB-INF/web.xml 2008-06-19 17:17:20 UTC (rev 8393)
+++ trunk/seam-gen/icefaces/resources/WEB-INF/web.xml 2008-06-19 17:17:59 UTC (rev 8394)
@@ -114,15 +114,12 @@
</servlet-mapping>
<security-constraint>
- <display-name>Restrict raw XHTML Documents</display-name>
- <web-resource-collection>
- <web-resource-name>XHTML</web-resource-name>
- <url-pattern>*.xhtml</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>NONE</role-name>
- </auth-constraint>
+ <display-name>Restrict raw XHTML Documents</display-name>
+ <web-resource-collection>
+ <web-resource-name>XHTML</web-resource-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </web-resource-collection>
+ <auth-constraint/>
</security-constraint>
</web-app>
-
16 years, 6 months
Seam SVN: r8393 - branches/Seam_2_0/seam-gen/icefaces/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-06-19 13:17:20 -0400 (Thu, 19 Jun 2008)
New Revision: 8393
Modified:
branches/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/web.xml
Log:
undefined ROLE name leads to erronous log message (aligning with RichFaces version)
Modified: branches/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/web.xml
===================================================================
--- branches/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/web.xml 2008-06-19 17:15:55 UTC (rev 8392)
+++ branches/Seam_2_0/seam-gen/icefaces/resources/WEB-INF/web.xml 2008-06-19 17:17:20 UTC (rev 8393)
@@ -119,10 +119,7 @@
<web-resource-name>XHTML</web-resource-name>
<url-pattern>*.xhtml</url-pattern>
</web-resource-collection>
- <auth-constraint>
- <role-name>NONE</role-name>
- </auth-constraint>
+ <auth-constraint/>
</security-constraint>
</web-app>
-
16 years, 6 months
Seam SVN: r8392 - trunk/seam-gen/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-06-19 13:15:55 -0400 (Thu, 19 Jun 2008)
New Revision: 8392
Modified:
trunk/seam-gen/resources/WEB-INF/web.xml
Log:
whitespace
Modified: trunk/seam-gen/resources/WEB-INF/web.xml
===================================================================
--- trunk/seam-gen/resources/WEB-INF/web.xml 2008-06-19 17:15:23 UTC (rev 8391)
+++ trunk/seam-gen/resources/WEB-INF/web.xml 2008-06-19 17:15:55 UTC (rev 8392)
@@ -63,14 +63,12 @@
</servlet-mapping>
<security-constraint>
- <display-name>Restrict raw XHTML Documents</display-name>
- <web-resource-collection>
- <web-resource-name>XHTML</web-resource-name>
- <url-pattern>*.xhtml</url-pattern>
- </web-resource-collection>
- <auth-constraint/>
+ <display-name>Restrict raw XHTML Documents</display-name>
+ <web-resource-collection>
+ <web-resource-name>XHTML</web-resource-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </web-resource-collection>
+ <auth-constraint/>
</security-constraint>
-
-
</web-app>
16 years, 6 months
Seam SVN: r8391 - branches/Seam_2_0/seam-gen/resources/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-06-19 13:15:23 -0400 (Thu, 19 Jun 2008)
New Revision: 8391
Modified:
branches/Seam_2_0/seam-gen/resources/WEB-INF/web.xml
Log:
whitespace
Modified: branches/Seam_2_0/seam-gen/resources/WEB-INF/web.xml
===================================================================
--- branches/Seam_2_0/seam-gen/resources/WEB-INF/web.xml 2008-06-19 17:14:43 UTC (rev 8390)
+++ branches/Seam_2_0/seam-gen/resources/WEB-INF/web.xml 2008-06-19 17:15:23 UTC (rev 8391)
@@ -63,14 +63,12 @@
</servlet-mapping>
<security-constraint>
- <display-name>Restrict raw XHTML Documents</display-name>
- <web-resource-collection>
- <web-resource-name>XHTML</web-resource-name>
- <url-pattern>*.xhtml</url-pattern>
- </web-resource-collection>
- <auth-constraint/>
+ <display-name>Restrict raw XHTML Documents</display-name>
+ <web-resource-collection>
+ <web-resource-name>XHTML</web-resource-name>
+ <url-pattern>*.xhtml</url-pattern>
+ </web-resource-collection>
+ <auth-constraint/>
</security-constraint>
-
-
</web-app>
16 years, 6 months
Seam SVN: r8390 - branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/facelet.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-06-19 13:14:43 -0400 (Thu, 19 Jun 2008)
New Revision: 8390
Modified:
branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsRenderer.java
Log:
requires MockApplication when running disconnected from FacesContext
Modified: branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsRenderer.java
===================================================================
--- branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsRenderer.java 2008-06-19 17:13:15 UTC (rev 8389)
+++ branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsRenderer.java 2008-06-19 17:14:43 UTC (rev 8390)
@@ -19,6 +19,7 @@
import org.jboss.seam.core.ResourceLoader;
import org.jboss.seam.faces.Renderer;
import org.jboss.seam.mock.MockExternalContext;
+import org.jboss.seam.mock.MockApplication;
import org.jboss.seam.mock.MockFacesContext;
import org.jboss.seam.ui.util.JSF;
@@ -93,7 +94,7 @@
// If a FacesContext isn't available, set one up
if (FacesContext.getCurrentInstance() == null)
{
- MockFacesContext mockFacesContext = new MockFacesContext(new MockExternalContext())
+ MockFacesContext mockFacesContext = new MockFacesContext(new MockExternalContext(), new MockApplication())
.setCurrent();
mockFacesContext.createViewRoot();
}
16 years, 6 months