Seam SVN: r8150 - in trunk/src/main/org/jboss/seam: security/permission and 1 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-05-10 09:33:34 -0400 (Sat, 10 May 2008)
New Revision: 8150
Modified:
trunk/src/main/org/jboss/seam/annotations/security/permission/Permission.java
trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java
trunk/src/main/org/jboss/seam/security/permission/PermissionMetadata.java
trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java
Log:
made bulk permission updates way more efficient
Modified: trunk/src/main/org/jboss/seam/annotations/security/permission/Permission.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/permission/Permission.java 2008-05-10 02:39:00 UTC (rev 8149)
+++ trunk/src/main/org/jboss/seam/annotations/security/permission/Permission.java 2008-05-10 13:33:34 UTC (rev 8150)
@@ -21,5 +21,5 @@
public @interface Permission
{
String action();
- long mask() default 0;
+ long mask() default 0L;
}
Modified: trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java 2008-05-10 02:39:00 UTC (rev 8149)
+++ trunk/src/main/org/jboss/seam/security/permission/JpaPermissionStore.java 2008-05-10 13:33:34 UTC (rev 8150)
@@ -9,6 +9,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
@@ -33,6 +34,7 @@
import org.jboss.seam.security.SimplePrincipal;
import org.jboss.seam.security.management.JpaIdentityStore;
import org.jboss.seam.util.AnnotatedBeanProperty;
+import org.jboss.seam.security.permission.PermissionMetadata.ActionSet;
/**
* A permission store implementation that uses JPA as its persistence mechanism.
@@ -154,15 +156,13 @@
}
}
- protected Query createPermissionQuery(Object target, String action, Principal recipient,
- Discrimination discrimination)
+ protected Query createPermissionQuery(Object target, Principal recipient, Discrimination discrimination)
{
int queryKey = ((target != null) ? 1 : 0);
- queryKey |= (action != null ? 2 : 0);
- queryKey |= (recipient != null ? 4 : 0);
- queryKey |= (discrimination.equals(Discrimination.user) ? 8 : 0);
- queryKey |= (discrimination.equals(Discrimination.role) ? 16 : 0);
- queryKey |= (discrimination.equals(Discrimination.either) ? 32 : 0);
+ queryKey |= (recipient != null ? 2 : 0);
+ queryKey |= (discrimination.equals(Discrimination.user) ? 4 : 0);
+ queryKey |= (discrimination.equals(Discrimination.role) ? 8 : 0);
+ queryKey |= (discrimination.equals(Discrimination.either) ? 16 : 0);
boolean isRole = discrimination.equals(Discrimination.role) && rolePermissionClass != null;
@@ -183,14 +183,6 @@
conditionsAdded = true;
}
- if (action != null)
- {
- q.append(conditionsAdded ? " and " : " where ");
- q.append(isRole ? roleActionProperty.getName() : actionProperty.getName());
- q.append(" = :action");
- conditionsAdded = true;
- }
-
if (recipient != null)
{
q.append(conditionsAdded ? " and " : " where ");
@@ -214,7 +206,6 @@
Query query = lookupEntityManager().createQuery(queryCache.get(queryKey));
if (target != null) query.setParameter("target", identifierPolicy.getIdentifier(target));
- if (action != null) query.setParameter("action", action);
if (recipient != null) query.setParameter("recipient", resolvePrincipal(recipient));
if (!discrimination.equals(Discrimination.either) && discriminatorProperty != null)
@@ -228,19 +219,98 @@
public boolean grantPermission(Permission permission)
{
- boolean recipientIsRole = permission.getRecipient() instanceof Role;
+ return updatePermissionActions(permission.getTarget(), permission.getRecipient(),
+ new String[] {permission.getAction()}, true);
+ }
+
+ public boolean revokePermission(Permission permission)
+ {
+ return updatePermissionActions(permission.getTarget(), permission.getRecipient(),
+ new String[] { permission.getAction() }, false);
+ }
+ /**
+ * This is where the bulk of the actual work happens.
+ *
+ * @param target The target object to update permissions for
+ * @param recipient The recipient to update permissions for
+ * @param actions The actions that will be updated
+ * @param set true if the specified actions are to be granted, false if they are to be revoked
+ * @return true if the operation is successful
+ */
+ protected boolean updatePermissionActions(Object target, Principal recipient, String[] actions,
+ boolean set)
+ {
+ boolean recipientIsRole = recipient instanceof Role;
+
try
{
if (recipientIsRole)
{
if (rolePermissionClass != null)
{
- Object instance = rolePermissionClass.newInstance();
- roleTargetProperty.setValue(instance, identifierPolicy.getIdentifier(permission.getTarget()));
- roleActionProperty.setValue(instance, permission.getAction());
- roleProperty.setValue(instance, permission.getRecipient().getName());
- lookupEntityManager().persist(instance);
+ List permissions = createPermissionQuery(target, recipient, Discrimination.role).getResultList();
+
+ if (permissions.isEmpty())
+ {
+ if (!set) return true;
+
+ ActionSet actionSet = metadata.createActionSet(target.getClass(), null);
+ for (String action : actions)
+ {
+ actionSet.add(action);
+ }
+
+ Object instance = rolePermissionClass.newInstance();
+ roleTargetProperty.setValue(instance, identifierPolicy.getIdentifier(target));
+ roleActionProperty.setValue(instance, actionSet.toString());
+ roleProperty.setValue(instance, resolvePrincipal(recipient));
+ lookupEntityManager().persist(instance);
+ return true;
+ }
+
+ Object instance = permissions.get(0);
+
+ ActionSet actionSet = metadata.createActionSet(target.getClass(),
+ roleActionProperty.getValue(instance).toString());
+
+ for (String action : actions)
+ {
+ if (set)
+ {
+ actionSet.add(action);
+ }
+ else
+ {
+ actionSet.remove(action);
+ }
+ }
+
+ if (permissions.size() > 1)
+ {
+ // This is where it gets a little messy.. if there is more than one permission
+ // record, then we need to consolidate them all into just the first one
+ for (Object p : permissions)
+ {
+ actionSet.addMembers(roleActionProperty.getValue(p).toString());
+ if (!p.equals(instance))
+ {
+ lookupEntityManager().remove(p);
+ }
+ }
+ }
+
+ if (!actionSet.isEmpty())
+ {
+ roleActionProperty.setValue(instance, actionSet.toString());
+ lookupEntityManager().merge(instance);
+ }
+ else
+ {
+ // No actions remaining in set, so just remove the record
+ lookupEntityManager().remove(instance);
+ }
+
return true;
}
@@ -254,64 +324,167 @@
{
throw new RuntimeException("Could not grant permission, userPermissionClass not set");
}
-
- Object instance = userPermissionClass.newInstance();
- targetProperty.setValue(instance, identifierPolicy.getIdentifier(permission.getTarget()));
- actionProperty.setValue(instance, permission.getAction());
- userProperty.setValue(instance, resolvePrincipal(permission.getRecipient()));
+
+ List permissions = createPermissionQuery(target, recipient, recipientIsRole ?
+ Discrimination.role : Discrimination.user).getResultList();
+
+ if (permissions.isEmpty())
+ {
+ if (!set) return true;
+
+ ActionSet actionSet = metadata.createActionSet(target.getClass(), null);
+ for (String action : actions)
+ {
+ actionSet.add(action);
+ }
+
+ Object instance = userPermissionClass.newInstance();
+ targetProperty.setValue(instance, identifierPolicy.getIdentifier(target));
+ actionProperty.setValue(instance, actionSet.toString());
+ userProperty.setValue(instance, resolvePrincipal(recipient));
+
+ if (discriminatorProperty != null)
+ {
+ PermissionDiscriminator discriminator = discriminatorProperty.getAnnotation();
+ discriminatorProperty.setValue(instance, recipientIsRole ? discriminator.roleValue() :
+ discriminator.userValue());
+ }
+
+ lookupEntityManager().persist(instance);
+ return true;
+ }
+
+ Object instance = permissions.get(0);
- if (discriminatorProperty != null)
+ ActionSet actionSet = metadata.createActionSet(target.getClass(),
+ actionProperty.getValue(instance).toString());
+
+ for (String action : actions)
{
- discriminatorProperty.setValue(instance, getDiscriminatorValue(recipientIsRole));
+ if (set)
+ {
+ actionSet.add(action);
+ }
+ else
+ {
+ actionSet.remove(action);
+ }
}
- lookupEntityManager().persist(instance);
+ if (permissions.size() > 1)
+ {
+ // Same as with roles, consolidate the records if there is more than one
+ for (Object p : permissions)
+ {
+ actionSet.addMembers(actionProperty.getValue(p).toString());
+ if (!p.equals(instance))
+ {
+ lookupEntityManager().remove(p);
+ }
+ }
+ }
+
+ if (!actionSet.isEmpty())
+ {
+ actionProperty.setValue(instance, actionSet.toString());
+ lookupEntityManager().merge(instance);
+ }
+ else
+ {
+ // No actions remaining in set, so just remove the record
+ lookupEntityManager().remove(instance);
+ }
- return true;
+ return true;
}
catch (Exception ex)
{
throw new RuntimeException("Could not grant permission", ex);
- }
+ }
}
public boolean grantPermissions(List<Permission> permissions)
{
- // TODO implement
+ // Target/Recipient/Action map
+ Map<Object,Map<Principal,List<Permission>>> groupedPermissions = groupPermissions(permissions);
- return false;
+ for (Object target : groupedPermissions.keySet())
+ {
+ Map<Principal,List<Permission>> recipientPermissions = groupedPermissions.get(target);
+
+ for (Principal recipient : recipientPermissions.keySet())
+ {
+ List<Permission> ps = recipientPermissions.get(recipient);
+ String[] actions = new String[ps.size()];
+ for (int i = 0; i < ps.size(); i++) actions[i] = ps.get(i).getAction();
+ updatePermissionActions(target, recipient, actions, true);
+ }
+ }
+
+ return true;
}
- private String getDiscriminatorValue(boolean isRole)
+ public boolean revokePermissions(List<Permission> permissions)
{
- PermissionDiscriminator discriminator = discriminatorProperty.getAnnotation();
- return isRole ? discriminator.roleValue() : discriminator.userValue();
- }
+ // Target/Recipient/Action map
+ Map<Object,Map<Principal,List<Permission>>> groupedPermissions = groupPermissions(permissions);
+
+ for (Object target : groupedPermissions.keySet())
+ {
+ Map<Principal,List<Permission>> recipientPermissions = groupedPermissions.get(target);
+
+ for (Principal recipient : recipientPermissions.keySet())
+ {
+ List<Permission> ps = recipientPermissions.get(recipient);
+ String[] actions = new String[ps.size()];
+ for (int i = 0; i < ps.size(); i++) actions[i] = ps.get(i).getAction();
+ updatePermissionActions(target, recipient, actions, false);
+ }
+ }
+
+ return true;
+ }
- public boolean revokePermission(Permission permission)
+ /**
+ * Groups a list of arbitrary permissions into a more easily-consumed structure
+ *
+ * @param permissions The list of permissions to group
+ * @return
+ */
+ private Map<Object,Map<Principal,List<Permission>>> groupPermissions(List<Permission> permissions)
{
- Query qry = createPermissionQuery(permission.getTarget(), permission.getAction(),
- permission.getRecipient(), permission.getRecipient() instanceof Role ?
- Discrimination.role : Discrimination.user);
-
- try
+ // Target/Recipient/Action map
+ Map<Object,Map<Principal,List<Permission>>> groupedPermissions = new HashMap<Object,Map<Principal,List<Permission>>>();
+
+ for (Permission permission : permissions)
{
- Object instance = qry.getSingleResult();
- lookupEntityManager().remove(instance);
- return true;
+ if (!groupedPermissions.containsKey(permission.getTarget()))
+ {
+ groupedPermissions.put(permission.getTarget(), new HashMap<Principal,List<Permission>>());
+ }
+
+ Map<Principal,List<Permission>> recipientPermissions = groupedPermissions.get(permission.getTarget());
+ if (!recipientPermissions.containsKey(permission.getRecipient()))
+ {
+ List<Permission> perms = new ArrayList<Permission>();
+ perms.add(permission);
+ recipientPermissions.put(permission.getRecipient(), perms);
+ }
+ else
+ {
+ recipientPermissions.get(permission.getRecipient()).add(permission);
+ }
}
- catch (NoResultException ex)
- {
- return false;
- }
+
+ return groupedPermissions;
}
- public boolean revokePermissions(List<Permission> permissions)
+ private String getDiscriminatorValue(boolean isRole)
{
- // TODO implement
- return false;
+ PermissionDiscriminator discriminator = discriminatorProperty.getAnnotation();
+ return isRole ? discriminator.roleValue() : discriminator.userValue();
}
-
+
/**
* If the user or role properties in the entity class refer to other entities, then this method
* uses the JpaIdentityStore (if available) to lookup that user or role entity. Otherwise it
@@ -375,7 +548,7 @@
List<Permission> permissions = new ArrayList<Permission>();
// First query for user permissions
- Query permissionQuery = createPermissionQuery(target, action, null, Discrimination.either);
+ Query permissionQuery = createPermissionQuery(target, null, Discrimination.either);
List userPermissions = permissionQuery.getResultList();
Map<String,Principal> principalCache = new HashMap<String,Principal>();
@@ -384,50 +557,28 @@
for (Object permission : userPermissions)
{
- Principal principal;
- boolean isUser = true;
+ ActionSet actionSet = metadata.createActionSet(target.getClass(),
+ actionProperty.getValue(permission).toString());
- if (useDiscriminator &&
- discriminatorProperty.getAnnotation().roleValue().equals(discriminatorProperty.getValue(permission)))
- {
- isUser = false;
- }
-
- String name = resolvePrincipalName(isUser ? userProperty.getValue(permission) :
- roleProperty.getValue(permission), isUser);
-
- String key = (isUser ? "u:" : "r:") + name;
-
- if (!principalCache.containsKey(key))
- {
- principal = isUser ? new SimplePrincipal(name) : new Role(name);
- principalCache.put(key, principal);
- }
- else
- {
- principal = principalCache.get(key);
- }
-
- permissions.add(new Permission(target, (String) (action != null ? action : actionProperty.getValue(permission)),
- principal));
- }
-
- // If we have a separate class for role permissions, then query them now
- if (rolePermissionClass != null)
- {
- permissionQuery = createPermissionQuery(target, action, null, Discrimination.role);
- List rolePermissions = permissionQuery.getResultList();
-
- for (Object permission : rolePermissions)
- {
+ if (action == null || actionSet.contains(action))
+ {
Principal principal;
+ boolean isUser = true;
- String name = resolvePrincipalName(roleProperty.getValue(permission), false);
- String key = "r:" + name;
+ if (useDiscriminator &&
+ discriminatorProperty.getAnnotation().roleValue().equals(discriminatorProperty.getValue(permission)))
+ {
+ isUser = false;
+ }
+
+ String name = resolvePrincipalName(isUser ? userProperty.getValue(permission) :
+ roleProperty.getValue(permission), isUser);
+ String key = (isUser ? "u:" : "r:") + name;
+
if (!principalCache.containsKey(key))
{
- principal = new Role(name);
+ principal = isUser ? new SimplePrincipal(name) : new Role(name);
principalCache.put(key, principal);
}
else
@@ -435,11 +586,63 @@
principal = principalCache.get(key);
}
- permissions.add(new Permission(target, (String) (action != null ? action :
- roleActionProperty.getValue(permission)), principal));
+ if (action != null)
+ {
+ permissions.add(new Permission(target, action, principal));
+ }
+ else
+ {
+ for (String a : actionSet.members())
+ {
+ permissions.add(new Permission(target, a, principal));
+ }
+ }
}
}
+ // If we have a separate class for role permissions, then query them now
+ if (rolePermissionClass != null)
+ {
+ permissionQuery = createPermissionQuery(target, null, Discrimination.role);
+ List rolePermissions = permissionQuery.getResultList();
+
+ for (Object permission : rolePermissions)
+ {
+ ActionSet actionSet = metadata.createActionSet(target.getClass(),
+ roleActionProperty.getValue(permission).toString());
+
+ if (action == null || actionSet.contains(action))
+ {
+ Principal principal;
+
+ String name = resolvePrincipalName(roleProperty.getValue(permission), false);
+ String key = "r:" + name;
+
+ if (!principalCache.containsKey(key))
+ {
+ principal = new Role(name);
+ principalCache.put(key, principal);
+ }
+ else
+ {
+ principal = principalCache.get(key);
+ }
+
+ if (action != null)
+ {
+ permissions.add(new Permission(target, action, principal));
+ }
+ else
+ {
+ for (String a : actionSet.members())
+ {
+ permissions.add(new Permission(target, a, principal));
+ }
+ }
+ }
+ }
+ }
+
return permissions;
}
Modified: trunk/src/main/org/jboss/seam/security/permission/PermissionMetadata.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/PermissionMetadata.java 2008-05-10 02:39:00 UTC (rev 8149)
+++ trunk/src/main/org/jboss/seam/security/permission/PermissionMetadata.java 2008-05-10 13:33:34 UTC (rev 8150)
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -83,7 +84,7 @@
}
}
- private class ActionSet
+ protected class ActionSet
{
private Set<String> members = new HashSet<String>();
private Class targetClass;
@@ -91,6 +92,12 @@
public ActionSet(Class targetClass, String members)
{
this.targetClass = targetClass;
+ addMembers(members);
+ }
+
+ public void addMembers(String members)
+ {
+ if (members == null) return;
if (usesActionMask.get(targetClass))
{
@@ -115,9 +122,14 @@
{
this.members.add(action);
}
- }
+ }
}
+ public boolean contains(String action)
+ {
+ return members.contains(action);
+ }
+
public ActionSet add(String action)
{
members.add(action);
@@ -130,6 +142,16 @@
return this;
}
+ public Set<String> members()
+ {
+ return members;
+ }
+
+ public boolean isEmpty()
+ {
+ return members.isEmpty();
+ }
+
@Override
public String toString()
{
Modified: trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java 2008-05-10 02:39:00 UTC (rev 8149)
+++ trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java 2008-05-10 13:33:34 UTC (rev 8150)
@@ -3,7 +3,11 @@
import static org.jboss.seam.ScopeType.CONVERSATION;
import java.io.Serializable;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
@@ -19,11 +23,13 @@
@Name("org.jboss.seam.security.permission.permissionSearch")
public class PermissionSearch implements Serializable
{
+ private Map<Principal,List<Permission>> groupedPermissions = new HashMap<Principal,List<Permission>>();
+
@DataModel
- List<Permission> permissions;
+ List<Principal> recipients;
@DataModelSelection
- Permission selectedPermission;
+ Principal selectedRecipient;
@In IdentityManager identityManager;
@@ -39,16 +45,60 @@
public void refresh()
{
- permissions = permissionManager.listPermissions(target);
+ List<Permission> permissions = permissionManager.listPermissions(target);
+ groupedPermissions.clear();
+
+ for (Permission permission : permissions)
+ {
+ List<Permission> recipientPermissions = null;
+
+ if (!groupedPermissions.containsKey(permission.getRecipient()))
+ {
+ recipientPermissions = new ArrayList<Permission>();
+ groupedPermissions.put(permission.getRecipient(), recipientPermissions);
+ }
+ else
+ {
+ recipientPermissions = groupedPermissions.get(permission.getRecipient());
+ }
+
+ recipientPermissions.add(permission);
+ }
+
+ recipients = new ArrayList<Principal>(groupedPermissions.keySet());
}
+ public String getActions(Principal recipient)
+ {
+ StringBuilder sb = new StringBuilder();
+
+ for (Permission permission : groupedPermissions.get(recipient))
+ {
+ if (sb.length() > 0) sb.append(", ");
+ sb.append(permission.getAction());
+ }
+
+ return sb.toString();
+ }
+
public Object getTarget()
{
return target;
}
- public Permission getSelectedPermission()
+ public void revokeSelected()
{
- return selectedPermission;
+ permissionManager.revokePermissions(getSelectedPermissions());
+ refresh();
}
+
+ public Principal getSelectedRecipient()
+ {
+ return selectedRecipient;
+ }
+
+ public List<Permission> getSelectedPermissions()
+ {
+ return groupedPermissions.get(selectedRecipient);
+ }
}
16 years, 6 months
Seam SVN: r8149 - trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-05-09 22:39:00 -0400 (Fri, 09 May 2008)
New Revision: 8149
Removed:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java
Log:
JBSEAM-2722, JBSEAM-2723 - New plugin metadata system and extended page fragment caching
Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java 2008-05-10 02:37:42 UTC (rev 8148)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/WikiDocumentEditorTemplate.java 2008-05-10 02:39:00 UTC (rev 8149)
@@ -1,17 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package org.jboss.seam.wiki.core.template;
-
-import org.jboss.seam.wiki.core.action.DocumentHome;
-
-/**
- * @author Christian Bauer
- */
-public interface WikiDocumentEditorTemplate {
-
- public void setEditorDefaults(DocumentHome editor);
-}
16 years, 6 months
Seam SVN: r8148 - in trunk/examples/wiki: src and 130 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-05-09 22:37:42 -0400 (Fri, 09 May 2008)
New Revision: 8148
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiTextMacro.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginCacheManager.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/WikiPluginMacro.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/PluginBinder.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/
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/PluginDeploymentHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NBinder.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NDeploymentHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/
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/PluginInfo.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/MacroPluginModule.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/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/MacroComponentHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIMacro.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFaceletsResourceResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPluginThemeResource.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiRedirect.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/AnnotationDeploymentHelper.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/PatternDeploymentHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiResourceLoader.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/XmlDeploymentHandler.java
trunk/examples/wiki/src/plugin/
trunk/examples/wiki/src/plugin/org/
trunk/examples/wiki/src/plugin/org/jboss/
trunk/examples/wiki/src/plugin/org/jboss/seam/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/
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/DirMenu.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenuPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocQuery.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPager.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPagerPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Flash.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/FlashPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocuments.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocumentsPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsAggregator.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/
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/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/clearBackground.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenu.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenuItem.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirToc.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/docPager.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/flash.xhtml
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/tags.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirMenu.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirToc.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/docPager.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/lastModifiedDocuments.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirMenu.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirToc.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/docPager.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/lastModifiedDocuments.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/userProfile.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirMenu.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirToc.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/docPager.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/lastModifiedDocuments.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntry.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryCount.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryDefaults.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogArchive.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/blog/templates/blogRecentEntries.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogArchive.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogDirectory.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogRecentEntries.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogArchive.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogDirectory.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogRecentEntries.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogArchive.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogDirectory.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogRecentEntries.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/i18n/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/i18n/messages_faqBrowser_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqBrowser.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/faqBrowser/templates/faqQuestionForm.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/default/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/default/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/default/css/faqBrowser.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/inrelationto/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/inrelationto/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/inrelationto/css/faqBrowser.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/sfwkorg/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/sfwkorg/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/sfwkorg/css/faqBrowser.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/Feed.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregator.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregatorPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasers.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersFeedPreferenceValueTemplate.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/i18n/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/i18n/messages_feed_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/
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/feedTeasers.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedAggregator.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedTeasers.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedAggregator.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedTeasers.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedAggregator.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedTeasers.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forumTopPosters_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumForm.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumList.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListControls.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPosting.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/forumReplies.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumStickyPosting.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/forumTopics.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/replyForm.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicControls.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicForm.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml
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/themes/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumList.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumPosting.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumReplies.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumStickyPosting.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumTopics.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_goto.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_locked.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_locked_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_sticky.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_sticky_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumList.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumPosting.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumReplies.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumStickyPosting.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumTopics.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_goto.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_locked.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_locked_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_sticky.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_sticky_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumList.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumPosting.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumReplies.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumStickyPosting.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumTopics.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_goto.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_locked.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_locked_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_sticky.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_sticky_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_unread.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorldPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/i18n/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/i18n/messages_helloWorld_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/helloWorld.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/justAnotherTemplate.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/anotherOne.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/helloWorld.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/img/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/img/background.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/img/example.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/Jira.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/i18n/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/i18n/messages_jiraIssueList_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/css/jiraIssueList.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.blocker.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.critical.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.major.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.minor.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.optional.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.trivial.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/css/jiraIssueList.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.blocker.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.critical.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.major.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.minor.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.optional.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.trivial.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/css/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/css/jiraIssueList.css
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.blocker.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.critical.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.major.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.minor.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.optional.gif
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.trivial.gif
trunk/examples/wiki/view/includes/admin/
trunk/examples/wiki/view/includes/admin/pluginDetailsMacroPluginModule.xhtml
trunk/examples/wiki/view/includes/admin/pluginEditor.xhtml
Removed:
trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties
trunk/examples/wiki/src/etc/i18n/messages_dirMenu_en.properties
trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties
trunk/examples/wiki/src/etc/i18n/messages_docPager_en.properties
trunk/examples/wiki/src/etc/i18n/messages_faqBrowser_en.properties
trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties
trunk/examples/wiki/src/etc/i18n/messages_feedTeasers_en.properties
trunk/examples/wiki/src/etc/i18n/messages_flash_en.properties
trunk/examples/wiki/src/etc/i18n/messages_forumTopPosters_en.properties
trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties
trunk/examples/wiki/src/etc/i18n/messages_jiraIssueList_en.properties
trunk/examples/wiki/src/etc/i18n/messages_lastModifiedDocuments_en.properties
trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties
trunk/examples/wiki/src/etc/i18n/messages_userProfile_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiMacro.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/PluginComponentHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIPlugin.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/
trunk/examples/wiki/view/plugins/
trunk/examples/wiki/view/themes/default/css/blogArchive.css
trunk/examples/wiki/view/themes/default/css/blogDirectory.css
trunk/examples/wiki/view/themes/default/css/blogRecentEntries.css
trunk/examples/wiki/view/themes/default/css/dirMenu.css
trunk/examples/wiki/view/themes/default/css/dirToc.css
trunk/examples/wiki/view/themes/default/css/docPager.css
trunk/examples/wiki/view/themes/default/css/faqBrowser.css
trunk/examples/wiki/view/themes/default/css/feedAggregator.css
trunk/examples/wiki/view/themes/default/css/feedTeasers.css
trunk/examples/wiki/view/themes/default/css/forumList.css
trunk/examples/wiki/view/themes/default/css/forumPosting.css
trunk/examples/wiki/view/themes/default/css/forumReplies.css
trunk/examples/wiki/view/themes/default/css/forumStickyPosting.css
trunk/examples/wiki/view/themes/default/css/forumTopics.css
trunk/examples/wiki/view/themes/default/css/jiraIssueList.css
trunk/examples/wiki/view/themes/default/css/lastModifiedDocuments.css
trunk/examples/wiki/view/themes/default/img/icon.posting.gif
trunk/examples/wiki/view/themes/default/img/icon.posting_goto.gif
trunk/examples/wiki/view/themes/default/img/icon.posting_locked.gif
trunk/examples/wiki/view/themes/default/img/icon.posting_locked_unread.gif
trunk/examples/wiki/view/themes/default/img/icon.posting_sticky.gif
trunk/examples/wiki/view/themes/default/img/icon.posting_sticky_unread.gif
trunk/examples/wiki/view/themes/default/img/icon.posting_unread.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.blocker.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.critical.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.major.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.minor.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.optional.gif
trunk/examples/wiki/view/themes/default/img/icon.priority.trivial.gif
trunk/examples/wiki/view/themes/inrelationto/css/blogArchive.css
trunk/examples/wiki/view/themes/inrelationto/css/blogDirectory.css
trunk/examples/wiki/view/themes/inrelationto/css/blogRecentEntries.css
trunk/examples/wiki/view/themes/inrelationto/css/dirMenu.css
trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css
trunk/examples/wiki/view/themes/inrelationto/css/docPager.css
trunk/examples/wiki/view/themes/inrelationto/css/faqBrowser.css
trunk/examples/wiki/view/themes/inrelationto/css/feedAggregator.css
trunk/examples/wiki/view/themes/inrelationto/css/feedTeasers.css
trunk/examples/wiki/view/themes/inrelationto/css/forumList.css
trunk/examples/wiki/view/themes/inrelationto/css/forumPosting.css
trunk/examples/wiki/view/themes/inrelationto/css/forumReplies.css
trunk/examples/wiki/view/themes/inrelationto/css/forumStickyPosting.css
trunk/examples/wiki/view/themes/inrelationto/css/forumTopics.css
trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css
trunk/examples/wiki/view/themes/inrelationto/css/lastModifiedDocuments.css
trunk/examples/wiki/view/themes/inrelationto/css/userProfile.css
trunk/examples/wiki/view/themes/inrelationto/img/icon.posting.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_goto.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_locked.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_locked_unread.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_sticky.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_sticky_unread.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_unread.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.blocker.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.critical.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.major.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.minor.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.optional.gif
trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.trivial.gif
trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css
trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css
trunk/examples/wiki/view/themes/sfwkorg/css/blogRecentEntries.css
trunk/examples/wiki/view/themes/sfwkorg/css/dirMenu.css
trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css
trunk/examples/wiki/view/themes/sfwkorg/css/docPager.css
trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css
trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css
trunk/examples/wiki/view/themes/sfwkorg/css/feedTeasers.css
trunk/examples/wiki/view/themes/sfwkorg/css/forumList.css
trunk/examples/wiki/view/themes/sfwkorg/css/forumPosting.css
trunk/examples/wiki/view/themes/sfwkorg/css/forumReplies.css
trunk/examples/wiki/view/themes/sfwkorg/css/forumStickyPosting.css
trunk/examples/wiki/view/themes/sfwkorg/css/forumTopics.css
trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css
trunk/examples/wiki/view/themes/sfwkorg/css/lastModifiedDocuments.css
trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_goto.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_locked.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_locked_unread.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_sticky.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_sticky_unread.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_unread.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.blocker.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.critical.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.major.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.minor.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.optional.gif
trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.trivial.gif
Modified:
trunk/examples/wiki/build.xml
trunk/examples/wiki/src/etc/META-INF/components-dev.xml
trunk/examples/wiki/src/etc/META-INF/components-prod.xml
trunk/examples/wiki/src/etc/META-INF/components-test.xml
trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties
trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/etc/WEB-INF/faces-config.xml
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/web.xml
trunk/examples/wiki/src/etc/ehcache.xml
trunk/examples/wiki/src/etc/i18n/messages_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextParser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextRenderer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/metamodel/SearchRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/ImporterRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/PreferenceProperty.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/Preferences.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumTopPostersPreferences.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/TopicHome.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/JiraIssueList.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/JiraIssueListPreferences.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/EditMacros.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/model/DocumentMacroTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/plugin/TopicHomeTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java
trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java
trunk/examples/wiki/view/adminHome_d.xhtml
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/dirDisplay_m.xhtml
trunk/examples/wiki/view/dirEdit_d.xhtml
trunk/examples/wiki/view/docDisplay_d.xhtml
trunk/examples/wiki/view/docDisplay_m.xhtml
trunk/examples/wiki/view/docEdit_d.xhtml
trunk/examples/wiki/view/docHistory_d.xhtml
trunk/examples/wiki/view/docHistory_m.xhtml
trunk/examples/wiki/view/includes/attachmentDisplay.xhtml
trunk/examples/wiki/view/includes/breadcrumb.xhtml
trunk/examples/wiki/view/includes/captchaEntry.xhtml
trunk/examples/wiki/view/includes/commentForm.xhtml
trunk/examples/wiki/view/includes/commentsDisplay.xhtml
trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml
trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml
trunk/examples/wiki/view/includes/formFieldDecorate.xhtml
trunk/examples/wiki/view/includes/helpPopup.xhtml
trunk/examples/wiki/view/includes/mainMenu.xhtml
trunk/examples/wiki/view/includes/ownerSelector.xhtml
trunk/examples/wiki/view/includes/pager.xhtml
trunk/examples/wiki/view/includes/pluginPreferencesForm.xhtml
trunk/examples/wiki/view/includes/preferences/editor.xhtml
trunk/examples/wiki/view/includes/sortableHeader.xhtml
trunk/examples/wiki/view/includes/userInfo.xhtml
trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
trunk/examples/wiki/view/includes/wikiTextPreview.xhtml
trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml
trunk/examples/wiki/view/search_d.xhtml
trunk/examples/wiki/view/search_m.xhtml
trunk/examples/wiki/view/tagDisplay_d.xhtml
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/default/m/template.xhtml
trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml
trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml
trunk/examples/wiki/view/themes/default/template.xhtml
trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml
trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml
trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml
trunk/examples/wiki/view/themes/inrelationto/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
trunk/examples/wiki/view/userList_d.xhtml
Log:
JBSEAM-2722, JBSEAM-2723 - New plugin metadata system and extended page fragment caching
Modified: trunk/examples/wiki/build.xml
===================================================================
--- trunk/examples/wiki/build.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/build.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -17,12 +17,13 @@
<!-- set global properties for this build -->
<property name="project.name" value="wiki"/>
- <property name="src.java.dir" value="src/main"/>
+ <property name="src.java.dir" value="src/main"/>
+ <property name="src.plugin.dir" value="src/plugin"/>
<property name="src.test.dir" value="src/test"/>
<property name="src.etc.dir" value="src/etc"/>
<property name="view.dir" value="view"/>
- <property name="classes.dir" value="${tmp.dir}/classes"/>
+ <property name="classes.dir" value="${tmp.dir}/classes"/>
<property name="testclasses.dir" value="${tmp.dir}/testclasses"/>
<property name="test.output.dir" value="${tmp.dir}/test-output"/>
<property name="exploded.dir" value="${tmp.dir}/exploded"/>
@@ -96,6 +97,14 @@
<include name="**/*.sql"/>
<include name="**/*.drl"/>
<include name="**/*.MF"/>
+ <include name="**/*.dtd"/>
+ <include name="**/*.xsd"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ <include name="**/*.jpeg"/>
+ <include name="**/*.png"/>
+ <include name="**/*.css"/>
+ <include name="**/*.xhtml"/>
</patternset>
<!-- ################## SETUP ####################### -->
@@ -152,6 +161,7 @@
deprecation="${javac.deprecation}"
nowarn="${javac.nowarn}">
<src path="${src.java.dir}"/>
+ <src path="${src.plugin.dir}"/>
</javac>
<!-- Copy resources (mapping files, properties, etc.) to classes -->
@@ -159,6 +169,9 @@
<fileset dir="${src.java.dir}">
<patternset refid="meta.files"/>
</fileset>
+ <fileset dir="${src.plugin.dir}">
+ <patternset refid="meta.files"/>
+ </fileset>
</copy>
<taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
Modified: trunk/examples/wiki/src/etc/META-INF/components-dev.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -47,27 +47,6 @@
persistence-unit-name="wiki"
startupDepends="ehCacheManager"/>
- <!-- Wiki page fragment cache, relies on cache manager backend -->
- <component name="pageFragmentCache"
- class="org.jboss.seam.wiki.core.cache.PageFragmentCache"
- startup="true" startupDepends="ehCacheManager"
- scope="APPLICATION"/>
-
- <!-- Wiki cache manager backend -->
- <component name="ehCacheManager"
- class="org.jboss.seam.wiki.core.cache.EHCacheManager"
- startup="true"
- scope="APPLICATION"/>
-
- <!-- Base path for links includes port number -->
- <factory name="basePath" scope="CONVERSATION" auto-create="true"
- value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
- }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
-
- <factory name="themePathGetRequest" scope="CONVERSATION" auto-create="true"
- value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
- }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
-
<!-- Some DBUnit datasets we use in unit testing - let's also use them in dev mode when the app is deployed -->
<component name="dbunitImporter" class="org.jboss.seam.wiki.util.DBUnitImporter" scope="APPLICATION" auto-create="true">
<property name="database">mysql</property>
Modified: trunk/examples/wiki/src/etc/META-INF/components-prod.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -47,25 +47,4 @@
persistence-unit-name="wiki"
startupDepends="ehCacheManager"/>
- <!-- Wiki page fragment cache, relies on cache manager backend -->
- <component name="pageFragmentCache"
- class="org.jboss.seam.wiki.core.cache.PageFragmentCache"
- startup="true" startupDepends="ehCacheManager"
- scope="APPLICATION"/>
-
- <!-- Wiki cache manager backend -->
- <component name="ehCacheManager"
- class="org.jboss.seam.wiki.core.cache.EHCacheManager"
- startup="true"
- scope="APPLICATION"/>
-
- <!-- Base path for links includes port number -->
- <factory name="basePath" scope="CONVERSATION" auto-create="true"
- value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
- }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
-
- <factory name="themePathGetRequest" scope="CONVERSATION" auto-create="true"
- value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
- }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
-
</components>
Modified: trunk/examples/wiki/src/etc/META-INF/components-test.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -44,13 +44,4 @@
<core:init debug="false" jndi-pattern="#{ejbName}/local"/>
<transaction:ejb-transaction/>
- <!-- Base path for links includes port number -->
- <factory name="basePath" scope="CONVERSATION" auto-create="true"
- value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName
- }:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}"/>
-
- <factory name="themePathGetRequest" scope="CONVERSATION" auto-create="true"
- value="#{servletContexts.request.scheme}://#{servletContexts.request.serverName
- }:#{servletContexts.request.serverPort}#{servletContexts.request.contextPath}/themes/#{preferences.get('Wiki').themeName}"/>
-
</components>
Modified: trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/META-INF/seam-deployment.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1 +1,2 @@
-org.jboss.seam.deployment.annotationTypes=org.jboss.seam.wiki.preferences.annotations.Preferences:org.jboss.seam.wiki.core.template.WikiDocumentTemplate
\ No newline at end of file
+org.jboss.seam.deployment.annotationTypes=org.jboss.seam.wiki.preferences.annotations.Preferences:org.jboss.seam.wiki.core.template.WikiDocumentTemplate
+org.jboss.seam.deployment.deploymentHandlers=org.jboss.seam.wiki.core.plugin.binding.lacewiki.PluginDeploymentHandler:org.jboss.seam.wiki.core.plugin.binding.lacewiki.PluginI18NDeploymentHandler
\ No newline at end of file
Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -154,12 +154,20 @@
<tag-name>formattedText</tag-name>
<handler-class>org.jboss.seam.wiki.core.ui.WikiFormattedTextHandler</handler-class>
</tag>
-
+
<tag>
+ <tag-name>loadStyle</tag-name>
+ <component>
+ <component-type>org.ajax4jsf.component.html.HtmlLoadStyle</component-type>
+ </component>
+ </tag>
+
+ <!-- Map it to a <wiki:plugin> tag because <wiki:macro> sounds too complicated... -->
+ <tag>
<tag-name>plugin</tag-name>
<component>
- <component-type>org.jboss.seam.wiki.core.ui.UIPlugin</component-type>
- <handler-class>org.jboss.seam.wiki.core.ui.PluginComponentHandler</handler-class>
+ <component-type>org.jboss.seam.wiki.core.ui.UIMacro</component-type>
+ <handler-class>org.jboss.seam.wiki.core.ui.MacroComponentHandler</handler-class>
</component>
</tag>
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -6,6 +6,7 @@
xmlns:web="http://jboss.com/products/seam/web"
xmlns:mail="http://jboss.com/products/seam/mail"
xmlns:transaction="http://jboss.com/products/seam/transaction"
+ xmlns:ui="http://jboss.com/products/seam/ui"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
@@ -21,6 +22,8 @@
conversation-timeout="1200000"
conversation-id-parameter="cid"/>
+ <!-- Persistence stuff -->
+
<persistence:filter name="accessLevelFilter">
<persistence:name>accessLevelFilter</persistence:name>
<persistence:parameters>
@@ -54,6 +57,7 @@
persistence-unit-jndi-name="java:/entityManagerFactories/wiki">
</persistence:managed-persistence-context>
+ <!--
<component name="restrictedEntityConverter" scope="CONVERSATION" precedence="20"
class="org.jboss.seam.ui.converter.EntityConverter">
<property name="entityManager">#{restrictedEntityManager}</property>
@@ -68,40 +72,42 @@
class="org.jboss.seam.wiki.core.nestedset.ui.NestedSetNodeWrapperEntityConverter">
<property name="entityManager">#{restrictedEntityManager}</property>
</component>
+ -->
+ <ui:entity-converter name="entityConverter"
+ scope="CONVERSATION" precedence="20" entity-loader="#{regularEntityLoader}"/>
+ <ui:entity-loader name="regularEntityLoader" entity-manager="#{entityManager}"/>
+
+ <ui:entity-converter name="restrictedEntityConverter"
+ scope="CONVERSATION" precedence="20" entity-loader="#{restrictedEntityLoader}"/>
+ <ui:entity-loader name="restrictedEntityLoader" entity-manager="#{restrictedEntityManager}"/>
+
+ <ui:entity-converter name="nestedSetNodeWrapperRestrictedEntityConverter"
+ class="org.jboss.seam.wiki.core.nestedset.ui.NestedSetNodeWrapperEntityConverter"
+ scope="CONVERSATION" precedence="20" entity-loader="#{restrictedEntityLoader}"/>
+
<!-- Login and security -->
<security:identity authenticate-method="#{authenticator.authenticate}"
remember-me="false"/>
- <!-- Plugin i18n resources
- TODO: This could be made dynamic with a custom ResourceLoader?
- -->
+ <!-- Caching -->
- <core:resource-loader>
- <core:bundle-names>
- <value>i18n.messages</value>
- <value>i18n.messages_blogDirectory</value>
- <value>i18n.messages_blogArchive</value>
- <value>i18n.messages_blogRecentEntries</value>
- <value>i18n.messages_dirMenu</value>
- <value>i18n.messages_feedTeasers</value>
- <value>i18n.messages_lastModifiedDocuments</value>
- <value>i18n.messages_tags</value>
- <value>i18n.messages_userProfile</value>
- <value>i18n.messages_forum</value>
- <value>i18n.messages_flash</value>
- <value>i18n.messages_docPager</value>
- <value>i18n.messages_faqBrowser</value>
- <value>i18n.messages_jiraIssueList</value>
- <value>i18n.messages_jiraConnector</value>
- <value>i18n.messages_feedAggregator</value>
- <value>i18n.messages_feedConnector</value>
- <value>i18n.messages_forumTopPosters</value>
- <value>i18n.messages_dirToc</value>
- </core:bundle-names>
- </core:resource-loader>
+ <component name="ehCacheManager"
+ class="org.jboss.seam.wiki.core.cache.EHCacheManager"
+ startup="true"
+ scope="APPLICATION"/>
+ <component name="pageFragmentCache"
+ class="org.jboss.seam.wiki.core.cache.PageFragmentCache"
+ startup="true" startupDepends="ehCacheManager pluginRegistry"
+ scope="APPLICATION">
+ <property name="cacheRegions">
+ <value>wiki.MainMenu</value>
+ <value>wiki.Breadcrumb</value>
+ </property>
+ </component>
+
<!-- Misc Settings -->
<web:context-filter regex-url-pattern="/(service|servlets)/.+"/>
@@ -124,8 +130,23 @@
</property>
</component>
- <factory name="themePath" scope="CONVERSATION" value="#{basePath}/themes/#{preferences.get('Wiki').themeName}"/>
+ <!-- Some convenience value factories -->
+ <factory name="contextPath" scope="CONVERSATION" auto-create="true"
+ value="#{facesContext.externalContext.request.contextPath}"/>
+
+ <factory name="themePathGetRequest" scope="CONVERSATION" auto-create="true"
+ value="#{servletContexts.request.contextPath}/themes/#{currentTheme}"/>
+
+ <factory name="themePath" scope="CONVERSATION" auto-create="true"
+ value="#{facesContext.externalContext.request.contextPath}/themes/#{currentTheme}"/>
+
+ <factory name="imagePath" scope="CONVERSATION" auto-create="true"
+ value="/themes/#{currentTheme}/img"/>
+
+ <factory name="currentTheme" scope="CONVERSATION" auto-create="true"
+ value="#{preferences.get('Wiki').themeName}"/>
+
<factory name="skin" scope="SESSION" value="d"/>
<factory name="sessionTimeoutSeconds" scope="SESSION"
Modified: trunk/examples/wiki/src/etc/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/faces-config.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/WEB-INF/faces-config.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -10,10 +10,16 @@
<!-- Needed because WikiFormattedTextHandler instantiates these, asking the JSF infrastructure -->
<component>
- <component-type>org.jboss.seam.wiki.core.ui.UIPlugin</component-type>
- <component-class>org.jboss.seam.wiki.core.ui.UIPlugin</component-class>
+ <component-type>org.jboss.seam.wiki.core.ui.UIMacro</component-type>
+ <component-class>org.jboss.seam.wiki.core.ui.UIMacro</component-class>
</component>
+ <!-- We map this to <wiki:loadStyle src="..."/> in Facelets -->
+ <component>
+ <component-type>org.ajax4jsf.component.html.HtmlLoadStyle</component-type>
+ <component-class>org.ajax4jsf.component.html.HtmlLoadStyle</component-class>
+ </component>
+
<!-- Custom renderer implementation for s:cache page fragment caching -->
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -21,19 +21,6 @@
<page view-id="/docDisplay*">
<param name="documentId" value="#{documentHome.nodeId}"/>
- <navigation>
- <rule if-outcome="redirectToDocument">
- <redirect view-id="/wiki.xhtml">
- <param name="nodeId" value="#{documentHome.instance.id}"/>
- </redirect>
- </rule>
- <rule if-outcome="redirectToDocumentNoConversation">
- <redirect url="#{wikiURLRenderer.renderURL(documentHome.instance)}"/>
- </rule>
- <rule if-outcome="redirectToComment">
- <redirect url="#{wikiURLRenderer.renderURL(documentHome.instance)}#comment#{commentHome.instance.id}"/>
- </rule>
- </navigation>
</page>
<page view-id="/docHistory*" no-conversation-view-id="/wiki.xhtml">
@@ -351,7 +338,7 @@
<exception class="org.jboss.seam.security.AuthorizationException">
<end-conversation/>
- <redirect view-id="/wiki.xhtml">
+ <redirect view-id="/message.xhtml">
<message severity="WARN">#{messages['lacewiki.msg.AccessDenied']}: #{org.jboss.seam.handledException.message}</message>
</redirect>
</exception>
Modified: trunk/examples/wiki/src/etc/WEB-INF/web.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -55,6 +55,11 @@
<param-value>true</param-value>
</context-param>
+ <context-param>
+ <param-name>facelets.RESOURCE_RESOLVER</param-name>
+ <param-value>org.jboss.seam.wiki.core.ui.WikiFaceletsResourceResolver</param-value>
+ </context-param>
+
<!-- JSF -->
<context-param>
@@ -62,6 +67,21 @@
<param-value>.xhtml</param-value>
</context-param>
+ <context-param>
+ <param-name>com.sun.faces.numberOfViewsInSession</param-name>
+ <param-value>3</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>com.sun.faces.numberOfLogicalViews</param-name>
+ <param-value>3</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>com.sun.faces.responseBufferSize</param-name>
+ <param-value>32768</param-value>
+ </context-param>
+
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Modified: trunk/examples/wiki/src/etc/ehcache.xml
===================================================================
--- trunk/examples/wiki/src/etc/ehcache.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/ehcache.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -79,8 +79,8 @@
<defaultCache
maxElementsInMemory="10000"
eternal="false"
- timeToIdleSeconds="120"
- timeToLiveSeconds="120"
+ timeToIdleSeconds="600"
+ timeToLiveSeconds="600"
overflowToDisk="false"
memoryStoreEvictionPolicy="LRU"
/>
Deleted: trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_blogDirectory_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,21 +0,0 @@
-blog.preferences.Name=Plugin: Blog
-blog.preferences.PageSize=Number of blog entries per page
-blog.preferences.ArchiveSubscribeIcon=Show feed subscribe icon on archive
-blog.preferences.RecentEntriesItems=Number of recent entries shown
-blog.preferences.RecentEntriesTruncateTitle=Truncate recent entries title after characters
-blog.preferences.RecentEntriesSubscribeIcon=Show feed subscribe icon on recent entries
-
-blogDirectory.label.Attachment=attachment
-blogDirectory.label.Attachments=attachments
-blogDirectory.label.Showing=Showing
-blogDirectory.label.To=to
-blogDirectory.label.Of=of
-blogDirectory.label.BlogEntries=blog entries
-blogDirectory.label.In=in
-blogDirectory.label.Tagged=tagged
-blogDirectory.label.NoBlogEntriesFound=No blog entries found.
-blogDirectory.label.Tag=Tag
-blogDirectory.label.Tags=Tags
-
-blogDirectory.label.template.BlogEntry=Weblog Entry
-blogDirectory.label.template.NewBlogEntryTitle=My weblog entry title...
Deleted: trunk/examples/wiki/src/etc/i18n/messages_dirMenu_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_dirMenu_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_dirMenu_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,9 +0,0 @@
-dirMenu.preferences.Name=Plugin: Directory Menu
-
-dirMenu.preferences.Title=Default menu title
-dirMenu.preferences.MenuLevels=Flatten display of menu tree to levels
-dirMenu.preferences.MenuDepth=Maximum depth of menu items
-dirMenu.preferences.ShowSubscribeIcon=Show 'Subscribe' icon
-dirMenu.preferences.OnlyMenuItems=Display only menu items
-
-dirMenu.label.Subscribe=Subscribe
Deleted: trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_dirToc_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,8 +0,0 @@
-dirToc.preferences.Name=Plugin: Directory TOC
-dirToc.preferences.ShowRootDocuments=Show documents of root directory
-dirToc.preferences.ShowDefaultDocuments=Show default documents of all directories
-dirToc.preferences.ShowLastUpdatedTimestamp=Show 'Last Updated' timestamp
-dirToc.preferences.WithHeaderMacro=Only show documents with macro in header
-dirToc.preferences.RootDocumentLink=Wiki link to root document of TOC
-
-dirToc.label.LastUpdated=Last Updated
Deleted: trunk/examples/wiki/src/etc/i18n/messages_docPager_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_docPager_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_docPager_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,3 +0,0 @@
-docPager.preferences.Name=Plugin: Doc Pager
-docPager.preferences.ByProperty=Property used to search previous/next doc
-docPager.preferences.ShowNames=Show names of previous/next document
Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -344,6 +344,8 @@
lacewiki.button.adminHome.SystemStatistics.accesskey=Y
lacewiki.button.adminHome.RolesPermissions=R<u>o</u>les & Permissions
lacewiki.button.adminHome.RolesPermissions.accesskey=O
+lacewiki.button.adminHome.Plugins=Pl<u>u</u>gins
+lacewiki.button.adminHome.Plugins.accesskey=U
lacewiki.button.adminHome.LinkProtocols=<u>L</u>ink Protocols
lacewiki.button.adminHome.LinkProtocols.accesskey=L
lacewiki.button.adminHome.Preferences=P<u>r</u>eferences
@@ -359,7 +361,30 @@
lacewiki.label.adminHome.TargetLink=Target Link
lacewiki.label.adminHome.TargetWithPlaceHolder=Target with [[link]] placeholder
lacewiki.label.adminHome.NotAvailableForSkin=Administration is not available with this skin.
+lacewiki.label.adminHome.plugins.InstalledPlugins=Installed Plugins
+lacewiki.label.adminHome.plugins.NoPluginsInstalled=No plugins installed.
+lacewiki.label.adminHome.plugins.PleaseSelectInstalledPlugin=Please select an installed plugin for more information.
+lacewiki.label.adminHome.plugins.PluginName=Plugin name
+lacewiki.label.adminHome.plugins.Description=Description
+lacewiki.label.adminHome.plugins.Version=Version
+lacewiki.label.adminHome.plugins.Vendor=Vendor
+lacewiki.label.adminHome.plugins.Module=Module
+lacewiki.label.adminHome.plugins.ModuleType=Type
+lacewiki.label.adminHome.plugins.ModuleName=Name
+lacewiki.label.adminHome.plugins.ModuleDescription=Description
+lacewiki.label.adminHome.plugins.ModuleDetails=Plugin module details
+lacewiki.label.adminHome.plugins.Modules=module(s)...
+lacewiki.label.adminHome.plugins.FragmentCacheRegions=Fragment cache regions
+lacewiki.label.adminHome.plugins.macro.Name=Macro
+lacewiki.label.adminHome.plugins.macro.Skins=Available in skins
+lacewiki.label.adminHome.plugins.macro.ApplicableToArea=Applicable to area
+lacewiki.label.adminHome.plugins.macro.RenderOptions=Render options
+lacewiki.label.adminHome.plugins.macro.RenderDependencies=Render dependencies
+
+
+
+
# User Home
lacewiki.label.userHome.MemberAccount=Member Account
Deleted: trunk/examples/wiki/src/etc/i18n/messages_faqBrowser_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_faqBrowser_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_faqBrowser_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,20 +0,0 @@
-faqBrowser.label.Category=FAQ Category
-faqBrowser.label.Question=Question
-faqBrowser.label.Updated=Updated
-faqBrowser.label.NoQuestionsInCategory=No questions in this category.
-faqBrowser.button.NewQuestion=New <u>Q</u>uestion
-faqBrowser.button.NewQuestion.accesskey=Q
-
-faqBrowser.label.NewFaqQuestion=New question in category
-faqBrowser.label.NewQuestionTitle=Your question?
-faqBrowser.label.QuestionTitle=Question
-faqBrowser.label.QuestionText=Text
-faqBrowser.button.SaveNoKey=Save
-faqBrowser.button.CancelNoKey=Cancel
-
-faqBrowser.msg.Question.Persist=Question '{0}' has been saved.
-faqBrowser.msg.Question.Update=Question '{0}' has been updated.
-faqBrowser.msg.Question.Delete=Question '{0}' has been deleted.
-
-faqBrowser.msg.TreeNotFound=Could not find FAQ tree, please create a default document with [<=faqBrowser] header!
-faqBrowser.msg.TreeEmpty=No FAQ categories found, create subdirectories in the current directory.
\ No newline at end of file
Deleted: trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_feedAggregator_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,17 +0,0 @@
-feedAggregator.preferences.Name=Plugin: Feed Aggregator
-feedAggregator.preferences.Title=Title of aggregator box
-feedAggregator.preferences.Urls=URLs of feeds to aggregate, space separated
-feedAggregator.preferences.NumberOfFeedEntries=Number of feed entries
-feedAggregator.preferences.TruncateDescription=Truncate description text after characters
-feedAggregator.preferences.HideDate=Hide date display
-feedAggregator.preferences.HideAuthor=Hide author display
-feedAggregator.preferences.HideFeedInfo=Hide link to feed
-feedAggregator.preferences.HideDescription=Hide feed entry text
-feedAggregator.preferences.HideTitle=Hide feed entry title
-feedAggregator.preferences.AggregateId=Identifier for aggregate (enables subscription)
-
-feedAggregator.label.More=more...
-feedAggregator.label.By=by
-feedAggregator.label.On=on
-feedAggregator.label.Subscribe=Subscribe
-feedAggregator.label.NoEntriesFound=No feed entries found.
\ No newline at end of file
Deleted: trunk/examples/wiki/src/etc/i18n/messages_feedTeasers_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_feedTeasers_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_feedTeasers_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,9 +0,0 @@
-feedTeasers.preferences.Name=Plugin: Feed Teasers
-feedTeasers.preferences.Title=Title of teaser box
-feedTeasers.preferences.Feed=Feed
-feedTeasers.preferences.NumberOfTeasers=Number of feed entries
-feedTeasers.preferences.TruncateDescription=Truncate teaser text after characters
-feedTeasers.preferences.ShowAuthor=Show author name
-
-feedTeasers.label.More=more...
-feedTeasers.label.By=by
Deleted: trunk/examples/wiki/src/etc/i18n/messages_flash_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_flash_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_flash_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,8 +0,0 @@
-flash.preferences.Name=Plugin: Flash
-flash.preferences.FlashURL=URL of flash movie
-flash.preferences.Width=Width in pixels
-flash.preferences.Height=Height in pixels
-flash.preferences.AllowedDomains=Comma-separated list of allowed domain names
-
-flash.msg.URLNotSupplied=[Flash Macro: Add 'url' macro parameter to embed flash movie.]
-flash.msg.URLNotAllowed=[Flash Macro: The flash URL you supplied is not in the list of valid domains, please ask the system administrator to add it.]
Deleted: trunk/examples/wiki/src/etc/i18n/messages_forumTopPosters_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_forumTopPosters_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_forumTopPosters_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,12 +0,0 @@
-forumTopPosters.preferences.Name=Plugin: Forum Top Posters
-forumTopPosters.preferences.Title=Title of box
-forumTopPosters.preferences.NumberOfPosters=Number of posters in list
-forumTopPosters.preferences.ForumLink=Wiki link to forum start page (topic list)
-forumTopPosters.preferences.ExcludeRoles=Exclude users with role name (space separated)
-
-forumTopPosters.label.Position=Position
-forumTopPosters.label.User=User
-forumTopPosters.label.JoinedOn=Joined On
-forumTopPosters.label.RatingPoints=Rating Points
-
-forumTopPosters.label.NoPostersFound=No posters with rating points found.
Deleted: trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,103 +0,0 @@
-forum.preferences.Name=Plugin: Forum
-forum.preferences.TopicsPerPage=Number of topics per page
-forum.preferences.NotifyMeOfReplies=Enable e-mail reply notification switch by default
-forum.preferences.NotificationMailingList=Send all topics/replies to this e-mail address (empty to disable)
-
-forum.label.Showing=Showing
-forum.label.To=to
-forum.label.Of=of
-forum.label.Topics=topics
-forum.label.Joined=Joined On
-
-forum.label.Forum=Forum
-forum.label.TopicCount=Topics
-forum.label.PostCount=Posts
-forum.label.NewestTopic=Newest Topic
-forum.label.LatestPost=Last Post
-forum.label.Feed=Feed
-forum.label.EnableFeed=Enable syndication feed (disabling invalidates subcriber link)
-
-forum.label.EditForum=Edit Forum
-forum.label.NewForum=New Forum
-
-forum.label.NewTopic=New Topic
-forum.label.Subject=Subject
-forum.label.Message=Message
-forum.label.Options=Options
-forum.label.OpenTopicAllowReplies=Open topic, allow replies
-forum.label.StickyPosting=Sticky posting
-forum.label.NotifyMeOfReplies=Notify me via e-mail of any replies
-
-forum.label.Reply=Reply
-forum.label.NewReply=New Reply
-forum.label.Replies=Replies
-
-forum.label.ForumName=Forum Name
-forum.label.ForumDescription=Description
-
-forum.msg.NoForumsFound=No forums found.
-
-forum.button.NewForum=<u>N</u>ew Forum
-forum.button.NewForum.accesskey=N
-forum.button.ManageForums=Mana<u>g</u>e Forums
-forum.button.ManageForums.accesskey=G
-
-forum.button.Edit=Edit
-forum.button.ResetFeed=Clear Feed
-forum.button.MoveUp=Move Up
-forum.button.MoveDown=Move Down
-forum.button.SaveNoKey=Save
-forum.button.Save=<u>S</u>ave
-forum.button.Save.accesskey=S
-forum.button.Update=<u>U</u>pdate
-forum.button.Update.accesskey=U
-forum.button.Remove=<u>D</u>elete
-forum.button.Remove.accesskey=Delete
-forum.button.CancelNoKey=Cancel
-forum.button.Cancel=<u>C</u>ancel
-forum.button.Cancel.accesskey=C
-forum.button.Exit=<u>E</u>xit
-forum.button.Exit.accesskey=E
-forum.button.NewTopic=<u>N</u>ew Topic
-forum.button.NewTopic.accesskey=N
-forum.button.ForumList=F<u>o</u>rum List
-forum.button.ForumList.accesskey=O
-forum.button.TopicList=<u>T</u>opic List
-forum.button.TopicList.accesskey=T
-forum.button.Reply=R<u>e</u>ply
-forum.button.Reply.accesskey=E
-forum.button.Reply.nokey=Reply
-forum.button.Quote=<u>Q</u>uote
-forum.button.Quote.accesskey=Q
-forum.button.Quote.nokey=Quote
-forum.button.RemoveReply=Remove
-forum.button.PreviousPosting=Pre<u>v</u>ious
-forum.button.PreviousPosting.accesskey=V
-forum.button.NextPosting=Ne<u>x</u>t
-forum.button.NextPosting.accesskey=X
-
-forum.label.replyForm.Name=Name
-forum.label.replyForm.Email=E-mail address (optional)
-forum.label.replyForm.Homepage=Homepage URL (optional)
-forum.label.replyForm.Subject=Subject
-forum.label.replyForm.Message=Message
-
-forum.label.WroteOn=wrote on
-forum.label.reply.FeedEntryTitlePrefix=Re:
-
-forum.msg.Feed.Create=Created syndication feed for this forum.
-forum.msg.Feed.Remove=Removed syndication feed of this forum.
-forum.msg.Feed.Reset=Queued removal of all feed entries from the syndication feed of this directory, please update to finalize.
-
-forum.msg.Forum.Persist=Forum '{0}' has been saved.
-forum.msg.Forum.Update=Forum '{0}' has been updated.
-forum.msg.Forum.Delete=Forum '{0}' has been deleted.
-
-forum.msg.Topic.Persist=Topic '{0}' has been saved.
-forum.msg.Topic.Update=Topic '{0}' has been updated.
-forum.msg.Topic.Delete=Topic '{0}' has been deleted.
-
-forum.msg.Reply.Persist=Reply '{0}' has been saved.
-forum.msg.Reply.Update=Reply '{0}' has been updated.
-forum.msg.Reply.Delete=Reply '{0}' has been deleted.
-
Deleted: trunk/examples/wiki/src/etc/i18n/messages_jiraIssueList_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_jiraIssueList_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_jiraIssueList_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,10 +0,0 @@
-jiraIssueList.preferences.Name=Plugin: JIRA Issue List
-jiraIssueList.preferences.Title=Title of isse list box
-jiraIssueList.preferences.Url=URL of JIRA website
-jiraIssueList.preferences.Username=JIRA XML-RPC remote username
-jiraIssueList.preferences.Password=JIRA XML-RPC remote password
-jiraIssueList.preferences.FilterId=ID of JIRA filter for remote request
-jiraIssueList.preferences.NumberOfIssues=Number of issues shown in list
-jiraIssueList.preferences.TruncateSummary=Truncate summary after characters
-
-jiraIssueList.label.NoIssuesFound=No issues found.
Deleted: trunk/examples/wiki/src/etc/i18n/messages_lastModifiedDocuments_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_lastModifiedDocuments_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_lastModifiedDocuments_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,6 +0,0 @@
-lastModifiedDocuments.preferences.Name=Plugin: Last Modified Documents
-lastModifiedDocuments.preferences.Title=Title of plugin box
-lastModifiedDocuments.preferences.NumberOfItems=Number of items shown in list
-lastModifiedDocuments.preferences.ShowUsernames=Show user names
-lastModifiedDocuments.preferences.DocumentTitleLength=Truncate document titles after characters
-
Deleted: trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_tags_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,8 +0,0 @@
-tags.preferences.Name=Plugin: Tags
-tags.preferences.LinkToCurrentDocument=Link to current (aggregator) document
-tags.preferences.MaxNumberOfTags=Maximum number of tags displayed
-tags.preferences.MinimumCount=Minimum number of occurences of a tag
-tags.preferences.Cloud=Display tags as cloud (not list)
-
-tags.label.Tags=Tags
-tags.label.All=All...
Deleted: trunk/examples/wiki/src/etc/i18n/messages_userProfile_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_userProfile_en.properties 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/etc/i18n/messages_userProfile_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1 +0,0 @@
-userProfile.label.NoProfile=If you are #{currentDocument.createdBy.fullname}, please login and edit your profile.
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -21,7 +21,7 @@
import java.util.Properties;
/**
- * Doesn't do much useful stuff except printing a log message and firing the "Wiki.started" event.
+ * Doesn't do much useful stuff except printing a log message and firing the "Wiki.startup" event.
*
* @author Christian Bauer
*/
@@ -59,7 +59,7 @@
ManagementFactory.getPlatformMBeanServer().registerMBean(mBean, hibernateMBeanName);
}
- Events.instance().raiseEvent("Wiki.started");
+ Events.instance().raiseEvent("Wiki.startup");
log.info("Started LaceWiki for application '"+appname+"'...");
@@ -74,6 +74,7 @@
log.info("unregistering Hibernate statistics MBean");
ManagementFactory.getPlatformMBeanServer().unregisterMBean(hibernateMBeanName);
}
+
log.info("Stopped LaceWiki for application '"+appname+"'...");
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -24,6 +24,8 @@
import org.jboss.seam.wiki.core.search.IndexManager;
import org.jboss.seam.wiki.core.search.metamodel.SearchRegistry;
import org.jboss.seam.wiki.core.search.metamodel.SearchableEntity;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
import org.jboss.seam.wiki.preferences.PreferenceVisibility;
import org.jboss.seam.wiki.util.Progress;
@@ -198,4 +200,24 @@
if (indexingProgressMonitors != null) indexingProgressMonitors.remove(className);
}
+ // ####################### PLUGINS ##################################
+
+ @In
+ private PluginRegistry pluginRegistry;
+
+ private List<Plugin> installedPlugins;
+ private Plugin selectedInstalledPlugin;
+
+ public List<Plugin> getInstalledPlugins() {
+ if (installedPlugins == null) installedPlugins = pluginRegistry.getPlugins();
+ return installedPlugins;
+ }
+
+ public void selectInstalledPlugin(Plugin selectedPlugin) {
+ selectedInstalledPlugin = selectedPlugin;
+ }
+
+ public Plugin getSelectedInstalledPlugin() {
+ return selectedInstalledPlugin;
+ }
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -7,10 +7,8 @@
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
+import org.jboss.seam.web.ServletContexts;
+import org.jboss.seam.annotations.*;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Events;
import org.jboss.seam.log.Log;
@@ -22,6 +20,7 @@
import org.jboss.seam.wiki.core.renderer.MacroWikiTextRenderer;
import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
import org.jboss.seam.wiki.core.model.*;
+import org.jboss.seam.wiki.core.model.Role;
import org.jboss.seam.wiki.util.Hash;
import org.jboss.seam.wiki.util.WikiUtil;
@@ -196,4 +195,13 @@
Contexts.getSessionContext().set("currentAccessLevel", Role.GUESTROLE_ACCESSLEVEL);
}
+ @Observer("org.jboss.seam.security.loginSuccessful")
+ public void extendSessionTime() {
+ //ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(LONG_SESSION_TIME);
+ }
+
+ @Observer("org.jboss.seam.security.loggedOut")
+ public void resetSessionTime() {
+ //ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(STD_SESSION_TIME);
+ }
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Breadcrumb.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -7,6 +7,7 @@
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiNode;
+import org.jboss.seam.wiki.core.cache.PageFragmentCache;
import java.io.Serializable;
import java.util.ArrayList;
@@ -17,6 +18,9 @@
@Scope(ScopeType.PAGE)
public class Breadcrumb implements Serializable {
+ public static final String CACHE_REGION = "wiki.Breadcrumb";
+ public static final String CACHE_KEY = "BreadcrumbOfNodeId";
+
@Logger
Log log;
@@ -50,4 +54,24 @@
return (node.isInstance(WikiDirectory.class) && node.getId().equals(((WikiDirectory) Component.getInstance("wikiRoot")).getId()));
}
+ public boolean isCacheEnabled() {
+ return false;
+ // TODO: Cache disabled, needs to consider year/month/day and tag request parameters in cache key
+ //return currentLocation != null;
+ }
+
+ public String getCacheKey() {
+ return currentLocation != null ? CACHE_KEY + currentLocation.getId().toString() : null;
+ }
+
+ public String getCacheRegion() {
+ return CACHE_REGION;
+ }
+
+ @Observer(value = { "Node.updated"})
+ public void invalidateCache(WikiNode node) {
+ log.debug("invalidating cached item: " + CACHE_KEY +node.getId());
+ PageFragmentCache.instance().remove(CACHE_REGION, CACHE_KEY +node.getId());
+ }
+
}
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-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -21,6 +21,7 @@
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.core.action.prefs.CommentsPreferences;
import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
+import org.jboss.seam.wiki.core.ui.WikiRedirect;
import org.jboss.seam.wiki.util.WikiUtil;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
@@ -128,9 +129,14 @@
Events.instance().raiseEvent("Comment.persisted");
endConversation();
- return "redirectToComment";
+ WikiRedirect.instance()
+ .setWikiDocument(documentHome.getInstance())
+ .setPropagateConversation(false)
+ .setFragment("comment" + getInstance().getId())
+ .execute();
}
- return null; // Prevent navigation
+
+ return null; // No navigation
}
public String remove(Long commentId) {
@@ -273,36 +279,42 @@
}
@Begin(flushMode = FlushModeType.MANUAL, join = true)
- public String newComment() {
+ public void newComment() {
initEditor(false);
showForm = true;
- return "redirectToDocument";
}
@Begin(flushMode = FlushModeType.MANUAL, join = true)
- public String replyTo() {
+ public void replyTo() {
+ prepareReply();
+ WikiRedirect.instance()
+ .setWikiDocument(documentHome.getInstance())
+ .setPropagateConversation(true)
+ .execute();
+ }
+
+ @Begin(flushMode = FlushModeType.MANUAL, join = true)
+ public void quote() {
+ prepareReply();
+ setQuotedContent((WikiComment)getParentNode());
+ WikiRedirect.instance()
+ .setWikiDocument(documentHome.getInstance())
+ .setPropagateConversation(true)
+ .execute();
+ }
+
+ private void prepareReply() {
if (parentCommentId == null || parentCommentId.equals(0l))
throw new InvalidWikiRequestException("Missing parentCommentId request parameter");
getLog().debug("reply to comment id: " + parentCommentId);
- String outcome = newComment();
+ newComment();
setParentNodeId(parentCommentId);
getInstance(); // Init the parent
setReplySubject((WikiComment)getParentNode());
-
- return outcome;
}
- @Begin(flushMode = FlushModeType.MANUAL, join = true)
- public String quote() {
-
- String outcome = replyTo();
- setQuotedContent((WikiComment)getParentNode());
-
- return outcome;
- }
-
public void rate(Long commentId, int rating) {
getLog().debug("rating comment with id: " + commentId + " as " + rating);
@@ -328,12 +340,16 @@
}
getInstance().setRating(rating);
+ Events.instance().raiseEvent("Comment.rated");
}
}
- public String cancel() {
+ public void cancel() {
endConversation();
- return "redirectToDocumentNoConversation";
+ WikiRedirect.instance()
+ .setWikiDocument(documentHome.getInstance())
+ .setPropagateConversation(false)
+ .execute();
}
@RequestParameter("showCommentForm")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -205,13 +205,13 @@
refreshChildNodes();
}
- @Observer(value = {"PersistenceContext.filterReset", "Node.refreshList"}, create = false)
+ @Observer(value = {"PersistenceContext.filterReset", "Node.removed"}, create = false)
public void loadTree() {
WikiDirectory wikiRoot = (WikiDirectory) Component.getInstance("wikiRoot");
treeRoot = wikiNodeDAO.findWikiDirectoryTree(wikiRoot);
}
- @Observer(value = {"PersistenceContext.filterReset", "Node.refreshList", "Pager.pageChanged"}, create = false)
+ @Observer(value = {"PersistenceContext.filterReset", "Node.removed", "Pager.pageChanged"}, create = false)
public void refreshChildNodes() {
log.debug("refreshing child nodes of current directory: " + getInstance());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -121,7 +121,7 @@
tagEditor.setTags(doc.getTags());
- doc.setEnableComments( Preferences.getInstance(CommentsPreferences.class).getEnableByDefault() );
+ doc.setEnableComments( Preferences.instance().get(CommentsPreferences.class).getEnableByDefault() );
return doc;
}
@@ -222,7 +222,7 @@
// Feeds should not be removed by a maintenance thread: If there
// is no activity on the site, feeds shouldn't be empty but show the last updates.
Calendar oldestDate = GregorianCalendar.getInstance();
- oldestDate.add(Calendar.DAY_OF_YEAR, -Preferences.getInstance(WikiPreferences.class).getPurgeFeedEntriesAfterDays().intValue());
+ oldestDate.add(Calendar.DAY_OF_YEAR, -Preferences.instance().get(WikiPreferences.class).getPurgeFeedEntriesAfterDays().intValue());
feedDAO.purgeOldFeedEntries(oldestDate.getTime());
// Write history log and prepare a new copy for further modification
@@ -239,7 +239,7 @@
historicalCopy.flatCopy(getInstance(), true);
// Reset form
- setMinorRevision( Preferences.getInstance(DocumentEditorPreferences.class).getMinorRevisionEnabled() );
+ setMinorRevision( Preferences.instance().get(DocumentEditorPreferences.class).getMinorRevisionEnabled() );
}
return true;
@@ -385,7 +385,7 @@
public boolean isMinorRevision() {
// Lazily initalize preferences
if (minorRevision == null)
- minorRevision = Preferences.getInstance(DocumentEditorPreferences.class).getMinorRevisionEnabled();
+ minorRevision = Preferences.instance().get(DocumentEditorPreferences.class).getMinorRevisionEnabled();
return minorRevision;
}
public void setMinorRevision(boolean minorRevision) { this.minorRevision = minorRevision; }
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Menu.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -13,6 +13,7 @@
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.nestedset.query.NestedSetNodeWrapper;
+import org.jboss.seam.wiki.core.cache.PageFragmentCache;
import java.io.Serializable;
@@ -27,6 +28,9 @@
@Scope(ScopeType.SESSION)
public class Menu implements Serializable {
+ public static final String CACHE_REGION = "wiki.MainMenu";
+ public static final String CACHE_KEY = "MainMenuForAccessLevel";
+
@Logger
Log log;
@@ -39,6 +43,9 @@
@In("#{preferences.get('Wiki')}")
WikiPreferences wikiPreferences;
+ @In
+ Integer currentAccessLevel;
+
NestedSetNodeWrapper<WikiDirectory> root;
public NestedSetNodeWrapper<WikiDirectory> getRoot() {
if (root == null) {
@@ -57,4 +64,18 @@
wikiPreferences.isMainMenuShowAdminOnly()
);
}
+
+ public String getCacheRegion() {
+ return CACHE_REGION;
+ }
+
+ public String getCacheKey() {
+ return CACHE_KEY + currentAccessLevel;
+ }
+
+ @Observer(value = { "Node.updated", "Node.removed"})
+ public void invalidateCache() {
+ PageFragmentCache.instance().removeAll(CACHE_REGION);
+ }
+
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -92,7 +92,7 @@
if (visibleWorkspace) {
// Set workspace description of the current conversation
String desc = getEditorWorkspaceDescription(getNodeId() == null);
- WikiPreferences prefs = Preferences.getInstance(WikiPreferences.class);
+ WikiPreferences prefs = Preferences.instance().get(WikiPreferences.class);
if (desc != null && desc.length() > prefs.getWorkspaceSwitcherDescriptionLength()) {
desc = desc.substring(0, prefs.getWorkspaceSwitcherDescriptionLength().intValue()) + "...";
}
@@ -236,6 +236,7 @@
String outcome = super.persist();
if (outcome != null) {
Events.instance().raiseEvent("PreferenceEditor.flushAll");
+ Events.instance().raiseEvent("Node.persisted", getInstance());
}
return outcome;
}
@@ -261,7 +262,7 @@
String outcome = super.update();
if (outcome != null) {
Events.instance().raiseEvent("PreferenceEditor.flushAll");
- Events.instance().raiseEvent("Node.updated");
+ Events.instance().raiseEvent("Node.updated", getInstance());
}
return outcome;
}
@@ -283,7 +284,7 @@
getNodeRemover().removeDependencies(getInstance());
String outcome = super.remove();
if (outcome != null) {
- Events.instance().raiseEvent("Node.removed");
+ Events.instance().raiseEvent("Node.removed", getInstance());
}
return outcome;
}
@@ -294,7 +295,7 @@
initEditor(false);
String outcome = remove();
if (outcome != null) {
- Events.instance().raiseEvent("Node.refreshList");
+ Events.instance().raiseEvent("Node.removed", getInstance());
}
return outcome;
}
@@ -310,7 +311,7 @@
getEntityManager().flush();
trashedMessage();
- Events.instance().raiseEvent("Node.removed");
+ Events.instance().raiseEvent("Node.removed", getInstance());
return "removed";
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -159,7 +159,11 @@
if (Identity.instance().hasPermission("User", "isAdmin", Component.getInstance("currentUser"))) {
// Current user is admin and creating a new account, the new account is active automatically
getInstance().setActivated(true);
- return super.persist();
+ String outcome = super.persist();
+ if (outcome != null) {
+ org.jboss.seam.core.Events.instance().raiseEvent("User.persisted", getInstance());
+ }
+ return outcome;
} else {
// Set activation code (unique user in time)
@@ -173,7 +177,7 @@
// Send confirmation email
renderer.render("/themes/"
- + Preferences.getInstance(WikiPreferences.class).getThemeName()
+ + Preferences.instance().get(WikiPreferences.class).getThemeName()
+ "/mailtemplates/confirmationRegistration.xhtml");
/* For debugging
@@ -187,6 +191,8 @@
facesMessages.add(FacesMessage.SEVERITY_ERROR, "Couldn't send confirmation email: " + ex.getMessage());
return "error";
}
+
+ org.jboss.seam.core.Events.instance().raiseEvent("User.persisted", getInstance());
}
return outcome;
}
@@ -272,6 +278,8 @@
String outcome = super.update();
if (outcome != null) {
+ org.jboss.seam.core.Events.instance().raiseEvent("User.updated", getInstance());
+
User currentUser = (User)Component.getInstance("currentUser");
if (getInstance().getId().equals(currentUser.getId())) {
// Updated profile of currently logged-in user
@@ -301,7 +309,11 @@
prefProvider.deleteUserPreferenceValues(getInstance());
prefProvider.flush();
- return super.remove();
+ String outcome = super.remove();
+ if (outcome != null) {
+ org.jboss.seam.core.Events.instance().raiseEvent("User.removed", getInstance());
+ }
+ return outcome;
}
@Restrict("#{s:hasPermission('User', 'edit', userHome.instance)}")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -124,7 +124,7 @@
// Send confirmation email
renderer.render("/themes/"
- + Preferences.getInstance(WikiPreferences.class).getThemeName()
+ + Preferences.instance().get(WikiPreferences.class).getThemeName()
+ "/mailtemplates/resetPassword.xhtml");
facesMessages.addFromResourceBundleOrDefault(
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -11,6 +11,9 @@
import net.sf.ehcache.Element;
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.PluginModule;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.contexts.Contexts;
@@ -18,61 +21,102 @@
import org.jboss.seam.log.Logging;
import java.io.Serializable;
+import java.util.*;
/**
* Override Seam built-in pojoCache component with EHCache implementation.
+ * <p>
+ * This component creates cache regions on startup. The regions are obtained from the
+ * <tt>pluginRegistry</tt> and each plugin module. If desired, individual
+ * </p>
*
* @author Christian Bauer
*/
-
@BypassInterceptors
public class PageFragmentCache {
private static final LogProvider log = Logging.getLogProvider(PageFragmentCache.class);
- public static final String CACHE_REGION_NAME = "WikiPageFragmentCache";
-
// This is threadsafe
- Cache cache;
+ Map<String, Cache> caches = new HashMap<String, Cache>();
+ List<String> cacheRegions;
+
+ public List<String> getCacheRegions() {
+ return cacheRegions;
+ }
+
+ public void setCacheRegions(List<String> cacheRegions) {
+ this.cacheRegions = cacheRegions;
+ }
+
@Create
- public void start() throws Exception {
+ public void startup() throws Exception {
- log.info("starting wiki page fragment cache region");
+ log.info("starting wiki page fragment cache regions");
try {
CacheManager manager = EHCacheManager.instance();
- cache = EHCacheManager.instance().getCache(CACHE_REGION_NAME);
- if (cache == null) {
- log.warn("Could not find configuration [" + CACHE_REGION_NAME + "]; using defaults.");
- manager.addCache(CACHE_REGION_NAME);
- cache = manager.getCache(CACHE_REGION_NAME);
- log.debug("started EHCache region: " + CACHE_REGION_NAME);
+ Set<String> requiredCacheRegions = new HashSet<String>();
+
+ if (cacheRegions != null) {
+ requiredCacheRegions.addAll(cacheRegions);
}
+ PluginRegistry pluginRegistry = PluginRegistry.instance();
+ for (Plugin plugin : pluginRegistry.getPlugins()) {
+ for (PluginModule pluginModule : plugin.getModules()) {
+ if (pluginModule.getFragmentCacheRegions() != null)
+ requiredCacheRegions.addAll(pluginModule.getFragmentCacheRegions());
+ }
+ }
+
+ for (String cacheRegion : requiredCacheRegions) {
+ Cache cache = EHCacheManager.instance().getCache(cacheRegion);
+ if (cache == null) {
+ log.info("could not find configuration for region '" + cacheRegion + "', using defaults");
+ manager.addCache(cacheRegion);
+ cache = manager.getCache(cacheRegion);
+ log.debug("started EHCache region: " + cacheRegion);
+ }
+ caches.put(cacheRegion, cache);
+ }
+
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
- public void put(Serializable key, String content) {
- cache.put(new Element(key, content));
+ public void put(String region, Serializable key, String content) {
+ if (!caches.containsKey(region))
+ throw new IllegalStateException("can't put into uninitialized cache region: " + region);
+ caches.get(region).put(new Element(key, content));
}
- public String get(Serializable key) {
- Element result = cache.get(key);
+ public String get(String region, Serializable key) {
+ if (!caches.containsKey(region))
+ throw new IllegalStateException("can't get from uninitialized cache region: " + region);
+ Element result = caches.get(region).get(key);
return result != null ? (String)result.getValue() : null;
}
- public void remove(Serializable key) {
- cache.remove(key);
+ public void remove(String region, Serializable key) {
+ if (!caches.containsKey(region))
+ throw new IllegalStateException("can't remove from uninitialized cache region: " + region);
+ caches.get(region).remove(key);
}
+ public void removeAll(String region) {
+ if (!caches.containsKey(region))
+ throw new IllegalStateException("can't remove all from uninitialized cache region: " + region);
+ caches.get(region).removeAll();
+ }
+
public static PageFragmentCache instance() {
if (!Contexts.isApplicationContextActive()) {
throw new IllegalStateException("No active application scope");
}
- return (PageFragmentCache) Component.getInstance(PageFragmentCache.class, ScopeType.APPLICATION);
+ return (PageFragmentCache) Component.getInstance("pageFragmentCache", ScopeType.APPLICATION);
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/UserRoleAccessFactory.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -86,7 +86,7 @@
@Factory(value = "newUserDefaultRole", scope = ScopeType.SESSION)
public Role getDefaultRole() {
- UserManagementPreferences userPrefs = Preferences.getInstance(UserManagementPreferences.class);
+ UserManagementPreferences userPrefs = Preferences.instance().get(UserManagementPreferences.class);
try {
return (Role) entityManager
.createQuery("select r from Role r where r.name = '"+userPrefs.getNewUserInRole()+"'")
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -33,7 +33,7 @@
@Logger
Log log;
- @Observer("Wiki.started")
+ @Observer("Wiki.startup")
public void checkPreferences() {
log.info("checking wiki preferences...");
@@ -77,7 +77,7 @@
try {
return (WikiDocument) em
.createQuery("select d from WikiDocument d where d.id = :id")
- .setParameter("id", Preferences.getInstance(WikiPreferences.class).getDefaultDocumentId())
+ .setParameter("id", Preferences.instance().get(WikiPreferences.class).getDefaultDocumentId())
.setHint("org.hibernate.comment", "Loading wikiStart")
.setHint("org.hibernate.cacheable", false)
.getSingleResult();
@@ -87,7 +87,7 @@
// TODO: Message instead!
throw new RuntimeException("Couldn't find wiki default start document with id '"
- + Preferences.getInstance(WikiPreferences.class).getDefaultDocumentId() +"'");
+ + Preferences.instance().get(WikiPreferences.class).getDefaultDocumentId() +"'");
}
// Loads the same instance into a different persistence context
@@ -112,7 +112,7 @@
public WikiDirectory loadMemberArea() {
log.debug("loading member area");
EntityManager em = (EntityManager)Component.getInstance("entityManager");
- String memberAreaName = Preferences.getInstance(WikiPreferences.class).getMemberArea();
+ String memberAreaName = Preferences.instance().get(WikiPreferences.class).getMemberArea();
try {
return (WikiDirectory) em
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.wikiname = :name and d.parent.parent is null")
@@ -135,7 +135,7 @@
public WikiDirectory loadTrashArea() {
log.debug("loading trash area");
EntityManager em = (EntityManager)Component.getInstance("entityManager");
- String trashAreaName = Preferences.getInstance(WikiPreferences.class).getTrashArea();
+ String trashAreaName = Preferences.instance().get(WikiPreferences.class).getTrashArea();
try {
return (WikiDirectory) em
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.wikiname = :name and d.parent.parent is null")
@@ -158,7 +158,7 @@
public WikiDirectory loadHelpArea() {
log.debug("loading help area");
EntityManager em = (EntityManager)Component.getInstance("entityManager");
- String helpAreaName = Preferences.getInstance(WikiPreferences.class).getHelpArea();
+ String helpAreaName = Preferences.instance().get(WikiPreferences.class).getHelpArea();
try {
return (WikiDirectory) em
.createQuery("select d from WikiDirectory d left join fetch d.feed where d.wikiname = :name and d.parent.parent is null")
Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiMacro.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiMacro.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiMacro.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,97 +0,0 @@
-package org.jboss.seam.wiki.core.engine;
-
-import java.io.Serializable;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-public class WikiMacro implements Serializable {
-
- /* TODO: Extract metadata and build macro framework
- protected String[] skins = {"d", "m"}
- protected long accessLevel = 0;
-
- protected boolean documentDiscriminator = false;
-
- protected boolean reentrant = true;
- protected boolean renderedOnce = false;
- protected boolean affectsRenderingOnly = true;
-
- protected boolean appliesToHeader = false;
- protected boolean appliesToContent = true;
- protected boolean appliesToFooter = false;
-
- protected boolean displayedInPreview = true;
-
- createMethodBuildTime
- createMethodRenderTime
- */
-
- private Integer position;
- private String clientId;
- private String name;
- private SortedMap<String,String> params = new TreeMap<String,String>();
-
- public WikiMacro(String name) {
- this.name = name;
- }
-
- public WikiMacro(Integer position, String name) {
- this.position = position;
- this.name = name;
- }
-
- public Integer getPosition() {
- return position;
- }
-
- public void setPosition(Integer position) {
- this.position = position;
- }
-
- public String getClientId() {
- return clientId;
- }
-
- public void setClientId(String clientId) {
- this.clientId = clientId;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public SortedMap<String, String> getParams() {
- return params;
- }
-
- public void setParams(SortedMap<String, String> params) {
- this.params = params;
- }
-
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- WikiMacro wikiMacro = (WikiMacro) o;
-
- if (!name.equals(wikiMacro.name)) return false;
- if (position != null ? !position.equals(wikiMacro.position) : wikiMacro.position != null) return false;
-
- return true;
- }
-
- public int hashCode() {
- int result;
- result = (position != null ? position.hashCode() : 0);
- result = 31 * result + name.hashCode();
- return result;
- }
-
- public String toString() {
- return "WikiMacro (" + getPosition() + "): " + getName() + " Params: " + getParams().size();
- }
-}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextParser.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextParser.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextParser.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -204,11 +204,10 @@
if ( (macroNames.contains(macro.name) && renderDuplicateMacros) || !macroNames.contains(macro.name)) {
macroNames.add(macro.name);
- WikiMacro wikiMacro = new WikiMacro(macro.name);
- wikiMacro.setParams(macro.params);
- wikiMacro.setPosition(macroPosition++);
+ WikiTextMacro wikiTextMacro = new WikiTextMacro(macro.name, macroPosition++);
+ wikiTextMacro.setParams(macro.params);
- return renderer.renderMacro(wikiMacro);
+ return renderer.renderMacro(wikiTextMacro);
} else {
macroPosition++;
return "[Can't use the same macro twice!]";
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextRenderer.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextRenderer.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,5 +1,7 @@
package org.jboss.seam.wiki.core.engine;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+
import java.util.List;
/**
@@ -15,7 +17,7 @@
public String renderExternalLink(WikiLink externalLink);
public String renderThumbnailImageLink(WikiLink link);
public String renderFileAttachmentLink(int attachmentNumber, WikiLink attachmentLink);
- public String renderMacro(WikiMacro macro);
+ public String renderMacro(WikiTextMacro macro);
public String renderParagraphOpenTag();
public String renderPreformattedOpenTag();
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/FeedEntryManager.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -6,19 +6,22 @@
*/
package org.jboss.seam.wiki.core.feeds;
-import org.jboss.seam.wiki.core.model.FeedEntry;
-import org.jboss.seam.wiki.core.engine.*;
-import org.jboss.seam.wiki.core.renderer.DefaultWikiTextRenderer;
-import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
-import org.jboss.seam.ui.validator.FormattedTextValidator;
+import antlr.ANTLRException;
+import antlr.RecognitionException;
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.log.Log;
+import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.In;
-import antlr.ANTLRException;
-import antlr.RecognitionException;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.ui.validator.FormattedTextValidator;
+import org.jboss.seam.wiki.core.engine.WikiLink;
+import org.jboss.seam.wiki.core.engine.WikiLinkResolver;
+import org.jboss.seam.wiki.core.engine.WikiTextParser;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+import org.jboss.seam.wiki.core.renderer.DefaultWikiTextRenderer;
+import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
/**
* @author Christian Bauer
@@ -43,6 +46,7 @@
parser.setResolver((WikiLinkResolver) Component.getInstance("wikiLinkResolver"));
class FeedRenderer extends DefaultWikiTextRenderer {
+ @Override
public String renderInternalLink(WikiLink internalLink) {
return !internalLink.isBroken() ?
"<a href=\""
@@ -53,7 +57,8 @@
}
// Remove all macros
- public String renderMacro(WikiMacro macro) {
+ @Override
+ public String renderMacro(WikiTextMacro macro) {
return "";
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -7,6 +7,7 @@
package org.jboss.seam.wiki.core.feeds;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.RaiseEvent;
import org.jboss.seam.international.Messages;
import org.jboss.seam.wiki.core.model.WikiComment;
import org.jboss.seam.wiki.core.model.WikiCommentFeedEntry;
@@ -14,6 +15,7 @@
@Name("wikiCommentFeedEntryManager")
public class WikiCommentFeedEntryManager extends FeedEntryManager<WikiComment, WikiCommentFeedEntry> {
+ @RaiseEvent("FeedEntry.created")
public WikiCommentFeedEntry createFeedEntry(WikiComment comment) {
WikiCommentFeedEntry fe = new WikiCommentFeedEntry();
@@ -32,6 +34,7 @@
return fe;
}
+ @RaiseEvent("FeedEntry.updated")
public void updateFeedEntry(WikiCommentFeedEntry fe, WikiComment comment) {
fe.setLink(wikiURLRenderer.renderURL(comment, true));
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -7,12 +7,14 @@
package org.jboss.seam.wiki.core.feeds;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.RaiseEvent;
import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.model.WikiDocumentFeedEntry;
@Name("wikiDocumentFeedEntryManager")
public class WikiDocumentFeedEntryManager extends FeedEntryManager<WikiDocument, WikiDocumentFeedEntry> {
+ @RaiseEvent("FeedEntry.created")
public WikiDocumentFeedEntry createFeedEntry(WikiDocument document) {
WikiDocumentFeedEntry fe = new WikiDocumentFeedEntry();
@@ -31,6 +33,7 @@
return fe;
}
+ @RaiseEvent("FeedEntry.updated")
public void updateFeedEntry(WikiDocumentFeedEntry fe, WikiDocument document) {
fe.setLink(wikiURLRenderer.renderURL(document, true));
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocument.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -2,7 +2,6 @@
import org.hibernate.validator.Length;
import org.jboss.seam.wiki.core.search.annotations.Searchable;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
import javax.persistence.*;
import java.io.Serializable;
@@ -170,47 +169,47 @@
*/
@Transient
- private Collection<WikiMacro> headerMacros = new LinkedHashSet<WikiMacro>();
- public Collection<WikiMacro> getHeaderMacros() { return headerMacros; }
- public void setHeaderMacros(Collection<WikiMacro> headerMacros) {
+ private Collection<WikiTextMacro> headerMacros = new LinkedHashSet<WikiTextMacro>();
+ public Collection<WikiTextMacro> getHeaderMacros() { return headerMacros; }
+ public void setHeaderMacros(Collection<WikiTextMacro> headerMacros) {
this.headerMacros = headerMacros;
setHeaderMacrosString(getMacrosAsString(headerMacros));
setHeader(getMacrosAsWikiText(headerMacros) + getWikiTextWithoutMacros(getHeader()) ); // Text after macros
}
@Transient
- private Collection<WikiMacro> contentMacros = new LinkedHashSet<WikiMacro>();
- public Collection<WikiMacro> getContentMacros() { return contentMacros; }
- public void setContentMacros(Collection<WikiMacro> contentMacros) {
+ private Collection<WikiTextMacro> contentMacros = new LinkedHashSet<WikiTextMacro>();
+ public Collection<WikiTextMacro> getContentMacros() { return contentMacros; }
+ public void setContentMacros(Collection<WikiTextMacro> contentMacros) {
this.contentMacros = contentMacros;
setContentMacrosString(getMacrosAsString(contentMacros));
}
@Transient
- private Collection<WikiMacro> footerMacros = new LinkedHashSet<WikiMacro>();
- public Collection<WikiMacro> getFooterMacros() { return footerMacros; }
- public void setFooterMacros(Collection<WikiMacro> footerMacros) {
+ private Collection<WikiTextMacro> footerMacros = new LinkedHashSet<WikiTextMacro>();
+ public Collection<WikiTextMacro> getFooterMacros() { return footerMacros; }
+ public void setFooterMacros(Collection<WikiTextMacro> footerMacros) {
this.footerMacros = footerMacros;
setFooterMacrosString(getMacrosAsString(footerMacros));
setFooter(getWikiTextWithoutMacros(getFooter()) + getMacrosAsWikiText(footerMacros)); // Text before macros
}
- public void addHeaderMacro(WikiMacro... macro) {
+ public void addHeaderMacro(WikiTextMacro... macro) {
headerMacros.addAll(Arrays.asList(macro));
setHeaderMacros(headerMacros);
}
- public void addFooterMacro(WikiMacro... macro) {
+ public void addFooterMacro(WikiTextMacro... macro) {
footerMacros.addAll(Arrays.asList(macro));
setFooterMacros(footerMacros);
}
- public void removeHeaderMacro(WikiMacro... macro) {
+ public void removeHeaderMacro(WikiTextMacro... macro) {
headerMacros.removeAll(Arrays.asList(macro));
setHeaderMacros(headerMacros);
}
- public void removeFooterMacro(WikiMacro... macro) {
+ public void removeFooterMacro(WikiTextMacro... macro) {
footerMacros.removeAll(Arrays.asList(macro));
setFooterMacros(footerMacros);
}
@@ -226,23 +225,23 @@
}
public boolean macroPresent(String macroName) {
- for (WikiMacro headerMacro : headerMacros) {
+ for (WikiTextMacro headerMacro : headerMacros) {
if (headerMacro.getName().equals(macroName)) return true;
}
- for (WikiMacro contentMacro : contentMacros) {
+ for (WikiTextMacro contentMacro : contentMacros) {
if (contentMacro.getName().equals(macroName)) return true;
}
- for (WikiMacro footerMacro : footerMacros) {
+ for (WikiTextMacro footerMacro : footerMacros) {
if (footerMacro.getName().equals(macroName)) return true;
}
return false;
}
- private void removeMacrosFromCollection(Collection<WikiMacro> macros, String macroName) {
- Iterator<WikiMacro> it = macros.iterator();
+ private void removeMacrosFromCollection(Collection<WikiTextMacro> macros, String macroName) {
+ Iterator<WikiTextMacro> it = macros.iterator();
while (it.hasNext()) {
- WikiMacro wikiMacro = it.next();
- if (wikiMacro.getName().equals(macroName)) it.remove();
+ WikiTextMacro WikiTextMacro = it.next();
+ if (WikiTextMacro.getName().equals(macroName)) it.remove();
}
}
@@ -259,19 +258,19 @@
return textWithoutMacro.toString();
}
- private String getMacrosAsString(Collection<WikiMacro> macros) {
+ private String getMacrosAsString(Collection<WikiTextMacro> macros) {
if (macros.size() == 0) return "";
StringBuilder macrosString = new StringBuilder();
- for (WikiMacro m : macros) {
+ for (WikiTextMacro m : macros) {
macrosString.append(m.getName()).append(" ");
}
return macrosString.substring(0, macrosString.length() - 1);
}
- private String getMacrosAsWikiText(Collection<WikiMacro> macros) {
+ private String getMacrosAsWikiText(Collection<WikiTextMacro> macros) {
if (macros.size() == 0) return "";
StringBuilder macrosString = new StringBuilder();
- for (WikiMacro m : macros) {
+ for (WikiTextMacro m : macros) {
macrosString.append("[<=").append(m.getName());
for (Map.Entry<String, String> param : m.getParams().entrySet()) {
macrosString.append("[").append(param.getKey()).append("=").append(param.getValue()).append("]");
@@ -282,15 +281,16 @@
}
private void setMacroFieldsFromDefaults(WikiDocumentDefaults defaults) {
+
if (defaults.getContentMacros() != null) {
setContentMacros(defaults.getContentMacros());
setContentMacrosString(getMacrosAsString(defaults.getContentMacros()));
content = getMacrosAsWikiText(defaults.getContentMacros()) + "\n" + content;
} else {
- Collection<WikiMacro> macros = new ArrayList<WikiMacro>();
+ Collection<WikiTextMacro> macros = new ArrayList<WikiTextMacro>();
int i = 0;
for (String m : defaults.getContentMacrosAsString()) {
- macros.add(new WikiMacro(i++, m));
+ macros.add(new WikiTextMacro(m, i++));
}
setContentMacros(macros);
setContentMacrosString(getMacrosAsString(macros));
@@ -302,7 +302,7 @@
} else {
int i = 0;
for (String m : defaults.getHeaderMacrosAsString()) {
- addHeaderMacro(new WikiMacro(i++, m));
+ addHeaderMacro(new WikiTextMacro(m, i++));
}
}
@@ -311,7 +311,7 @@
} else {
int i = 0;
for (String m : defaults.getFooterMacrosAsString()) {
- addFooterMacro(new WikiMacro(i++, m));
+ addFooterMacro(new WikiTextMacro(m, i++));
}
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiDocumentDefaults.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,7 +1,5 @@
package org.jboss.seam.wiki.core.model;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
-
import java.util.List;
public class WikiDocumentDefaults {
@@ -31,9 +29,9 @@
}
/**
- * @return a list of <tt>WikiMacro</tt> instances or null if <tt>getHeaderMacrosAsString()</tt> should be called.
+ * @return a list of <tt>WikiTextMacro</tt> instances or null if <tt>getHeaderMacrosAsString()</tt> should be called.
*/
- public List<WikiMacro> getContentMacros() {
+ public List<WikiTextMacro> getContentMacros() {
return null;
}
@@ -46,9 +44,9 @@
}
/**
- * @return a list of <tt>WikiMacro</tt> instances or null if <tt>getHeaderMacrosAsString()</tt> should be called.
+ * @return a list of <tt>WikiTextMacro</tt> instances or null if <tt>getHeaderMacrosAsString()</tt> should be called.
*/
- public List<WikiMacro> getHeaderMacros() {
+ public List<WikiTextMacro> getHeaderMacros() {
return null;
}
@@ -61,9 +59,9 @@
}
/**
- * @return a list of <tt>WikiMacro</tt> instances or null if <tt>getHeaderMacrosAsString()</tt> should be called.
+ * @return a list of <tt>WikiTextMacro</tt> instances or null if <tt>getHeaderMacrosAsString()</tt> should be called.
*/
- public List<WikiMacro> getFooterMacros() {
+ public List<WikiTextMacro> getFooterMacros() {
return null;
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiTextMacro.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiTextMacro.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/model/WikiTextMacro.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.model;
+
+import java.util.TreeMap;
+import java.util.SortedMap;
+import java.io.Serializable;
+
+/**
+ * A dependency-free, pure domain model representation of a macro in wiki text.
+ * <p>
+ * An instance that only has a name has not been produced by parsing wiki text. Then
+ * it would also have a position (every macro found during wiki text parsing is
+ * numbered). Note that equality and hashcode is based on either name comparison,
+ * or if a position is available, on name and position.
+ * </p>
+ *
+ * @author Christian Bauer
+ */
+public class WikiTextMacro implements Serializable {
+
+ private Integer position;
+ private String name;
+ private SortedMap<String,String> params = new TreeMap<String,String>();
+
+ public WikiTextMacro(String name) {
+ this.name = name;
+ }
+
+ public WikiTextMacro(String name, Integer position) {
+ this.name = name;
+ this.position = position;
+ }
+
+ public WikiTextMacro(String name, Integer position, SortedMap<String,String> params) {
+ this.name = name;
+ this.position = position;
+ this.params = params;
+ }
+
+ public WikiTextMacro(WikiTextMacro that) {
+ this(that.getName(), that.getPosition(), that.getParams());
+ }
+
+ public Integer getPosition() {
+ return position;
+ }
+
+ public void setPosition(Integer position) {
+ this.position = position;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public SortedMap<String, String> getParams() {
+ return params;
+ }
+
+ public void setParams(SortedMap<String, String> params) {
+ this.params = params;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ WikiTextMacro wikiMacro = (WikiTextMacro) o;
+
+ if (!name.equals(wikiMacro.name)) return false;
+ if (position != null ? !position.equals(wikiMacro.position) : wikiMacro.position != null) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = (position != null ? position.hashCode() : 0);
+ result = 31 * result + name.hashCode();
+ return result;
+ }
+
+ public String toString() {
+ return "WikiTextMacro (" + getPosition() + "): " + getName() + " Params: " + getParams().size();
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginCacheManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginCacheManager.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginCacheManager.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.wiki.core.cache.PageFragmentCache;
+import org.jboss.seam.core.Events;
+import org.jboss.seam.log.Log;
+
+/**
+ * Cleans the right cache region when an event occurs.
+ *
+ * @author Christian Bauer
+ */
+@Name("pluginCacheManager")
+@AutoCreate
+public class PluginCacheManager {
+
+ @Logger
+ Log log;
+
+ @In
+ PageFragmentCache pageFragmentCache;
+
+ public void invalidateCacheRegion(String region) {
+ log.debug("removing all elements from page fragment cache region: " + region);
+ pageFragmentCache.removeAll(region);
+
+ }
+
+ public static void registerBinding(String eventType, String region) {
+ String binding = "#{pluginCacheManager.invalidateCacheRegion('"+region+"')}";
+ Events.instance().addListener(eventType, binding, String.class);
+ }
+
+}
Added: 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 (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.MacroPluginModule;
+import org.jboss.seam.wiki.core.plugin.binding.PluginBinder;
+import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+
+import java.util.*;
+
+
+/**
+ * @author Christian Bauer
+ */
+@Name("pluginRegistry")
+(a)Scope(ScopeType.APPLICATION)
+@Startup(depends = "preferenceRegistry")
+@BypassInterceptors
+public class PluginRegistry {
+
+ public static final Class[] PLUGIN_BINDERS = {
+ org.jboss.seam.wiki.core.plugin.binding.lacewiki.PluginBinder.class
+ };
+
+ private static final LogProvider log = Logging.getLogProvider(PluginRegistry.class);
+
+ 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>();
+
+ public void addPlugin(String key, Plugin p) {
+ if (plugins.containsKey(key)) {
+ throw new InvalidWikiConfigurationException("Duplicate plugin key: " + key);
+ }
+ plugins.put(key, p);
+ }
+
+ public Plugin removePlugin(String key) {
+ return plugins.remove(key);
+ }
+
+ public Plugin getPlugin(String key) {
+ return plugins.get(key);
+ }
+
+ public List<Plugin> getPlugins() {
+ return Collections.unmodifiableList(new ArrayList(plugins.values()));
+ }
+
+ public SortedMap<String, Plugin> getPluginsByKey() {
+ return Collections.unmodifiableSortedMap(plugins);
+ }
+
+ public SortedMap<String, MacroPluginModule> getMacroPluginModulesByKey() {
+ return macroPluginModulesByKey;
+ }
+
+ public SortedMap<String, MacroPluginModule> getMacroPluginModulesByMacroName() {
+ return macroPluginModulesByMacroName;
+ }
+
+ public WikiPluginMacro createWikiPluginMacro(WikiTextMacro wikiTextMacro) {
+ if (getMacroPluginModulesByMacroName().containsKey(wikiTextMacro.getName())) {
+ log.debug("binding WikiTextMacro metadata to create WikiPluginMacro instance");
+ return new WikiPluginMacro( getMacroPluginModulesByMacroName().get(wikiTextMacro.getName()), wikiTextMacro );
+ } else {
+ return null;
+ }
+ }
+
+ @Create
+ public void startup() {
+ log.info("initializing plugin registry");
+
+ for (Class pluginBinderClass : PLUGIN_BINDERS) {
+ log.debug("calling plugin binder: " + pluginBinderClass.getName());
+ PluginBinder pluginBinder = (PluginBinder)Component.getInstance(pluginBinderClass);
+ pluginBinder.installPlugins(this);
+ }
+
+ log.info("registered plugins: " + plugins.size());
+ }
+
+ public static PluginRegistry instance() {
+ return (PluginRegistry) Component.getInstance(PluginRegistry.class);
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/WikiPluginMacro.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/WikiPluginMacro.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/WikiPluginMacro.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,195 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.web.ServletContexts;
+import org.jboss.seam.international.Messages;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.MacroPluginModule;
+import org.jboss.seam.wiki.util.Hash;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * An instance of a macro in wiki text that has an XHTML include/template.
+ * <p>
+ * Internally it ties the wiki text parsing engine to the plugin and
+ * preferences functionality, as well as template/UI rendering. It is also
+ * the primary API for plugin developers, it's the 'currentMacro' that is
+ * available at all times when writing plugin templates, plugin classes, or
+ * interpolated plugin resources (CSS that contains EL expressions, etc.).
+ * </p>
+ * <p>
+ * It extends a <tt>WikiTextMacro</tt> with additional features that are only
+ * relevant for rendering the macro and its template.
+ * </p>
+ * <p>
+ * A new instance of this class is created for <i>every</i> rendering of wiki
+ * text in the wiki user interface (the visible GUI). You can use the
+ * <tt>attributes</tt> map of this instance to store values that you want to
+ * retrieve again during such rendering. This is especially useful if you
+ * want to avoid generating or loading a value again and again during rendering
+ * of a single piece of wiki text, which can occur if a JSF value binding method
+ * (a getter) is generating/loading a value based on the macro instance.
+ * </p>
+ * <p>
+ * An instance of this class can only be created by the <tt>PluginRegistry</tt>.
+ *
+ * @see PluginRegistry
+ *
+ * @author Christian Bauer
+ */
+public class WikiPluginMacro extends WikiTextMacro implements Serializable {
+
+ private Log log = Logging.getLog(WikiPluginMacro.class);
+
+ public static final String CURRENT_MACRO_EL_VARIABLE = "currentMacro";
+ public static final String PAGE_VARIABLE_PREFIX = "macro";
+ public static final String PAGE_VARIABLE_SEPARATOR = "_";
+ public static final String EVENT_PREFIX = "Macro.";
+
+ public static enum CallbackEvent {
+ VIEW_BUILD(".callback.viewBuild"),
+ BEFORE_VIEW_RENDER(".callback.beforeViewRender"),
+ AFTER_VIEW_RENDER(".callback.afterViewRender");
+ private String name;
+ CallbackEvent(String name) {
+ this.name = name;
+ }
+ public String getName() {
+ return name;
+ }
+ }
+
+ private String clientId;
+ private MacroPluginModule metadata;
+ private Map attributes = new HashMap();
+
+ WikiPluginMacro(MacroPluginModule metadata, WikiTextMacro wikiTextMacro) {
+ super(wikiTextMacro);
+ this.metadata = metadata;
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ public MacroPluginModule getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(MacroPluginModule metadata) {
+ this.metadata = metadata;
+ }
+
+ public Map getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Map attributes) {
+ this.attributes = attributes;
+ }
+
+ // Some convenience methods that generate Strings used all over the place
+
+ public String getPageVariableName() {
+ return PAGE_VARIABLE_PREFIX + getPosition() + PAGE_VARIABLE_SEPARATOR + getName();
+ }
+
+ public String getCallbackEventName(CallbackEvent event) {
+ return EVENT_PREFIX+getName()+event.getName();
+ }
+
+ public String getRequestImagePath() {
+ return getRequestPathPrefix() + getMetadata().getRequestImagePath();
+ }
+
+ public String getRequestCSSPath() {
+ return getRequestPathPrefix() + getMetadata().getRequestCSSPath();
+ }
+
+ private String getRequestPathPrefix() {
+ if (getClientId() == null) {
+ // We need to prefix any request with the currenct web context name if this
+ // is not a JSF request. That means, at this time, simple resource (img, css)
+ // GET requests that use EL which in turn uses instances of this class.
+ return ServletContexts.instance().getRequest().getContextPath();
+ }
+ return "";
+ }
+
+ public String getCacheRegion(String name) {
+ return getMetadata().getQualifiedCacheRegionName(name);
+ }
+
+ public String getMessage(String message) {
+ return Messages.instance().get(getMetadata().getPlugin().getKey() + "." + message);
+ }
+
+ /*
+ Cache keys for macros are unique hashes:
+
+ - unique in all wiki areas: the id of the current document
+ - unique in a particular document: the hashcode of the macro, which includes its name and position in the document
+ - unique with changing macro parameters: the hashcode of any macro parameters
+ - unique for a particular user access level: the current users access level
+ - unique considering the hashCode() of any additional objects passed to the method
+
+ */
+ public String getCacheKey() {
+ return getCacheKey(new Object[]{});
+ }
+
+ public String getCacheKey(Object o) {
+ return getCacheKey(new Object[]{o});
+ }
+
+ public String getCacheKey(Object... objects) {
+ WikiDocument currentDocument = (WikiDocument)Component.getInstance("currentDocument");
+ Integer accessLevel = (Integer) Component.getInstance("currentAccessLevel");
+ Hash hash = (Hash)Component.getInstance(Hash.class);
+
+ log.debug("generating cache key for document: " + currentDocument + " and macro: " + this + " and access level: " + accessLevel);
+ StringBuilder builder = new StringBuilder();
+ if (log.isDebugEnabled()) log.debug("including id of document: " + currentDocument.getId());
+ builder.append( currentDocument.getId() );
+ if (log.isDebugEnabled()) log.debug("including hashCode of this macro: " + Math.abs(hashCode()));
+ builder.append( Math.abs(hashCode()) );
+ if (log.isDebugEnabled()) log.debug("including hashCode of macro params: " + Math.abs(getParams().hashCode()));
+ builder.append( Math.abs(getParams().hashCode()) );
+ if (log.isDebugEnabled()) log.debug("including accessLevel: " + accessLevel);
+ builder.append( accessLevel );
+
+ // This needs to be empty-String safe (the additional objects might be some of the
+ // JSF "oh let's map a non-existant request parameter to an empty string" genius behavior...
+ if (objects != null && objects.length > 0) {
+ for (Object o : objects) {
+ if (Math.abs(o.hashCode()) != 0) {
+ log.debug("including hashCode of object: " + Math.abs(o.hashCode()));
+ builder.append( Math.abs(o.hashCode()) );
+ }
+ }
+ }
+ return hash.hash(builder.toString());
+ }
+
+ public String toString() {
+ return "WikiPluginMacro ClientId '" + getClientId() + "' (" + getPosition() + "): "
+ + getName() + " Params: " + getParams().size();
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/PluginBinder.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/PluginBinder.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/PluginBinder.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin.binding;
+
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
+
+/**
+ * Abstract plugin binding contract.
+ * <p>
+ * Implementations are responsible for reading plugin metadata (XML files,
+ * annotations, whatever) and registering metamodel data on the registry.
+ * </p>
+ * <p>
+ * Plugins are first bound, then validated. Subclasses must implement the
+ * binding procedure and can extend the validation procedure.
+ * </p>
+ *
+ * @author Christian Bauer
+ */
+public abstract class PluginBinder {
+
+ public void installPlugins(PluginRegistry registry) {
+ bindPlugins(registry);
+ validatePlugins(registry);
+ }
+
+ protected abstract void bindPlugins(PluginRegistry registry);
+
+ protected void validatePlugins(PluginRegistry registry) {
+ // TODO: Validate min/max applicationVersions
+ }
+
+}
Added: 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 (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,267 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin.binding.lacewiki;
+
+import org.dom4j.Element;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
+import org.jboss.seam.wiki.core.plugin.PluginCacheManager;
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
+import org.jboss.seam.wiki.core.plugin.metamodel.PluginInfo;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.MacroPluginModule;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.PluginModule;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceRegistry;
+
+import java.util.*;
+
+/**
+ * Parses and binds plugin.xml metadata to plugin metamodel.
+ *
+ * @author Christian Bauer
+ */
+@Name("pluginBinder")
+(a)Scope(ScopeType.APPLICATION)
+@Startup
+public class PluginBinder extends org.jboss.seam.wiki.core.plugin.binding.PluginBinder {
+
+ @Logger
+ Log log;
+
+ @In
+ PreferenceRegistry preferenceRegistry;
+
+ @In
+ Map<String,String> messages;
+
+ @Create
+ public void readDescriptors() {
+ log.debug("reading deployment descriptors as XML...");
+ descriptors = PluginDeploymentHandler.instance().getDescriptorsAsXmlElements();
+ }
+
+ Map<String, Element> descriptors = new HashMap<String, Element>();
+
+ public void bindPlugins(PluginRegistry registry) {
+ log.debug("installing plugins from XML descriptors: " + descriptors.size());
+
+ for (Map.Entry<String, Element> descriptor : descriptors.entrySet()) {
+ log.debug("installing deployment descriptor: " + descriptor.getKey());
+ Element root = descriptor.getValue();
+
+ String pluginKey = root.attributeValue("key");
+
+ log.debug("binding plugin: " + descriptor.getKey());
+ Plugin plugin = new Plugin(descriptor.getKey(), pluginKey);
+ log.debug("plugin descriptor package path: " + plugin.getDescriptorPackagePath());
+ registry.addPlugin(pluginKey, plugin);
+
+ String pluginLabel = root.attributeValue("label");
+ if (pluginLabel == null) pluginLabel = getMessage(plugin.getKey()+".label");
+ plugin.setLabel(pluginLabel);
+
+ bindPluginInfo(root, plugin);
+ bindMacroPluginsModules(registry, root, plugin);
+ }
+
+ bindMacroParameters(registry);
+ }
+
+ private void bindPluginInfo(Element root, Plugin plugin) {
+ List<Element> pluginInfos = root.elements("plugin-info");
+ if (pluginInfos.size() == 1) {
+ PluginInfo pluginInfo = new PluginInfo();
+
+ pluginInfo.setVersion(pluginInfos.get(0).attributeValue("version"));
+
+ String description = pluginInfos.get(0).attributeValue("description");
+ if (description == null) description = getMessage(plugin.getKey()+".description");
+ pluginInfo.setDescription(description);
+
+ List<Element> applicationVersions = pluginInfos.get(0).elements("application-version");
+ if (applicationVersions.size() == 1) {
+ pluginInfo.setApplicationVersion(
+ applicationVersions.get(0).attributeValue("min"),
+ applicationVersions.get(0).attributeValue("max")
+ );
+ }
+
+ List<Element> vendors = pluginInfos.get(0).elements("vendor");
+ if (vendors.size() == 1) {
+ pluginInfo.setVendor(
+ vendors.get(0).attributeValue("name"),
+ vendors.get(0).attributeValue("url")
+ );
+ }
+
+ plugin.setPluginInfo(pluginInfo);
+ }
+ }
+
+ private void bindMacroPluginsModules(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) {
+
+ String moduleKey = macroPluginModuleDescriptor.attributeValue("key");
+ MacroPluginModule macroPluginModule = new MacroPluginModule(plugin, moduleKey);
+
+ log.debug("binding macro plugin module: " + macroPluginModule.getFullyQualifiedKey());
+
+
+ String macroName = macroPluginModuleDescriptor.attributeValue("name");
+ if (registry.getMacroPluginModulesByMacroName().containsKey(macroName)) {
+ throw new InvalidWikiConfigurationException("Duplicate macro name, needs to be globally unique: " + macroName);
+ }
+ macroPluginModule.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);
+
+ bindMacroApplicableTo(macroPluginModuleDescriptor, macroPluginModule);
+ bindMacroRenderOptions(macroPluginModuleDescriptor, macroPluginModule);
+
+ Element skins = macroPluginModuleDescriptor.element("skins");
+ if (skins != null) {
+ bindMacroSkins(skins, macroPluginModule);
+ }
+
+ Element cacheRegions = macroPluginModuleDescriptor.element("cache-regions");
+ if (cacheRegions != null) {
+ bindFragmentCacheRegions(cacheRegions, macroPluginModule);
+ }
+
+ // Finally, bind it
+ plugin.getModules().add(macroPluginModule);
+ registry.getMacroPluginModulesByKey().put(macroPluginModule.getFullyQualifiedKey(), macroPluginModule);
+ registry.getMacroPluginModulesByMacroName().put(macroPluginModule.getName(), macroPluginModule);
+ }
+
+ }
+
+ private void bindFragmentCacheRegions(Element moduleDescriptor, PluginModule module) {
+
+ List<Element> cacheRegions = moduleDescriptor.elements("cache-region");
+ if (cacheRegions.size() > 0) {
+ for (Element cacheRegion : cacheRegions) {
+
+ 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)
+ );
+ }
+ }
+
+ }
+ }
+ }
+
+ private void bindMacroSkins(Element moduleDescriptor, MacroPluginModule module) {
+ List<Element> skins = moduleDescriptor.elements("skin");
+ if (skins.size() > 0) {
+ String[] skinNames = new String[skins.size()];
+ for (int i = 0; i < skins.size(); i++)
+ skinNames[i] = skins.get(i).attributeValue("name");
+ module.setSkins(skinNames);
+ }
+ }
+
+ private void bindMacroApplicableTo(Element moduleDescriptor, MacroPluginModule module) {
+ Element applicableTo = moduleDescriptor.element("applicable-to");
+ if (applicableTo != null) {
+ boolean header = Boolean.parseBoolean(applicableTo.attributeValue("header"));
+ boolean content = Boolean.parseBoolean(applicableTo.attributeValue("content"));
+ boolean footer = Boolean.parseBoolean(applicableTo.attributeValue("footer"));
+ List<MacroPluginModule.DocumentArea> applicableList = new ArrayList<MacroPluginModule.DocumentArea>();
+ if (header) applicableList.add(MacroPluginModule.DocumentArea.HEADER);
+ if (content) applicableList.add(MacroPluginModule.DocumentArea.CONTENT);
+ if (footer) applicableList.add(MacroPluginModule.DocumentArea.FOOTER);
+ MacroPluginModule.DocumentArea[] applicableArray = new MacroPluginModule.DocumentArea[applicableList.size()];
+ module.setApplicableTo(applicableList.toArray(applicableArray));
+ }
+ }
+
+ private void bindMacroRenderOptions(Element moduleDescriptor, MacroPluginModule module) {
+ Element renderOptions = moduleDescriptor.element("render-options");
+ if (renderOptions != null) {
+ List<MacroPluginModule.RenderOption> renderOptionList =
+ new ArrayList<MacroPluginModule.RenderOption>();
+ List<Element> options = renderOptions.elements();
+ for (Element option : options) {
+ if (option.getName().equals("singleton"))
+ renderOptionList.add(MacroPluginModule.RenderOption.SINGLETON);
+ }
+ MacroPluginModule.RenderOption[] renderOptionArray =
+ new MacroPluginModule.RenderOption[renderOptionList.size()];
+ module.setRenderOptions(renderOptionList.toArray(renderOptionArray));
+ }
+
+ }
+
+ private void bindMacroParameters(PluginRegistry registry) {
+ // Iterate through all @Preference entities, look for instanceType() values (which are fully qualified macro keys)
+ Set<PreferenceEntity> entitiesWithInstanceProperties =
+ preferenceRegistry.getPreferenceEntities(PreferenceVisibility.INSTANCE);
+ for (PreferenceEntity entity : entitiesWithInstanceProperties) {
+ if (entity.getMappedTo() != null && entity.getMappedTo().length() > 0) {
+ // All INSTANCE properties of this entity are for one macro, ignore whatever is configured on the properties
+ String macroPluginKey = entity.getMappedTo();
+ MacroPluginModule macroPluginModule = registry.getMacroPluginModulesByKey().get(macroPluginKey);
+ if (macroPluginModule != null) {
+ log.debug("binding all INSTANCE properties as parameters of macro '" + macroPluginModule.getName() +"': " + entity);
+ macroPluginModule.setPreferenceEntity(entity);
+ } else {
+ throw new InvalidWikiConfigurationException(
+ "Configured mapping to macro module '"+macroPluginKey+"' not found for " + entity
+ );
+ }
+ } else {
+ // Some INSTANCE properties are for one macro, others for other macros, so we need to mix and match
+ for (PreferenceEntity.Property property : entity.getPropertiesInstanceVisible()) {
+ if (property.getMappedTo() == null || property.getMappedTo().length() == 0) continue;
+
+ String macroPluginKey = property.getMappedTo();
+ MacroPluginModule macroPluginModule = registry.getMacroPluginModulesByKey().get(macroPluginKey);
+ if (macroPluginModule != null) {
+ log.debug("binding INSTANCE property as parameter of macro '" + macroPluginModule.getName() +"': " + property);
+ macroPluginModule.setPreferenceEntity(entity);
+ macroPluginModule.getParameters().add(property);
+ } else {
+ throw new InvalidWikiConfigurationException(
+ "Configured mapping to macro module '"+macroPluginKey+"' not found for " + property + " in " + entity
+ );
+ }
+ }
+ }
+ }
+ }
+
+ private String getMessage(String key) {
+ String message = messages.get(key);
+ if (message.equals(key)) {
+ throw new InvalidWikiConfigurationException("Could not find message key for label/description: " + key);
+ }
+ return message;
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginDeploymentHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginDeploymentHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginDeploymentHandler.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin.binding.lacewiki;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.wiki.util.XmlDeploymentHandler;
+import org.jboss.seam.deployment.DeploymentStrategy;
+
+/**
+ * Detects all *.plugin.xml files and offers Dom4J elements.
+ *
+ * @author Christian Bauer
+ */
+public class PluginDeploymentHandler extends XmlDeploymentHandler {
+
+ public static final String NAME = "pluginDeploymentHandler";
+
+ public String getExtension() {
+ return ".plugin.xml";
+ }
+
+ public String getName() {
+ return NAME;
+ }
+
+ public boolean isSchemaValidating() {
+ return true;
+ }
+
+ public static PluginDeploymentHandler instance() {
+ DeploymentStrategy deployment = (DeploymentStrategy) Component.getInstance("deploymentStrategy");
+ return (PluginDeploymentHandler) deployment.getDeploymentHandlers().get(NAME);
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NBinder.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NBinder.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NBinder.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin.binding.lacewiki;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+
+import java.util.List;
+
+/**
+ * A factory for <tt>pluginMessageBundleNames</tt> using the
+ * LaceWiki deployment layout. The job of this component is
+ * to transport the names of all found/deployed message bundles
+ * from the deployment scanner/handler into an application-scoped
+ * variable, which we can then access when resources have to be loaded.
+ *
+ * @see PluginI18NDeploymentHandler
+ *
+ * @author Christian Bauer
+ */
+@Name("pluginI18NBinder")
+(a)Scope(ScopeType.APPLICATION)
+@Startup
+public class PluginI18NBinder {
+
+ @Logger
+ Log log;
+
+ private List<String> pluginMessageBundleNames;
+
+ @Create
+ public void registerResourceBundleNames() {
+ log.debug("registering plugin i18n property files as bundle names");
+ pluginMessageBundleNames = PluginI18NDeploymentHandler.instance().getMessageBundleNames();
+ if (log.isDebugEnabled()) {
+ for (String s : pluginMessageBundleNames) {
+ log.debug("registered bundle name: " + s);
+ }
+ }
+ }
+
+ @Factory(value = "pluginMessageBundleNames", autoCreate = true)
+ public List<String> getPluginMessageBundleNames() {
+ return pluginMessageBundleNames;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NDeploymentHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NDeploymentHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginI18NDeploymentHandler.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin.binding.lacewiki;
+
+import org.jboss.seam.wiki.util.PatternDeploymentHandler;
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
+import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
+import org.jboss.seam.core.ResourceLoader;
+import org.jboss.seam.deployment.DeploymentStrategy;
+import org.jboss.seam.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Finds (during startup scanning) all plugin messages files, using the pattern
+ * <tt>[package]/[specialPluginI18Npackagename]/messages_[pluginKey]_[locale].properties</tt>.
+ * Any found file name is converted into a resource bundle name and added to an internal
+ * list. Other components can then read this list by getting an instance of this deployment
+ * handler, during startup.
+ *
+ * @see PluginI18NBinder
+ *
+ * @author Christian Bauer
+ */
+public class PluginI18NDeploymentHandler extends PatternDeploymentHandler {
+
+ public static final String NAME = "pluginI18NDeploymentHandler";
+ public static final String MESSAGES_PATTERN =
+ "^([a-zA-Z0-9/]+)"+Plugin.PACKAGE_I18N_MESSAGES+"_("+Plugin.KEY_PATTERN+")_([a-zA-Z_]+)\\.properties$";
+
+ public String getPattern() {
+ return MESSAGES_PATTERN;
+ }
+
+ public void handleMatch(String s, ClassLoader classLoader, String... matchedGroups) {
+ if (matchedGroups == null || matchedGroups.length != 3) {
+ throw new InvalidWikiConfigurationException("Deployment of i18n properties failed");
+ }
+
+ String packageName = matchedGroups[0];
+ String pluginKey = matchedGroups[1];
+ String locale = matchedGroups[2]; // Don't really need it here
+
+ if (packageName.endsWith(Plugin.PACKAGE_I18N+"/")) {
+ String bundleName = packageName.replaceAll("/", ".") + "messages_" + pluginKey;
+ getMessageBundleNames().add(bundleName);
+ }
+ }
+
+ public String getName() {
+ return NAME;
+ }
+
+ private List<String> messageBundleNames = new ArrayList<String>();
+
+ public List<String> getMessageBundleNames() {
+ return messageBundleNames;
+ }
+
+ public static PluginI18NDeploymentHandler instance() {
+ DeploymentStrategy deployment = (DeploymentStrategy) Component.getInstance("deploymentStrategy");
+ return (PluginI18NDeploymentHandler) deployment.getDeploymentHandlers().get(NAME);
+ }
+
+}
Added: 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 (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,117 @@
+/*
+ * 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;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.PluginModule;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Plugin metadata.
+ *
+ * @author Christian Bauer
+ */
+public class Plugin {
+
+ // Some constants that represent the sub-package layout of a plugin package
+ public static final String PACKAGE_I18N = "i18n";
+ public static final String PACKAGE_I18N_MESSAGES = "messages";
+ public static final String PACKAGE_TEMPLATES = "templates";
+ public static final String PACKAGE_THEMES = "themes";
+ public static final String PACKAGE_THEMES_CSS = "css";
+ public static final String PACKAGE_THEMES_IMG = "img";
+
+ public static final String KEY_PATTERN = "[a-zA-Z0-9]+";
+
+ // Web request paths for resource loading, one for generating URIs, the other for parsing requests
+ public static final String GENERATE_RESOURCE_PATH_THEME = "/seam/resource/wikiPluginTheme";
+ public static final String REGISTER_SEAM_RESOURCE_THEME = "/wikiPluginTheme";
+
+ private String descriptorPath;
+ private String descriptorPackagePath;
+ private String key;
+ private String label;
+ private PluginInfo pluginInfo;
+ private List<PluginModule> modules = new ArrayList<PluginModule>();
+
+ public Plugin(String descriptorPath, String key) {
+ if (!key.matches(KEY_PATTERN))
+ throw new InvalidWikiConfigurationException("Key doesn't match pattern '"+KEY_PATTERN+"': " + key);
+
+ this.descriptorPath = descriptorPath; // '/foo/bar/Baz.plugin.xhtml'
+ this.descriptorPackagePath =
+ descriptorPath.substring(0, descriptorPath.lastIndexOf("/")); // '/foo/bar'
+ this.key = key;
+ }
+
+ public String getDescriptorPath() {
+ return descriptorPath;
+ }
+
+ public String getDescriptorPackagePath() {
+ return descriptorPackagePath;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public PluginInfo getPluginInfo() {
+ return pluginInfo;
+ }
+
+ public void setPluginInfo(PluginInfo pluginInfo) {
+ this.pluginInfo = pluginInfo;
+ }
+
+ public List<PluginModule> getModules() {
+ return modules;
+ }
+
+ public PluginModule getModuleByKey(String key) {
+ for (PluginModule pluginModule : getModules()) {
+ if (pluginModule.getKey().equals(key)) return pluginModule;
+ }
+ return null;
+ }
+
+ public void setModules(List<PluginModule> modules) {
+ this.modules = modules;
+ }
+
+ public String getPackageCSSPath() {
+ return getPackageThemePath() + "/" + Plugin.PACKAGE_THEMES_CSS;
+ }
+
+ public String getPackageThemePath() {
+ String currentTheme = (String) Component.getInstance("currentTheme");
+ return getDescriptorPackagePath()
+ + "/" + Plugin.PACKAGE_THEMES
+ + "/" + currentTheme;
+ }
+
+ public String getPackageDefaultTemplatePath(String macroName) {
+ return getDescriptorPackagePath()
+ + "/" + Plugin.PACKAGE_TEMPLATES
+ + "/" + macroName + ".xhtml";
+ }
+
+ public String getPackageI18NPath() {
+ return getDescriptorPackagePath() + "/" + Plugin.PACKAGE_I18N;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginInfo.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginInfo.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginInfo.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,94 @@
+/*
+ * 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 PluginInfo {
+
+ private String description;
+ private String version;
+ private ApplicationVersion applicationVersion;
+ private Vendor vendor;
+
+ public class ApplicationVersion {
+ private String min;
+ private String max;
+
+ public ApplicationVersion(String min, String max) {
+ this.min = min;
+ this.max = max;
+ }
+
+ public String getMin() {
+ return min;
+ }
+
+ public String getMax() {
+ return max;
+ }
+ }
+
+ public class Vendor {
+ private String name;
+ private String url;
+
+ public Vendor(String name, String url) {
+ this.name = name;
+ this.url = url;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+ }
+
+ public void setApplicationVersion(String min, String max) {
+ this.applicationVersion = new ApplicationVersion(min, max);
+ }
+
+ public void setVendor(String name, String url) {
+ this.vendor = new Vendor(name, url);
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public ApplicationVersion getApplicationVersion() {
+ return applicationVersion;
+ }
+
+ public void setApplicationVersion(ApplicationVersion applicationVersion) {
+ this.applicationVersion = applicationVersion;
+ }
+
+ public Vendor getVendor() {
+ return vendor;
+ }
+
+ public void setVendor(Vendor vendor) {
+ this.vendor = vendor;
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/MacroPluginModule.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/MacroPluginModule.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/MacroPluginModule.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,163 @@
+/*
+ * 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.module;
+
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
+import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
+
+import java.util.*;
+
+/**
+ * @author Christian Bauer
+ */
+public class MacroPluginModule extends PluginModule {
+
+ private String name;
+ private String[] skins = {"d"};
+ private DocumentArea[] applicableTo = {DocumentArea.CONTENT};
+ private RenderOption[] renderOptions;
+ private RenderDependency[] renderDependencies;
+ private PreferenceEntity preferenceEntity;
+ private SortedSet<PreferenceEntity.Property> parameters = new TreeSet<PreferenceEntity.Property>();
+
+ public MacroPluginModule(Plugin plugin, String key) {
+ super(plugin, key);
+ }
+
+ // TODO: This is currently not used at all, implement it in metadata/xsd/renderer
+ public static enum DocumentArea {
+ HEADER, CONTENT, FOOTER
+ }
+
+ public static enum RenderOption {
+ SINGLETON
+ }
+
+ // TODO: This is currently not used at all, implement it in metadata/xsd/renderer
+ public static class RenderDependency {
+
+ private String onMacro;
+ private Type type = Type.REQUIRED;
+
+ public RenderDependency(String onMacro, Type type) {
+ this.onMacro = onMacro;
+ this.type = type;
+ }
+
+ public String getOnMacro() {
+ return onMacro;
+ }
+
+ public Type getType() {
+ return type;
+ }
+
+ public enum Type {
+ REQUIRED, INCOMPATIBLE
+ }
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ 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;
+ }
+
+ public void setApplicableTo(DocumentArea[] applicableTo) {
+ this.applicableTo = applicableTo;
+ }
+
+ public boolean isApplicableTo(DocumentArea area) {
+ for (DocumentArea documentArea : getApplicableTo()) {
+ if (area.equals(documentArea)) return true;
+ }
+ return false;
+ }
+
+ public RenderOption[] getRenderOptions() {
+ return renderOptions;
+ }
+
+ public void setRenderOptions(RenderOption[] renderOptions) {
+ this.renderOptions = renderOptions;
+ }
+
+ public boolean isRenderOptionSet(RenderOption renderOption) {
+ if (getRenderOptions() == null) return false;
+ for (RenderOption option : getRenderOptions()) {
+ if (renderOption.equals(option)) return true;
+ }
+ return false;
+ }
+
+ public RenderDependency[] getRenderDependencies() {
+ return renderDependencies;
+ }
+
+ public void setRenderDependencies(RenderDependency[] renderDependencies) {
+ this.renderDependencies = renderDependencies;
+ }
+
+ public PreferenceEntity getPreferenceEntity() {
+ return preferenceEntity;
+ }
+
+ public void setPreferenceEntity(PreferenceEntity preferenceEntity) {
+ this.preferenceEntity = preferenceEntity;
+ for (PreferenceEntity.Property property : preferenceEntity.getPropertiesInstanceVisible()) {
+ parameters.add(property);
+ }
+ }
+
+ public SortedSet<PreferenceEntity.Property> getParameters() {
+ return parameters;
+ }
+
+ public List<PreferenceEntity.Property> getParametersAsList() {
+ return Collections.unmodifiableList(new ArrayList(parameters));
+ }
+
+ public String getRequestImagePath() {
+ return Plugin.GENERATE_RESOURCE_PATH_THEME
+ + "/" + getPlugin().getKey()
+ + "/" + getKey()
+ + "/" + Plugin.PACKAGE_THEMES_IMG;
+ }
+
+ public String getRequestCSSPath() {
+ return Plugin.GENERATE_RESOURCE_PATH_THEME
+ + "/" + getPlugin().getKey()
+ + "/" + getKey()
+ + "/" + Plugin.PACKAGE_THEMES_CSS;
+ }
+
+ // TODO: This is only used in the Administration UI
+ public String getModuleTypeLabel() {
+ return "Macro";
+ }
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/PluginModule.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/PluginModule.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/module/PluginModule.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,96 @@
+/*
+ * 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.module;
+
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
+import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
+
+import java.util.*;
+
+/**
+ * @author Christian Bauer
+ */
+public abstract class PluginModule {
+
+ private Plugin plugin;
+ private String key;
+ private String label;
+ private String description;
+ private String className;
+ private SortedSet<String> fragmentCacheRegions = new TreeSet<String>();
+
+ protected PluginModule(Plugin plugin, String key) {
+ if (!key.matches(Plugin.KEY_PATTERN))
+ throw new InvalidWikiConfigurationException("Key doesn't match pattern '"+Plugin.KEY_PATTERN+"': " + key);
+
+ this.plugin = plugin;
+ this.key = key;
+ }
+
+ public Plugin getPlugin() {
+ return plugin;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public SortedSet<String> getFragmentCacheRegions() {
+ return fragmentCacheRegions;
+ }
+
+ public List<String> getFragmentCacheRegionsAsList() {
+ return Collections.unmodifiableList(new ArrayList<String>(getFragmentCacheRegions()));
+ }
+
+ public void setFragmentCacheRegions(SortedSet<String> fragmentCacheRegions) {
+ this.fragmentCacheRegions = fragmentCacheRegions;
+ }
+
+ public void addFragmentCacheRegion(String name) {
+ getFragmentCacheRegions().add(getQualifiedCacheRegionName(name));
+ }
+
+ public String getFullyQualifiedKey() {
+ return getPlugin().getKey() + "." + getKey();
+ }
+
+ public String getQualifiedCacheRegionName(String name) {
+ return getFullyQualifiedKey() + "." + name;
+ }
+
+
+}
Added: 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 (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+ targetNamespace="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:plugin="http://jboss.com/products/seam/wiki/plugin">
+
+ <xs:element name="plugin">
+ <xs:annotation>
+ <xs:documentation>Wiki plugin.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="1" maxOccurs="1" ref="plugin:plugin-info"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded" ref="plugin:macro"/>
+ </xs:sequence>
+ <xs:attribute name="key" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>Unique key of this plugin</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="label" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Plain text description of plugin, used in menus.
+ If empty, the key is looked up in the message bundles.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="plugin-info">
+ <xs:annotation>
+ <xs:documentation>
+ Vendor and dependency information of this plugin.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:all>
+ <xs:element ref="plugin:application-version"/>
+ <xs:element ref="plugin:vendor"/>
+ </xs:all>
+ <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:attribute name="version" type="xs:string" use="required"/>
+ </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>
+
+ <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>
+ Plugin module for wiki text macros.
+ </xs:documentation>
+ </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 name="applicable-to">
+ <xs:annotation>
+ <xs:documentation>
+ Areas of a wiki document this macro can be used in.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:attribute name="header" default="false" type="xs:boolean"/>
+ <xs:attribute name="content" default="false" type="xs:boolean"/>
+ <xs:attribute name="footer" default="false" type="xs:boolean"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="render-options" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Macro rendering options.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="singleton">
+ <xs:annotation>
+ <xs:documentation>
+ This macro can only be used once in a particular applicable area of a wiki document.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element minOccurs="0" ref="plugin:cache-regions"/>
+ </xs:all>
+ <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: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="name" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ The name of the wiki text macro.
+ </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:complexType>
+ </xs:element>
+
+ <xs:element name="cache-regions">
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="cache-region">
+ <xs:complexType>
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="invalidation-event">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Name of Seam event that triggers invalidation of all elements in this cache region.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Cache region maintained for this plugin module, at runtime prefixed with plugin key and
+ module key, all separated with underscore.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+
+</xs:schema>
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/preferences/WikiPreferenceProvider.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -4,7 +4,7 @@
import org.jboss.seam.annotations.*;
import org.jboss.seam.log.Log;
import org.jboss.seam.wiki.core.model.User;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
import org.jboss.seam.wiki.preferences.PreferenceProvider;
import org.jboss.seam.wiki.preferences.PreferenceValue;
import org.jboss.seam.wiki.preferences.PreferenceVisibility;
@@ -38,7 +38,7 @@
@Name("preferenceProvider")
@AutoCreate
@Scope(ScopeType.CONVERSATION)
-public class WikiPreferenceProvider implements PreferenceProvider<User, WikiMacro>, Serializable {
+public class WikiPreferenceProvider implements PreferenceProvider<User, WikiPluginMacro>, Serializable {
@Logger Log log;
@@ -52,7 +52,7 @@
List<PreferenceValue> newValueHolders = new ArrayList<PreferenceValue>();
public Set<PreferenceValue> loadValues(String preferenceEntityName,
- User user, WikiMacro instance,
+ User user, WikiPluginMacro instance,
List<PreferenceVisibility> visibilities) {
log.debug("assembling preference values for '"
@@ -137,7 +137,7 @@
return valueHolders;
}
- public void storeValues(Set<PreferenceValue> valueHolders, User user, WikiMacro instance) {
+ public void storeValues(Set<PreferenceValue> valueHolders, User user, WikiPluginMacro instance) {
// TODO: We don't care about the arguments, maybe instance later on when we marshall stuff into WikiMacro params
// The new ones need to be checked if they are dirty and manually persisted
@@ -202,29 +202,33 @@
return new HashSet(values);
}
- private Set<PreferenceValue> loadInstanceValues(String entityName, WikiMacro instance) {
+ private Set<PreferenceValue> loadInstanceValues(String entityName, WikiPluginMacro instance) {
Set<PreferenceValue> valueHolders = new HashSet<PreferenceValue>();
PreferenceEntity preferenceEntity = preferenceRegistry.getPreferenceEntitiesByName().get(entityName);
for (Map.Entry<String, String> entry : instance.getParams().entrySet()) {
- log.trace("converting WikiMacro argument into WikiPreferenceValue: " + entry.getKey());
+ log.trace("converting WikiMacro parameter into WikiPreferenceValue: " + entry.getKey());
// TODO: Maybe we should log the following as DEBUG level, these occur when the user edits macro parameters
PreferenceEntity.Property property = preferenceEntity.getPropertiesByName().get(entry.getKey());
if (property == null) {
- log.info("can't convert unknown property as WikiMacro argument: " + entry.getKey());
+ log.info("can't convert unknown property as WikiMacro parameter: " + entry.getKey());
continue;
}
if (!property.getVisibility().contains(PreferenceVisibility.INSTANCE)) {
- log.info("can't convert WikiMacro argument, not overridable at INSTANCE level: " + entry.getKey());
+ log.info("can't convert WikiMacro parameter, not overridable at INSTANCE level: " + entry.getKey());
continue;
}
+ if (!instance.getMetadata().getParameters().contains(property)) {
+ log.info("can't convert WikiMacro parameter, property is not configured: " + entry.getKey());
+ continue;
+ }
WikiPreferenceValue value = new WikiPreferenceValue(property, entry.getValue());
if (value.getValue() != null) {
- log.trace("converted WikiMacro argument value into WikiPreferenceValue: " + value.getValue());
+ log.trace("converted WikiMacro parameter value into WikiPreferenceValue: " + value.getValue());
valueHolders.add(value);
} else {
- log.info("could not convert WikiMacro argument value into WikiPreferenceValue: " + entry.getKey());
+ log.info("could not convert WikiMacro parameter value into WikiPreferenceValue: " + entry.getKey());
}
}
return valueHolders;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/DefaultWikiTextRenderer.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -2,7 +2,7 @@
import org.jboss.seam.wiki.core.engine.WikiTextRenderer;
import org.jboss.seam.wiki.core.engine.WikiLink;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
import org.jboss.seam.Component;
import java.util.List;
@@ -17,7 +17,7 @@
protected WikiURLRenderer wikiURLRenderer = (WikiURLRenderer) Component.getInstance(WikiURLRenderer.class);
public static enum Headline {
- H1, H2, H3, H4;
+ H1, H2, H3, H4
}
public String renderInternalLink(WikiLink internalLink) {
@@ -45,7 +45,7 @@
return "[Embedded Image]";
}
- public String renderMacro(WikiMacro macro) {
+ public String renderMacro(WikiTextMacro macro) {
return "[Macro]";
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/MacroWikiTextRenderer.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -5,19 +5,20 @@
import antlr.RecognitionException;
import antlr.ANTLRException;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
import org.jboss.seam.wiki.core.engine.WikiTextParser;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
public class MacroWikiTextRenderer extends NullWikiTextRenderer {
- private Set<WikiMacro> macros = new LinkedHashSet<WikiMacro>();
+ private Set<WikiTextMacro> macros = new LinkedHashSet<WikiTextMacro>();
- public String renderMacro(WikiMacro macro) {
+ @Override
+ public String renderMacro(WikiTextMacro macro) {
macros.add(macro);
return null;
}
- public Set<WikiMacro> getMacros() {
+ public Set<WikiTextMacro> getMacros() {
return macros;
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/NullWikiTextRenderer.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -2,7 +2,7 @@
import org.jboss.seam.wiki.core.engine.WikiTextRenderer;
import org.jboss.seam.wiki.core.engine.WikiLink;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
import java.util.List;
@@ -19,7 +19,7 @@
public String renderThumbnailImageLink(WikiLink link) { return null; }
public void setAttachmentLinks(List<WikiLink> attachmentLinks) {}
public void setExternalLinks(List<WikiLink> externalLinks) {}
- public String renderMacro(WikiMacro macro) { return null; }
+ public String renderMacro(WikiTextMacro macro) { return null; }
public String renderParagraphOpenTag() { return "<p>\n"; }
public String renderPreformattedOpenTag() { return "<pre>\n"; }
public String renderBlockquoteOpenTag() { return "<blockquote>\n"; }
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -24,7 +24,7 @@
/**
* Renders outgoing URLs in a unified fashion, see urlrewrite.xml for incoming URL GET request rewriting.
* <p>
- * Note that some of the rendering is delegated into the domain model for subclasses of <tt>Node</tt>.
+ * Note that some of the rendering is delegated into the domain model for subclasses of <tt>WikiNode</tt>.
* </p>
*
* @author Christian Bauer
@@ -36,7 +36,7 @@
public class WikiURLRenderer implements Serializable {
@In
- String basePath;
+ String contextPath;
@In("#{preferences.get('Wiki')}")
WikiPreferences prefs;
@@ -49,7 +49,7 @@
if (search == null || search.length() == 0) return "";
StringBuilder url = new StringBuilder();
String skin = Component.getInstance("skin") != null ? (String)Component.getInstance("skin") : "d";
- url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+ url.append(usePrefsPath ? prefs.getBaseUrl() : contextPath);
url.append("/search_").append(skin).append(".seam?query=").append(encodeURL(search));
return url.toString();
}
@@ -61,7 +61,7 @@
public String renderTagURL(String tag, boolean usePrefsPath) {
if (tag == null || tag.length() == 0) return "";
StringBuilder url = new StringBuilder();
- url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+ url.append(usePrefsPath ? prefs.getBaseUrl() : contextPath);
url.append("/tag/").append(encodeURL(tag));
return url.toString();
}
@@ -73,20 +73,19 @@
public String renderUserInfoURL(User user, boolean usePrefsPath) {
if (user == null || user.getUsername() == null) return "";
StringBuilder url = new StringBuilder();
- url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+ url.append(usePrefsPath ? prefs.getBaseUrl() : contextPath);
url.append("/user/").append(user.getUsername());
return url.toString();
}
public String renderAggregateFeedURL(String aggregateId) {
return renderAggregateFeedURL(aggregateId, false);
-
}
public String renderAggregateFeedURL(String aggregateId, boolean usePrefsPath) {
if (aggregateId == null) return "";
StringBuilder url = new StringBuilder();
- url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+ url.append(usePrefsPath ? prefs.getBaseUrl() : contextPath);
url.append("/service/Feed/atom/Aggregate/").append(aggregateId);
return url.toString();
}
@@ -98,7 +97,7 @@
public String renderFeedURL(Feed feed, String tag, String comments, boolean usePrefsPath) {
if (feed == null || feed.getId() == null) return "";
StringBuilder url = new StringBuilder();
- url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+ url.append(usePrefsPath ? prefs.getBaseUrl() : contextPath);
url.append("/service/Feed/atom").append(feed.getURL());
if (comments != null && comments.length() >0) {
url.append("/Comments/").append(FeedServlet.Comments.valueOf(comments));
@@ -124,7 +123,7 @@
public String renderPermURL(WikiNode node, boolean usePrefsPath) {
if (node == null || node.getId() == null) return "";
- return (usePrefsPath ? prefs.getBaseUrl() : basePath) + "/" + node.getPermURL(prefs.getPermlinkSuffix());
+ return (usePrefsPath ? prefs.getBaseUrl() : contextPath) + "/" + node.getPermURL(prefs.getPermlinkSuffix());
}
public String renderWikiURL(WikiNode node) {
@@ -133,11 +132,17 @@
public String renderWikiURL(WikiNode node, boolean usePrefsPath) {
if (node == null || node.getId() == null) return "";
- return (usePrefsPath ? prefs.getBaseUrl() : basePath) + "/" + node.getWikiURL();
+ return (usePrefsPath ? prefs.getBaseUrl() : contextPath) + "/" + node.getWikiURL();
}
+ // TODO: We need more methods here, rendering year/month/day/tag/etc. on WikiURL (not perm url)
+
private String encodeURL(String s) {
return WikiUtil.encodeURL(s);
}
+ public static WikiURLRenderer instance() {
+ return (WikiURLRenderer) Component.getInstance(WikiURLRenderer.class);
+ }
+
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/metamodel/SearchRegistry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/metamodel/SearchRegistry.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/metamodel/SearchRegistry.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -34,7 +34,7 @@
Map<String, SearchableEntity> searchableEntitiesByName = new HashMap<String, SearchableEntity>();
List<SearchableEntity> searchableEntities = new ArrayList<SearchableEntity>();
- @Observer("Wiki.started")
+ @Observer("Wiki.startup")
public void scanForSearchSupportComponents() {
log.debug("initializing search registry");
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/template/TemplateRegistry.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -36,7 +36,7 @@
Map<Class, String> templates = new HashMap<Class, String>();
List<Class> templateTypes = new ArrayList<Class>();
- @Observer("Wiki.started")
+ @Observer("Wiki.startup")
public void create() {
log.debug("initializing template registry");
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FeedServlet.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -146,7 +146,7 @@
feed.setTitle(Messages.instance().get("lacewiki.msg.AutomaticallyGeneratedFeed") + ": " + aggregateParam);
feed.setPublishedDate(new Date());
// We are lying here, we don't really have an alternate representation link for this resource
- feed.setLink( Preferences.getInstance(WikiPreferences.class).getBaseUrl() );
+ feed.setLink( Preferences.instance().get(WikiPreferences.class).getBaseUrl() );
for (FeedEntryDTO feedEntryDTO : result) {
feed.getFeedEntries().add(feedEntryDTO.getFeedEntry());
}
@@ -307,7 +307,7 @@
Comments comments,
String aggregateParam) {
- WikiPreferences prefs = Preferences.getInstance(WikiPreferences.class);
+ WikiPreferences prefs = Preferences.instance().get(WikiPreferences.class);
// Create feed
SyndFeed syndFeed = new SyndFeedImpl();
Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java (from rev 7883, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/PluginComponentHandler.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,26 @@
+package org.jboss.seam.wiki.core.ui;
+
+import javax.faces.component.UIComponent;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+/**
+ * Chaining up the macros. Still a bit of a riddle, what Pete did here.
+ *
+ * @author Pete Muir
+ */
+public class MacroComponentHandler extends ComponentHandler {
+
+ public MacroComponentHandler(ComponentConfig config) {
+ super(config);
+ }
+
+ @Override
+ protected void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) {
+ super.onComponentCreated(ctx, c, parent);
+ parent.getAttributes().put(UIMacro.NEXT_MACRO, c.getClientId(ctx.getFacesContext()));
+ }
+
+}
Property changes on: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/PluginComponentHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/PluginComponentHandler.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/PluginComponentHandler.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,24 +0,0 @@
-package org.jboss.seam.wiki.core.ui;
-
-import javax.faces.component.UIComponent;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.tag.jsf.ComponentConfig;
-import com.sun.facelets.tag.jsf.ComponentHandler;
-
-public class PluginComponentHandler extends ComponentHandler
-{
-
- public PluginComponentHandler(ComponentConfig config)
- {
- super(config);
- }
-
- @Override
- protected void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent)
- {
- super.onComponentCreated(ctx, c, parent);
- parent.getAttributes().put(UIPlugin.NEXT_PLUGIN, c.getClientId(ctx.getFacesContext()));
- }
-
-}
Copied: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIMacro.java (from rev 7883, trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIPlugin.java)
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIMacro.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIMacro.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,35 @@
+package org.jboss.seam.wiki.core.ui;
+
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+
+import javax.faces.component.UINamingContainer;
+
+/**
+ * A wrapper component that applies to macro includes.
+ * <p>
+ * A macro XHTML template must have a <tt><wiki:macro></tt> root element.
+ * </p>
+ *
+ * @author Pete Muir
+ */
+public class UIMacro extends UINamingContainer {
+
+ public static final String COMPONENT_FAMILY = "org.jboss.seam.wiki.core.ui.UIMacro";
+
+ public static final String NEXT_MACRO = "org.jboss.seam.wiki.core.ui.UIMacro.nextMacro";
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ private WikiPluginMacro wikiPluginMacro;
+
+ public WikiPluginMacro getWikiMacro() {
+ return wikiPluginMacro;
+ }
+
+ public void setWikiMacro(WikiPluginMacro wikiPluginMacro) {
+ this.wikiPluginMacro = wikiPluginMacro;
+ }
+}
Property changes on: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIMacro.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIPlugin.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIPlugin.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIPlugin.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,18 +0,0 @@
-package org.jboss.seam.wiki.core.ui;
-
-import javax.faces.component.UINamingContainer;
-
-public class UIPlugin extends UINamingContainer
-{
-
- public static final String COMPONENT_FAMILY = "org.jboss.seam.wiki.core.ui.UIPlugin";
-
- public static final String NEXT_PLUGIN = "org.jboss.seam.wiki.core.ui.UIPlugin.nextPlugin";
-
- @Override
- public String getFamily()
- {
- return COMPONENT_FAMILY;
- }
-
-}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -18,8 +18,10 @@
import org.jboss.seam.wiki.core.engine.*;
import org.jboss.seam.wiki.core.model.WikiFile;
import org.jboss.seam.wiki.core.model.WikiUploadImage;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
import org.jboss.seam.wiki.core.renderer.DefaultWikiTextRenderer;
import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
@@ -43,9 +45,6 @@
Log log = Logging.getLog(UIWikiFormattedText.class);
- public static final String CURRENT_MACRO_EVENT_VARIABLE = "currentMacro";
- public static final String CURRENT_MACRO_EVENT_VARIABLE_SET = "Macro.render.";
-
public static final String ATTR_LINK_STYLE_CLASS = "linkStyleClass";
public static final String ATTR_BROKEN_LINK_STYLE_CLASS = "brokenLinkStyleClass";
public static final String ATTR_ATTACHMENT_LINK_STYLE_CLASS = "attachmentLinkStyleClass";
@@ -54,9 +53,10 @@
public static final String ATTR_EXTERNAL_TARGET_FRAME = "externalTargetFrame";
public static final String ATTR_LINK_BASE_FILE = "linkBaseFile";
public static final String ATTR_CURRENT_AREA_NUMBER = "currentAreaNumber";
- public static final String ATTR_ENABLE_PLUGINS = "enablePlugins";
+ public static final String ATTR_ENABLE_MACRO_RENDERING = "enableMacroRendering";
+ public static final String ATTR_ENABLE_TRANSIENT_MACROS = "enableTransientMacros";
- private Map<Integer, WikiMacro> pluginMacros;
+ private Map<Integer, WikiPluginMacro> macrosWithTemplateByPosition;
public static final String COMPONENT_FAMILY = "org.jboss.seam.wiki.core.ui.UIWikiFormattedText";
@@ -64,7 +64,7 @@
public UIWikiFormattedText() {
super();
- pluginMacros = new HashMap<Integer, WikiMacro>();
+ macrosWithTemplateByPosition = new HashMap<Integer, WikiPluginMacro>();
}
@Override
@@ -99,6 +99,7 @@
// Set a customized renderer for parser macro callbacks
class WikiFormattedTextRenderer extends DefaultWikiTextRenderer {
+ @Override
public String renderInternalLink(WikiLink internalLink) {
return "<a href=\""
+ (
@@ -119,6 +120,7 @@
+ internalLink.getDescription() + "</a>";
}
+ @Override
public String renderExternalLink(WikiLink externalLink) {
return "<a href=\""
+ WikiUtil.escapeEmailURL(externalLink.getUrl())
@@ -130,6 +132,7 @@
+ WikiUtil.escapeEmailURL(externalLink.getDescription()) + "</a>";
}
+ @Override
public String renderFileAttachmentLink(int attachmentNumber, WikiLink attachmentLink) {
return "<a href=\""
+ wikiURLRenderer.renderURL(baseFile)
@@ -141,6 +144,7 @@
+ attachmentLink.getDescription() + "[" + attachmentNumber + "]" + "</a>";
}
+ @Override
public String renderThumbnailImageLink(WikiLink link) {
// TODO: This is not typesafe and clean, need different rendering strategy for WikiUpload subclasses
@@ -170,16 +174,23 @@
}
}
- public String renderMacro(WikiMacro macro) {
+ @Override
+ public String renderMacro(WikiTextMacro macro) {
- WikiMacro pluginMacro = pluginMacros.get(macro.getPosition());
- if (pluginMacro == null) {
- log.debug("macro is not a plugin, skipping: " + macro);
+ WikiPluginMacro pluginMacroWithTemplate = macrosWithTemplateByPosition.get(macro.getPosition());
+ if (pluginMacroWithTemplate == null) {
+ log.debug("macro does not have an XHTML template/include, skipping: " + macro);
return "";
}
- log.debug("preparing plugin rendering for macro: " + macro);
- UIComponent child = findComponent( pluginMacros.get(macro.getPosition()).getClientId() );
+ log.debug("firing BEFORE_VIEW_RENDER macro event");
+ Events.instance().raiseEvent(
+ pluginMacroWithTemplate.getCallbackEventName(WikiPluginMacro.CallbackEvent.BEFORE_VIEW_RENDER),
+ pluginMacroWithTemplate
+ );
+
+ log.debug("preparing include rendering for macro: " + pluginMacroWithTemplate);
+ UIComponent child = findComponent( pluginMacroWithTemplate.getClientId() );
log.debug("JSF child client identifier: " + child.getClientId(getFacesContext()));
ResponseWriter originalResponseWriter = getFacesContext().getResponseWriter();
StringWriter stringWriter = new StringWriter();
@@ -187,28 +198,31 @@
.cloneWithWriter(stringWriter);
getFacesContext().setResponseWriter(tempResponseWriter);
- log.debug("setting current macro in EVENT context");
- Contexts.getEventContext().set(CURRENT_MACRO_EVENT_VARIABLE, macro);
- Events.instance().raiseEvent(CURRENT_MACRO_EVENT_VARIABLE_SET+macro.getName());
-
try {
- log.debug("rendering plugin macro: " + macro);
+ log.debug("rendering template of macro: " + pluginMacroWithTemplate);
JSF.renderChild(getFacesContext(), child);
+
+ log.debug("firing AFTER_VIEW_RENDER macro event");
+ Events.instance().raiseEvent(
+ pluginMacroWithTemplate.getCallbackEventName(WikiPluginMacro.CallbackEvent.AFTER_VIEW_RENDER),
+ pluginMacroWithTemplate
+ );
}
catch (Exception ex) {
throw new RuntimeException(ex);
- }
- finally {
+ } finally {
getFacesContext().setResponseWriter(originalResponseWriter);
}
return stringWriter.getBuffer().toString();
}
+ @Override
public void setAttachmentLinks(List<WikiLink> attachmentLinks) {
// Put attachments (wiki links...) into the event context for later rendering
setLinks("wikiTextAttachments", attachmentLinks);
}
+ @Override
public void setExternalLinks(List<WikiLink> externalLinks) {
// Put external links (to targets not on this wiki) into the event context for later rendering
setLinks("wikiTextExternalLinks", externalLinks);
@@ -234,12 +248,14 @@
*/
}
+ @Override
protected String getHeadlineId(Headline h, String headline) {
// HTML id attribute has restrictions on valid values... so the easiest way is to make this a WikiLink
return HEADLINE_ID_PREFIX+WikiUtil.convertToWikiName(headline);
// We also need to access it correctly, see WikiLink.java and getHeadLineLink()
}
+ @Override
protected String getHeadlineLink(Headline h, String headline) {
return "<a href=\""+ wikiURLRenderer.renderURL(baseFile)+"#"+WikiTextRenderer.HEADLINE_ID_PREFIX+WikiUtil.convertToWikiName(headline)+"\">"
+ headline
@@ -265,8 +281,8 @@
}
- protected void addPluginMacro(Integer position, WikiMacro macro) {
- pluginMacros.put(position, macro);
+ protected void addMacroWithTemplate(WikiPluginMacro pluginMacro) {
+ macrosWithTemplateByPosition.put(pluginMacro.getPosition(), pluginMacro);
}
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFaceletsResourceResolver.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFaceletsResourceResolver.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFaceletsResourceResolver.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui;
+
+import com.sun.facelets.impl.DefaultResourceResolver;
+
+import java.net.URL;
+
+/**
+ * Utitility to load Facelets XHTML files as a resource from the classapth.
+ *
+ * @author Christian Bauer
+ */
+public class WikiFaceletsResourceResolver extends DefaultResourceResolver {
+
+ public URL resolveUrl(String path) {
+ // First try the regular resolver
+ URL url = super.resolveUrl(path);
+ if (url != null) return url;
+ // Only if we can't find it check in the classpath
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ return loader.getResource(path.startsWith("/") ? path.substring(1) : path);
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -15,16 +15,20 @@
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.TagConfig;
import com.sun.facelets.tag.jsf.ComponentSupport;
+import org.jboss.seam.Component;
import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.core.Events;
+import org.jboss.seam.core.Expressions;
import org.jboss.seam.faces.ResourceLoader;
import org.jboss.seam.log.Log;
import org.jboss.seam.log.Logging;
-import org.jboss.seam.ui.component.UILoadStyle;
-import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
+import org.jboss.seam.wiki.core.engine.WikiTextParser;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.MacroPluginModule;
import org.jboss.seam.wiki.core.renderer.NullWikiTextRenderer;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
-import org.jboss.seam.wiki.core.engine.WikiTextParser;
-import org.jboss.seam.wiki.preferences.Preferences;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+import org.ajax4jsf.component.html.HtmlLoadStyle;
import javax.el.ELException;
import javax.el.VariableMapper;
@@ -32,21 +36,27 @@
import javax.faces.component.UIComponent;
import java.io.IOException;
import java.net.URL;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.Set;
+import java.util.Stack;
/**
- * Creates a UIWikiText JSF component and substitutes macro names in wiki
- * text with real plugin includes/JSF components in the tree.
+ * Creates a <tt>UIWikiFormattedText</tt> JSF component and substitutes macro names in wiki
+ * text with real macro components in the tree. These <tt>UIMacro</tt> components are
+ * build from XHTML fragments/includes. Interacts closely with the state of the
+ * <tt>UIWikiFormattedText</tt> component to split component tree creation and rendering duties.
*
* @author Peter Muir
* @author Christian Bauer
*/
public class WikiFormattedTextHandler extends MetaTagHandler {
- Log log = Logging.getLog(WikiFormattedTextHandler.class);
+ public static final String MACRO_STACK_PAGE_VARIABLE = "macroStack";
+ private Log log = Logging.getLog(WikiFormattedTextHandler.class);
+
private static final String MARK = "org.jboss.seam.wiki.core.ui.WikiFormattedTextHandler";
-
private TagAttribute valueAttribute;
public WikiFormattedTextHandler(TagConfig config) {
@@ -65,10 +75,9 @@
cmp = createComponent(ctx);
cmp.getAttributes().put(MARK, id);
}
- log.debug("::: invoking nextHandler for child id: " + cmp.getClientId(ctx.getFacesContext()) );
this.nextHandler.apply(ctx, cmp);
parent.getChildren().add(cmp);
- createPlugins(ctx, cmp);
+ createMacroComponents(ctx, cmp);
log.debug("<<< completed building wiki text components for child of: " + parent.getClientId(ctx.getFacesContext()));
}
@@ -80,7 +89,7 @@
/*
* Have to manually wire the component as the Facelets magic wirer
- * is a package scoped class
+ * is a package scoped class.
*/
@Override
protected void setAttributes(FaceletContext ctx, Object instance) {
@@ -93,99 +102,218 @@
setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_EXTERNAL_TARGET_FRAME);
setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_LINK_BASE_FILE);
setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_CURRENT_AREA_NUMBER);
- setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_ENABLE_PLUGINS);
+ setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_ENABLE_MACRO_RENDERING, false);
+ setAttribute(ctx, cmp, UIWikiFormattedText.ATTR_ENABLE_TRANSIENT_MACROS, false);
}
- private void setAttribute(FaceletContext ctx, UIComponent cmp, String name) {
- TagAttribute attribute = this.getAttribute(name);
- if (attribute != null) {
- Object o = attribute.getObject(ctx);
- if (o == null) throw new IllegalArgumentException("Attribute '" + name + "' resolved to null");
- cmp.getAttributes().put(name, o);
- }
- }
-
@Override
protected MetaRuleset createMetaRuleset(Class type) {
return super.createMetaRuleset(type).ignoreAll();
}
/**
- * We create the plugins as first-class components here.
+ * We create the included macro template components as first-class components here.
* <p/>
- * The plugins need to be rendered in the correct place in the
- * rendered wikitext. The plugin name is replaced with a placeholder.
- * <p/>
- * To allow multiple use of the same plugin
- * we replace the plugin name with a reference to the component.
- * The clientId of the component is used as the reference. To
- * prevent parse errors in the wikitext the clientId is stored in
- * a list on the parent UIWikiFormattedText component and it's
- * position is used as the placeholder.
+ * This routine parses the wiki text and for each encountered wiki macro, it tries to
+ * include an XHTML template. If no template is found, we do nothing. If a template is
+ * found, we also include its CSS into the document header, then add it to the parent
+ * component, the <tt>UIWikiFormattedText</tt> we are handling. This parent component
+ * keeps a map of <tt>WikiMacro</tt> instances, keyed by position in the rendered
+ * wiki text.
+ * </p>
+ * <p>
+ * Macros are never reentrant, that means a macro can not render itself. To avoid this,
+ * we push a macro onto a stack before including it in the component tree, after checking if
+ * it is already present on the stack. If it is already present, we log a warning and don't do
+ * anything. After rendering, we pop the stack. The stack is held in the PAGE context.
+ * </p>
* @param ctx FaceletContext
* @param parent Parent component
*/
- private void createPlugins(final FaceletContext ctx, final UIComponent parent) {
+ private void createMacroComponents(final FaceletContext ctx, final UIComponent parent) {
if (!(parent instanceof UIWikiFormattedText)) return;
- final UIWikiFormattedText wikiFormattedText = (UIWikiFormattedText) parent;
+ final UIWikiFormattedText wikiFormattedTextComponent = (UIWikiFormattedText) parent;
String unparsed = valueAttribute.getValue(ctx);
- // Don't forget this, transporting the value to the handled component
- wikiFormattedText.setValue(unparsed);
+ // Don't forget this, transporting the value to the handled component, we need to render it (again) later
+ wikiFormattedTextComponent.setValue(unparsed);
- log.debug("trying to create plugin children for component");
-
- if (Contexts.getEventContext().get(UIWikiFormattedText.CURRENT_MACRO_EVENT_VARIABLE) != null) {
- log.debug("disabling plugin rendering, we are trying to create plugins inside a plugin - not possible!");
+ if (getAttribute(UIWikiFormattedText.ATTR_ENABLE_MACRO_RENDERING) == null ||
+ !getAttribute(UIWikiFormattedText.ATTR_ENABLE_MACRO_RENDERING).getBoolean(ctx)) {
+ log.debug("macro rendering disabled");
return;
}
- if (getAttribute(UIWikiFormattedText.ATTR_ENABLE_PLUGINS) == null ||
- !getAttribute(UIWikiFormattedText.ATTR_ENABLE_PLUGINS).getBoolean(ctx)) {
- log.debug("plugin rendering disabled");
- return;
- }
-
- log.debug("creating plugin components from wiki text macros");
-
+ // We need to parse the wiki text once (later again for rendering) to find all macros in the text
+ log.debug("creating macro components from wiki text macros");
WikiTextParser parser = new WikiTextParser(unparsed, true, false);
parser.setRenderer(
new NullWikiTextRenderer() {
- public String renderMacro(WikiMacro macro) {
- log.debug("found macro: " + macro);
- URL faceletURL = getPluginURL(macro.getName(), ctx);
- if (faceletURL == null) {
- log.debug("macro has no plugin facelets file: " + macro.getName());
+ // A collection of all macros (whether they have templates or not) that we found in this piece of wiki text
+ final Set<String> macrosFoundInWikiText = new HashSet<String>();
+
+ @Override
+ public String renderMacro(WikiTextMacro wikiTextMacro) {
+ log.debug("=== found macro in wiki text: " + wikiTextMacro);
+
+ // Check reentrancy
+ if (!isMacroOnPageStack(wikiTextMacro)) {
+ log.debug("adding macro to page macro stack");
+ getPageMacroStack().push(wikiTextMacro);
+ } else {
+ log.warn("macros are not reentrant, duplicate macro on page stack: " + wikiTextMacro);
return null;
}
- log.debug("setting current macro in EVENT context before including facelets file");
- Contexts.getEventContext().set(UIWikiFormattedText.CURRENT_MACRO_EVENT_VARIABLE, macro);
+ // Check if the wikiTextMacro actually is registered, we don't build unknown macros
+ WikiPluginMacro pluginMacro = PluginRegistry.instance().createWikiPluginMacro(wikiTextMacro);
+ if (pluginMacro == null) {
+ log.warn("macro is not bound in plugin registry: " + wikiTextMacro);
+ getPageMacroStack().pop();
+ return null;
+ }
- includePluginCSS(macro.getName(), parent);
- includePluginFacelet(faceletURL, ctx, parent);
+ // Check if we can find the template to include for this wikiTextMacro
+ String macroIncludePath = getMacroIncludePath(pluginMacro);
+ if (macroIncludePath == null) {
+ getPageMacroStack().pop();
+ return null;
+ }
- // TODO: Need to understand this magic from Pete if we want to make sub-clientIds for plugins
- Object nextPluginId = parent.getAttributes().get(UIPlugin.NEXT_PLUGIN);
- if (nextPluginId != null) {
- macro.setClientId(nextPluginId.toString());
- wikiFormattedText.addPluginMacro(macro.getPosition(), macro);
- parent.getAttributes().remove(UIPlugin.NEXT_PLUGIN);
+ // Before we build the nested components, set the WikiMacro instance in the PAGE context under a
+ // unique name, so we can use a VariableMapper later and alias this as 'currentMacro'
+ String macroPageVariableName = pluginMacro.getPageVariableName();
+ log.debug("setting WikiMacro instance in PAGE context as variable named: " + macroPageVariableName);
+ Contexts.getPageContext().set(macroPageVariableName, pluginMacro);
+
+ // Whoever wants to do something before we finally build the XHTML template
+ log.debug("firing VIEW_BUILD macro event");
+ Events.instance().raiseEvent(pluginMacro.getCallbackEventName(WikiPluginMacro.CallbackEvent.VIEW_BUILD), pluginMacro);
+
+ // This is where the magic happens... the UIWikiFormattedText component should have one child after that, a UIMacro
+ includeMacroFacelet(pluginMacro, macroIncludePath, ctx, wikiFormattedTextComponent);
+
+ // Now get the identifier of the newly created UIMacro instance and set it for future use
+ Object macroId = wikiFormattedTextComponent.getAttributes().get(UIMacro.NEXT_MACRO);
+ if (macroId != null) {
+ pluginMacro.setClientId(macroId.toString());
+ wikiFormattedTextComponent.getAttributes().remove(UIMacro.NEXT_MACRO);
} else {
- // Best guess based plugin renderer
- String pluginId =
- parent.getChildren().get( parent.getChildCount()-1 )
- .getClientId( ctx.getFacesContext() );
- macro.setClientId(pluginId);
- wikiFormattedText.addPluginMacro(macro.getPosition(), macro);
+ // Best guess based wikiTextMacro renderer, needed during reRendering when we don't build the child
+ // - only then is NEXT_MACRO set by the MacroComponentHandler
+ macroId =
+ wikiFormattedTextComponent.getChildren().get(
+ wikiFormattedTextComponent.getChildCount()-1
+ ).getClientId( ctx.getFacesContext() );
+ pluginMacro.setClientId(macroId.toString());
}
- log.debug("unsetting current macro in EVENT context");
- Contexts.getEventContext().remove(UIWikiFormattedText.CURRENT_MACRO_EVENT_VARIABLE);
+ // Put an optional CSS include in the header of the wiki document we are rendering in.
+ // (This needs to happen after the clientId is set, as CSS resource path rendering needs to
+ // know if it occurs in a JSF request (clientId present) or not.
+ includeMacroCSS(pluginMacro, wikiFormattedTextComponent);
+
+ // We need to make the UIMacro child transient if we run in the wiki text editor preview. The reason
+ // is complicated: If we don't make it transient, all value expressions inside the wikiTextMacro templates that
+ // use 'currentMacro' will refer to the "old" saved ValueExpression and then of course to the "old"
+ // VariableMapper. In other words: We need to make sure that the subtree is completely fresh every
+ // time the wiki text preview is reRendered, otherwise we never get a 'currentMacro' binding updated.
+ // This also means that VariableMapper is a completely useless construct, because it is basically an
+ // alias that is evaluated just once.
+ // Note: This means we can't click on form elements of any plugin/wikiTextMacro template in the preview. This
+ // should be solved by not showing/ghosting any form elements during preview.
+ if (getAttribute(UIWikiFormattedText.ATTR_ENABLE_TRANSIENT_MACROS) != null &&
+ getAttribute(UIWikiFormattedText.ATTR_ENABLE_TRANSIENT_MACROS).getBoolean(ctx)) {
+ log.debug("setting macro to transient rendering, not storing its state between renderings: " + pluginMacro);
+ UIMacro uiMacro = (UIMacro)ComponentSupport.findChild(wikiFormattedTextComponent, macroId.toString());
+ uiMacro.setTransient(true);
+ }
+
+ // Finally, pop the wikiTextMacro stack of the page, then transport the finished WikiMacro instance into
+ // the UIWikiFormattedText component for rendering - we are done building the component tree at this
+ // point.
+ getPageMacroStack().pop();
+ wikiFormattedTextComponent.addMacroWithTemplate(pluginMacro);
+
+ // Well, we don't render anything here...
return null;
}
+
+ private String getMacroIncludePath(WikiPluginMacro pluginMacro) {
+
+ // Check singleton configuration
+ if (pluginMacro.getMetadata().isRenderOptionSet(MacroPluginModule.RenderOption.SINGLETON) &&
+ macrosFoundInWikiText.contains(pluginMacro.getName())) {
+ log.warn("macro is a SINGLETON, can not be used twice in the same document area: " + pluginMacro);
+ return null;
+ } else {
+ macrosFoundInWikiText.add(pluginMacro.getName());
+ }
+
+ // Check skin configuration
+ String currentSkin = (String)Component.getInstance("skin");
+ if (!pluginMacro.getMetadata().isAvailableForSkin(currentSkin)) {
+ log.warn("macro is not available for skin '"+currentSkin+"': " + pluginMacro);
+ return null;
+ }
+
+ // Try to get an XHTML template, our source for building nested components
+ // Fun with slashes: For some reason, Facelets really needs a slash at the start, otherwise
+ // it doesn't use my custom ResourceResolver...
+ String includePath = "/"+ pluginMacro.getMetadata().getPlugin().getPackageDefaultTemplatePath(pluginMacro.getName());
+ URL faceletURL = ResourceLoader.instance().getResource(includePath);
+ if (faceletURL == null) {
+ log.debug("macro has no default include file, not building any components: " + pluginMacro);
+ return null;
+ } else {
+ log.debug("using default template include as a resource from package: " + includePath);
+ }
+
+ return includePath;
+ }
+
+ private void includeMacroFacelet(WikiPluginMacro pluginMacro, String includePath, FaceletContext ctx, UIComponent parent) {
+ VariableMapper orig = ctx.getVariableMapper();
+ try {
+ log.debug("setting 'currentMacro' as an EL variable, resolves dynamically to WikiMacro instance in PAGE context");
+ ctx.setVariableMapper(new VariableMapperWrapper(orig));
+ ctx.getVariableMapper().setVariable(
+ WikiPluginMacro.CURRENT_MACRO_EL_VARIABLE,
+ Expressions.instance().createValueExpression("#{"+ pluginMacro.getPageVariableName()+"}").toUnifiedValueExpression()
+ );
+
+ log.debug("including macro facelets file from path: " + includePath);
+ ctx.includeFacelet(parent, includePath);
+
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ } finally {
+ ctx.setVariableMapper(orig);
+ }
+ }
+
+
+ private void includeMacroCSS(WikiPluginMacro pluginMacro, UIComponent cmp) {
+
+ String cssPath = "/"+ pluginMacro.getMetadata().getPlugin().getPackageCSSPath()+"/"+ pluginMacro.getName()+".css";
+ log.debug("trying to load CSS resource from classpath: " + cssPath);
+ if (ResourceLoader.instance().getResource(cssPath) != null) {
+ String cssRequestURIPath = pluginMacro.getRequestCSSPath()+"/"+ pluginMacro.getName()+".css";
+ log.debug("including macro CSS file, rendering URI for document head: " + cssRequestURIPath);
+
+ // Use Ajax4JSF loader, it can do what we want - add a CSS to the HTML <head>
+ HtmlLoadStyle style = new HtmlLoadStyle();
+ style.setSrc(cssRequestURIPath);
+
+ cmp.getChildren().add(style);
+ // Clear these out in the next build phase
+ ComponentSupport.markForDeletion(style);
+ } else {
+ log.debug("no CSS resource found for macro");
+ }
+ }
}
);
@@ -199,57 +327,8 @@
}
}
- private URL getPluginURL(String macroName, FaceletContext ctx) {
- //if (macroName == null || macroName.length() == 0 || includedMacros.contains(macroName)) return null;
- if (macroName == null || macroName.length() == 0) return null;
+ // Some utilities...
- String includeView = "/plugins/" + macroName + "/plugin.xhtml";
-
- // View can't include itself
- String currentViewId = ctx.getFacesContext().getViewRoot().getViewId();
- if (currentViewId.equals(includeView)) return null;
-
- // Try to get the XHTML document
- return ResourceLoader.instance().getResource(includeView);
- }
-
- private void includePluginFacelet(URL faceletURL, FaceletContext ctx, UIComponent parent) {
- // Cribbed from facelets
- VariableMapper orig = ctx.getVariableMapper();
- try {
- log.debug("including plugin facelets file from URL: " + faceletURL);
- ctx.setVariableMapper(new VariableMapperWrapper(orig));
- ctx.includeFacelet(parent, faceletURL);
- } catch (IOException e) {
- throw new RuntimeException(e);
- } finally {
- ctx.setVariableMapper(orig);
- }
-
- }
-
- /*
- * Add a CSS resource to the document head
- */
- private void includePluginCSS(String macroName, UIComponent cmp) {
- // Try to get the CSS for it
- WikiPreferences wikiPrefs = Preferences.getInstance(WikiPreferences.class);
- String css = "/themes/" + wikiPrefs.getThemeName() + "/css/" + macroName + ".css";
- if (ResourceLoader.instance().getResource(css) != null) {
- log.debug("including plugin CSS file from resource: " + css);
- // TODO: For Pete to fix, UILoadStyle doesn't load the CSS anymore
- UILoadStyle style = UILoadStyle.newInstance();
- style.setSrc(css);
- cmp.getChildren().add(style);
- // Clear these out in the next build phase
- ComponentSupport.markForDeletion(style);
- }
- }
-
- /*
- * Support method to find the UIWikiFormattedText component created by
- * this tag on a previous tree build
- */
private static UIComponent findChildByTagId(UIComponent parent, String id) {
Iterator itr = parent.getFacetsAndChildren();
while (itr.hasNext()) {
@@ -262,4 +341,38 @@
return null;
}
+ private void setAttribute(FaceletContext ctx, UIComponent cmp, String name) {
+ setAttribute(ctx, cmp, name, null);
+ }
+
+ private void setAttribute(FaceletContext ctx, UIComponent cmp, String name, Object defaultValue) {
+ TagAttribute attribute = this.getAttribute(name);
+ if (attribute != null) {
+ Object o = attribute.getObject(ctx);
+ if (o == null && defaultValue == null) {
+ throw new IllegalArgumentException("Attribute '" + name + "' resolved to null and no default value specified");
+ } else if (o == null) {
+ cmp.getAttributes().put(name, defaultValue);
+ } else {
+ cmp.getAttributes().put(name, o);
+ }
+ }
+ }
+
+ private Stack<WikiTextMacro> getPageMacroStack() {
+ if (Contexts.getPageContext().get(MACRO_STACK_PAGE_VARIABLE) == null) {
+ log.debug("macro page stack is null, creating new stack for this page");
+ Contexts.getPageContext().set(MACRO_STACK_PAGE_VARIABLE, new Stack<WikiTextMacro>());
+ }
+ return (Stack<WikiTextMacro>)Contexts.getPageContext().get(MACRO_STACK_PAGE_VARIABLE);
+ }
+
+ private boolean isMacroOnPageStack(WikiTextMacro macro) {
+ Stack<WikiTextMacro> macroStack = getPageMacroStack();
+ for (WikiTextMacro macroOnPageStack : macroStack) {
+ if (macroOnPageStack.getName().equals(macro.getName())) return true;
+ }
+ return false;
+ }
+
}
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -17,7 +17,6 @@
import javax.faces.context.ResponseWriter;
import java.io.IOException;
import java.io.StringWriter;
-import java.io.Serializable;
/**
* Implementation of <tt><s:cache></tt> renderer based on EHCache.
@@ -34,11 +33,25 @@
}
@Override
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ @Override
protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
UICache cache = (UICache) component;
+ log.debug("ui cache is enabled: " + cache.isEnabled());
if (cache.isEnabled()) {
+ String region = cache.getRegion();
+ if (region == null) {
+ throw new RuntimeException("required region attribute missing on <s:cache>");
+ }
String key = cache.getKey();
- String cachedContent = getFromCache(key);
+ if (key == null) {
+ throw new RuntimeException("required key attribute missing on <s:cache>");
+ }
+ log.debug("attempting to obtain from cache region '" + region +"' using key: " + key);
+ String cachedContent = PageFragmentCache.instance().get(region, key);
if (cachedContent == null) {
log.debug("rendering from scratch: " + key);
StringWriter stringWriter = new StringWriter();
@@ -48,7 +61,8 @@
context.setResponseWriter(writer);
String output = stringWriter.getBuffer().toString();
writer.write(output);
- putInCache(key, output);
+ log.debug("caching rendered content in region '" + region +"' using key: " + key);
+ PageFragmentCache.instance().put(region, key, output);
} else {
log.debug("rendering from cache: " + key);
writer.write(cachedContent);
@@ -59,18 +73,4 @@
}
}
-
- @Override
- public boolean getRendersChildren() {
- return true;
- }
-
- public static void putInCache(Serializable key, String content) {
- PageFragmentCache.instance().put(key, content);
- }
-
- public static String getFromCache(Serializable key) {
- return PageFragmentCache.instance().get(key);
- }
-
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPluginThemeResource.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPluginThemeResource.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPluginThemeResource.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,221 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui;
+
+import static org.jboss.seam.ScopeType.APPLICATION;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.servlet.ContextualHttpServletRequest;
+import org.jboss.seam.util.Resources;
+import org.jboss.seam.web.AbstractResource;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
+import org.jboss.seam.wiki.core.plugin.metamodel.module.MacroPluginModule;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+import org.jboss.seam.core.Expressions;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Serves files from the classpath, from a Plugin theme package.
+ * <p>
+ * This means that any web request can get any file out of that package. So don't put
+ * anything into a plugins theme directory that you don't want people to GET.
+ * <p>
+ * <p>
+ * It is primarily used for serving up plugin CSS and image files. It can also interpolate
+ * EL expressions in certain resources, configured with <tt>interpolatedResourcesExtensions</tt>.
+ * The default is to parse resources with <tt>css</tt> extension. A temporary
+ * <tt>WikiPluginMacro</tt> instance is available in these expressions, you can utilize this
+ * to access the metadata (e.g. paths) of the plugin.
+ * </p>
+ *
+ * @author Christian Bauer
+ */
+@Scope(APPLICATION)
+@Name("wikiPluginThemeResource")
+@BypassInterceptors
+public class WikiPluginThemeResource extends AbstractResource {
+
+ private Log log = Logging.getLog(WikiPluginThemeResource.class);
+
+ private static final Pattern EL_PATTERN = Pattern.compile("#" + Pattern.quote("{") + "(.*)" + Pattern.quote("}"));
+
+ // Resources URIs end with /<pluginKey/<pluginMacroModuleKey>/<themeResourceName>.<themeResourceExtension>
+ public static Pattern PLUGIN_RESOURCE_PATTERN =
+ Pattern.compile("^/(" + Plugin.KEY_PATTERN + ")/(" + Plugin.KEY_PATTERN + ")/(.+?)\\.([a-z]+)$");
+
+ // Resources that are interpolated, i.e. which are text files that contain EL expressions
+ private String[] interpolatedResourcesExtensions = new String[]{"css"};
+
+ @Override
+ public String getResourcePath() {
+ return Plugin.REGISTER_SEAM_RESOURCE_THEME;
+ }
+
+ @Override
+ public void getResource(final HttpServletRequest request, final HttpServletResponse response)
+ throws ServletException, IOException {
+
+ // Wrap this, we need an ApplicationContext
+ new ContextualHttpServletRequest(request) {
+ @Override
+ public void process() throws IOException {
+ doWork(request, response);
+ }
+ }.run();
+
+ }
+
+ public String[] getInterpolatedResourcesExtensions() {
+ return interpolatedResourcesExtensions;
+ }
+
+ public void setInterpolatedResourcesExtensions(String[] interpolatedResourcesExtensions) {
+ this.interpolatedResourcesExtensions = interpolatedResourcesExtensions;
+ }
+
+ public void doWork(HttpServletRequest request, HttpServletResponse response)
+ throws IOException {
+
+ String pathInfo = request.getPathInfo().substring(getResourcePath().length());
+
+ String pluginKey = null;
+ String pluginMacroModuleKey = null;
+ String themeResourceName = null;
+ String themeResourceExtension = null;
+
+ Matcher matcher = PLUGIN_RESOURCE_PATTERN.matcher(pathInfo);
+ if (matcher.find()) {
+ pluginKey = matcher.group(1);
+ pluginMacroModuleKey = matcher.group(2);
+ themeResourceName = matcher.group(3);
+ themeResourceExtension = matcher.group(4);
+ log.debug("request for resource,"
+ + " plugin key '" + pluginKey + "'"
+ + " plugin macro module key '" + pluginMacroModuleKey + "'"
+ + " theme resource name '" + themeResourceName + "'"
+ + " theme resource ext '" + themeResourceExtension + "'"
+ );
+ }
+ if (pluginKey == null) {
+ response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Plugin key not found");
+ return;
+ }
+ if (pluginMacroModuleKey == null) {
+ response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Plugin macro module key not found");
+ return;
+ }
+ if (themeResourceName == null) {
+ response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Resource name not found");
+ return;
+ }
+
+ PluginRegistry registry = PluginRegistry.instance();
+ Plugin plugin = registry.getPlugin(pluginKey);
+ if (plugin == null) {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND, "Plugin key not found in registry: " + pluginKey);
+ return;
+ }
+
+ // First, check the registry if we have the fully qualified name as a macro plugin module
+ MacroPluginModule macroPluginModule =
+ registry.getMacroPluginModulesByKey().get(plugin.getKey() + "." + pluginMacroModuleKey);
+
+ // Then also check if it's a module of the given plugin
+ if (macroPluginModule == null || plugin.getModuleByKey(pluginMacroModuleKey) == null) {
+ response.sendError(
+ HttpServletResponse.SC_NOT_FOUND,
+ "Plugin macro module key not found in registry or not available for plugin: " + pluginMacroModuleKey
+ );
+ return;
+ }
+
+ // Create a new WikiPluginMacro instance which will be available during interpolation as 'currentMacro'
+ WikiPluginMacro pluginMacro = registry.createWikiPluginMacro(
+ new WikiTextMacro(macroPluginModule.getName())
+ );
+ org.jboss.seam.contexts.Contexts.getEventContext().set(WikiPluginMacro.CURRENT_MACRO_EL_VARIABLE, pluginMacro);
+
+ String resourcePath = plugin.getPackageThemePath() + "/" + themeResourceName + "." + themeResourceExtension;
+ InputStream in = Resources.getResourceAsStream(resourcePath, getServletContext());
+
+ if (in != null) {
+
+ boolean isInterpolated = false;
+ for (String interpolatedResourcesExtension : interpolatedResourcesExtensions) {
+ if (interpolatedResourcesExtension.equals(themeResourceExtension)) isInterpolated = true;
+ }
+
+ if (isInterpolated) {
+ log.debug("serving interpolated resource: " + resourcePath);
+ CharSequence textFile = readFile(in);
+ textFile = parseEL(textFile);
+ response.getWriter().write(textFile.toString());
+ response.getWriter().flush();
+ } else {
+ log.debug("serving resource: " + resourcePath);
+ byte[] buffer = new byte[1024];
+ int read = in.read(buffer);
+ while (read != -1) {
+ response.getOutputStream().write(buffer, 0, read);
+ read = in.read(buffer);
+ }
+ response.getOutputStream().flush();
+ }
+ } else {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND, resourcePath);
+ }
+
+ }
+
+ private CharSequence readFile(InputStream inputStream) throws IOException {
+ BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+ StringBuilder css = new StringBuilder();
+ String line;
+ while ((line = reader.readLine()) != null) {
+ css.append(line);
+ css.append("\n");
+ }
+ inputStream.close();
+ return css;
+ }
+
+ // Resolve any EL value binding expression present in text resource
+ // This should be Interpolator.interpolate, but it seems to break on CSS
+ private CharSequence parseEL(CharSequence string) {
+ StringBuffer parsed = new StringBuffer(string.length());
+ Matcher matcher =
+ EL_PATTERN.matcher(string);
+
+ while (matcher.find()) {
+ String result = Expressions.instance().createValueExpression(
+ "#{" + matcher.group(1) + "}", String.class
+ ).getValue();
+ if (result != null) {
+ matcher.appendReplacement(parsed, result);
+ } else {
+ matcher.appendReplacement(parsed, "");
+ }
+ }
+ matcher.appendTail(parsed);
+ return parsed;
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiRedirect.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiRedirect.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiRedirect.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Component;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.faces.RedirectException;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.renderer.WikiURLRenderer;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ExternalContext;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("wikiRedirect")
+(a)Scope(ScopeType.CONVERSATION)
+public class WikiRedirect implements Serializable {
+
+ @Logger
+ Log log;
+
+ private WikiDocument wikiDocument;
+ private boolean forcePermURL = false;
+ private String fragment;
+ private boolean propagateConversation = false;
+
+ /* TODO: That would be nice, we should add these when !forcePermURL
+ private String year;
+ private String month;
+ private String day;
+ private String page;
+ private String tag;
+ private String category;
+ */
+
+ public WikiDocument getWikiDocument() {
+ return wikiDocument;
+ }
+
+ public WikiRedirect setWikiDocument(WikiDocument wikiDocument) {
+ this.wikiDocument = wikiDocument;
+ return this;
+ }
+
+ public boolean isForcePermURL() {
+ return forcePermURL;
+ }
+
+ public WikiRedirect setForcePermURL(boolean forcePermURL) {
+ this.forcePermURL = forcePermURL;
+ return this;
+ }
+
+ public String getFragment() {
+ return fragment;
+ }
+
+ public WikiRedirect setFragment(String fragment) {
+ this.fragment = fragment;
+ return this;
+ }
+
+ public boolean isPropagateConversation() {
+ return propagateConversation;
+ }
+
+ public WikiRedirect setPropagateConversation(boolean propagateConversation) {
+ this.propagateConversation = propagateConversation;
+ return this;
+ }
+
+ public void execute() {
+
+ WikiURLRenderer urlRenderer = WikiURLRenderer.instance();
+ String url = forcePermURL
+ ? urlRenderer.renderPermURL(getWikiDocument())
+ : urlRenderer.renderURL(getWikiDocument());
+
+ // TODO: Fragile?
+ if (propagateConversation) url = url + "?cid=" + org.jboss.seam.core.Conversation.instance().getId();
+
+ if (getFragment() != null) url = url + "#" + fragment;
+
+ ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext();
+ try {
+ log.debug("redirecting to URL: " + url);
+ ctx.redirect(ctx.encodeResourceURL(url));
+ } catch (IOException ioe) {
+ throw new RedirectException(ioe);
+ }
+ FacesContext.getCurrentInstance().responseComplete();
+ }
+
+ public static WikiRedirect instance() {
+ return (WikiRedirect) Component.getInstance(WikiRedirect.class);
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -2,7 +2,9 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Logger;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.log.Log;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.ui.validator.FormattedTextValidator;
@@ -21,12 +23,17 @@
@Scope(ScopeType.CONVERSATION)
public class WikiTextEditor implements Serializable {
+ @Logger
+ Log log;
+
public void validate(String textEditorId, String value) {
if (value == null) return;
+ log.debug("validating value of text editor: " + textEditorId);
FormattedTextValidator validator = new FormattedTextValidator();
try {
validator.validate(null, null, value);
} catch (ValidatorException e) {
+ log.debug("exception during validation: " + e.getFacesMessage().getSummary());
// TODO: Needs to use resource bundle, how?
FacesMessages.instance().addToControl(
textEditorId + "TextArea",
@@ -34,6 +41,7 @@
e.getFacesMessage().getSummary()
);
}
+ log.debug("completed validation of text editor value");
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/ImporterRegistry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/ImporterRegistry.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/ImporterRegistry.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -22,7 +22,7 @@
List<Importer> importers = new ArrayList<Importer>();
// TODO: Fix importers
- //@Observer("Wiki.started")
+ //@Observer("Wiki.startup")
public void scanForFileImporters() {
log.debug("initializing file importer registry");
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/Preferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,8 +1,8 @@
package org.jboss.seam.wiki.preferences;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.Component;
import org.jboss.seam.annotations.*;
-import org.jboss.seam.core.Expressions;
import org.jboss.seam.log.Log;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceRegistry;
@@ -35,6 +35,7 @@
@In(required = false) @Out(required = false, scope = ScopeType.EVENT)
private Map<CacheKey, Object> eventPreferencesCache;
+ // Not typesafe
public Object get(String preferenceEntityName) {
return get(preferenceEntityName, null);
}
@@ -92,23 +93,22 @@
return preferenceEntityInstance;
}
- public static Object getInstance(String preferenceEntityName, String instanceName) {
- return Expressions.instance().createValueExpression("#{preferences.get('" + preferenceEntityName + "', "+instanceName+")}").getValue();
+ // Typesafe (more or less)
+ public <P> P get(Class<P> clazz) {
+ Preferences prefs = (Preferences)Component.getInstance(Preferences.class);
+ return (P) prefs.get(getPreferenceEntityName(clazz));
}
- public static Object getInstance(String preferenceEntityName) {
- return Expressions.instance().createValueExpression("#{preferences.get('" + preferenceEntityName + "')}").getValue();
+ public <P> P get(Class<P> clazz, Object instance) {
+ Preferences prefs = (Preferences)Component.getInstance(Preferences.class);
+ return (P) prefs.get(getPreferenceEntityName(clazz), instance);
}
- public static <P> P getInstance(Class<P> clazz, String instanceName) {
- return (P)getInstance(getPreferenceEntityName(clazz), instanceName);
+ public static Preferences instance() {
+ return (Preferences)Component.getInstance(Preferences.class);
}
- public static <P> P getInstance(Class<P> clazz) {
- return (P)getInstance(getPreferenceEntityName(clazz));
- }
-
- private static String getPreferenceEntityName(Class<?> clazz) {
+ private String getPreferenceEntityName(Class<?> clazz) {
org.jboss.seam.wiki.preferences.annotations.Preferences
p = clazz.getAnnotation(org.jboss.seam.wiki.preferences.annotations.Preferences.class);
if (p.name() != null) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/PreferenceProperty.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/PreferenceProperty.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/PreferenceProperty.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -15,4 +15,5 @@
PreferenceVisibility[] visibility() default PreferenceVisibility.SYSTEM;
String editorIncludeName() default "";
String templateComponentName() default "";
+ String mappedTo() default "";
}
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/Preferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/Preferences.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/annotations/Preferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -11,4 +11,5 @@
public @interface Preferences {
String description();
String name() default "";
+ String mappedTo() default "";
}
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceEntity.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -27,6 +27,7 @@
private Class clazz;
private String description;
private String entityName;
+ private String mappedTo;
private SortedSet<Property> properties = new TreeSet<Property>();
private Map<String, Property> propertiesByName = new HashMap<String,Property>();
private SortedSet<Property> propertiesSystemVisible = new TreeSet<Property>();
@@ -41,6 +42,7 @@
this.clazz = entityClass;
this.description = interpolate(entityClass.getAnnotation(Preferences.class).description());
this.entityName = entityClass.getAnnotation(Preferences.class).name();
+ this.mappedTo = entityClass.getAnnotation(Preferences.class).mappedTo();
if (this.entityName != null && this.entityName.length() == 0) this.entityName = clazz.getSimpleName();
// @PreferenceProperty fields
@@ -54,7 +56,8 @@
interpolate(field.getAnnotation(PreferenceProperty.class).description()),
field.getAnnotation(PreferenceProperty.class).visibility(),
field.getAnnotation(PreferenceProperty.class).editorIncludeName(),
- field.getAnnotation(PreferenceProperty.class).templateComponentName()
+ field.getAnnotation(PreferenceProperty.class).templateComponentName(),
+ field.getAnnotation(PreferenceProperty.class).mappedTo()
);
if (property.isSystemVisible()) propertiesSystemVisible.add(property);
@@ -78,6 +81,10 @@
return entityName;
}
+ public String getMappedTo() {
+ return mappedTo;
+ }
+
public SortedSet<Property> getProperties() {
return properties;
}
@@ -195,9 +202,11 @@
private List<PreferenceVisibility> visibility;
private String editorIncludeName;
private String templateComponentName;
+ private String mappedTo;
public Property(String fieldName, Class fieldType, String description,
- PreferenceVisibility[] visibility, String editorIncludeName, String templateComponentName) {
+ PreferenceVisibility[] visibility,
+ String editorIncludeName, String templateComponentName, String mappedTo) {
this.field = Reflections.getField(getClazz(), fieldName);
this.fieldName = fieldName;
this.fieldType = fieldType;
@@ -205,7 +214,7 @@
this.visibility = Arrays.asList(visibility);
this.editorIncludeName = editorIncludeName;
this.templateComponentName = templateComponentName;
-
+ this.mappedTo = mappedTo;
}
public Field getField() {
@@ -240,6 +249,10 @@
return templateComponentName;
}
+ public String getMappedTo() {
+ return mappedTo;
+ }
+
public boolean isSystemVisible() {
return getVisibility().contains(PreferenceVisibility.SYSTEM);
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceRegistry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceRegistry.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/preferences/metamodel/PreferenceRegistry.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,26 +1,28 @@
package org.jboss.seam.wiki.preferences.metamodel;
+import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.*;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.log.Log;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.util.AnnotationDeploymentHelper;
import java.util.*;
@Name("preferenceRegistry")
@Scope(ScopeType.APPLICATION)
+@Startup(depends = "pluginI18NBinder")
+@BypassInterceptors
public class PreferenceRegistry {
- @Logger
- static Log log;
+ private static final LogProvider log = Logging.getLogProvider(PreferenceRegistry.class);
- @In(
- value="#{deploymentStrategy.annotatedClasses['org.jboss.seam.wiki.preferences.annotations.Preferences']}",
- required = false
- )
- Set<Class> preferencesClasses;
-
Set<PreferenceEntity> preferenceEntities = new HashSet<PreferenceEntity>();
Map<String, PreferenceEntity> preferenceEntitiesByName = new HashMap<String, PreferenceEntity>();
@@ -28,12 +30,14 @@
Set<PreferenceEntity> preferenceEntitiesUser = new HashSet<PreferenceEntity>();
Set<PreferenceEntity> preferenceEntitiesInstance = new HashSet<PreferenceEntity>();
- @Observer("Wiki.started")
- public void create() {
+ @Create
+ public void startup() {
log.debug("initializing preferences registry");
+ Set<Class<Object>> preferencesClasses = AnnotationDeploymentHelper.getAnnotatedClasses(Preferences.class);
+
if (preferencesClasses == null)
- throw new RuntimeException("Add @Preferences annotation to META-INF/seam-deployment.properties");
+ throw new RuntimeException("No preference entities found, add @Preferences annotation to META-INF/seam-deployment.properties");
for (Class preferencesClass : preferencesClasses) {
PreferenceEntity preferenceEntity = new PreferenceEntity(preferencesClass);
@@ -55,6 +59,7 @@
preferenceEntitiesInstance.add(preferenceEntity);
}
+ log.info("registered preference entities: " + preferenceEntities.size());
}
@@ -78,7 +83,8 @@
return preferenceEntitiesInstance;
}
- public SortedSet<PreferenceEntity> getPreferenceEntities(PreferenceVisibility[] visibilities) {
+ public SortedSet<PreferenceEntity> getPreferenceEntities(PreferenceVisibility... visibilities) {
+ if (visibilities == null) return null;
SortedSet<PreferenceEntity> entities = new TreeSet<PreferenceEntity>();
List<PreferenceVisibility> visibilityList = Arrays.asList(visibilities);
if (visibilityList.contains(PreferenceVisibility.SYSTEM)) entities.addAll(getPreferenceEntitiesSystem());
@@ -86,4 +92,9 @@
if (visibilityList.contains(PreferenceVisibility.INSTANCE)) entities.addAll(getPreferenceEntitiesInstance());
return entities;
}
+
+ public static PreferenceRegistry instance() {
+ return (PreferenceRegistry) Component.getInstance(PreferenceRegistry.class);
+ }
+
}
\ No newline at end of file
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/AnnotationDeploymentHelper.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/AnnotationDeploymentHelper.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/AnnotationDeploymentHelper.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.util;
+
+import org.jboss.seam.deployment.AnnotationDeploymentHandler;
+import org.jboss.seam.deployment.DeploymentStrategy;
+import org.jboss.seam.Component;
+
+import java.util.Set;
+
+/**
+ * A convenience class that allows us to access Seam deployment handlers without @In'jecting them.
+ * <p>
+ * This is useful because we can optimize things such as registries with @BypassInterceptors.
+ * </p>
+ *
+ * @author Christian Bauer
+ */
+public class AnnotationDeploymentHelper {
+
+ public static Set<Class<Object>> getAnnotatedClasses(String annotationFQN) {
+ DeploymentStrategy deployment = (DeploymentStrategy) Component.getInstance("deploymentStrategy");
+ AnnotationDeploymentHandler handler =
+ (AnnotationDeploymentHandler)deployment.getDeploymentHandlers().get(AnnotationDeploymentHandler.NAME);
+ return handler.getClasses().get(annotationFQN);
+ }
+
+ public static Set<Class<Object>> getAnnotatedClasses(Class annotationType) {
+ return getAnnotatedClasses(annotationType.getName());
+ }
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/PatternDeploymentHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/PatternDeploymentHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/PatternDeploymentHandler.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.util;
+
+import org.jboss.seam.deployment.DeploymentHandler;
+
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+/**
+ * @author Christian Bauer
+ */
+public abstract class PatternDeploymentHandler implements DeploymentHandler {
+
+ protected Pattern compiledPattern;
+
+ protected PatternDeploymentHandler() {
+ compiledPattern = Pattern.compile(getPattern());
+ }
+
+ public void handle(String s, ClassLoader classLoader) {
+ Matcher matcher = compiledPattern.matcher(s);
+ if (matcher.matches()) {
+ String[] groups = new String[matcher.groupCount()];
+ for (int i = 0; i < groups.length; i++) {
+ groups[i] = matcher.group(i+1);
+ }
+ handleMatch(s, classLoader, groups);
+ }
+ }
+
+ public abstract String getPattern();
+
+ public abstract void handleMatch(String s, ClassLoader classLoader, String... matchedGroups);
+
+}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiResourceLoader.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiResourceLoader.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiResourceLoader.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.util;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Component;
+import org.jboss.seam.core.ResourceLoader;
+
+import java.util.List;
+import java.util.Arrays;
+
+/**
+ * Override the stateless built-in Seam component and provide a custom
+ * list of bundle names to load, using the <tt>pluginMessageBundleNames</tt>
+ * and a static list of core bundles.
+ *
+ * @author Christian Bauer
+ */
+(a)Scope(ScopeType.STATELESS)
+@BypassInterceptors
+(a)Install(precedence=Install.APPLICATION)
+@Name("org.jboss.seam.core.resourceLoader")
+public class WikiResourceLoader extends ResourceLoader {
+
+ protected String[] CORE_BUNDLE_NAMES = new String[] {
+ "i18n.messages", "i18n.messages_feedConnector", "i18n_messags_jiraConnector"
+ };
+
+ public String[] getBundleNames() {
+ List<String> bundleNames = (List<String>) Component.getInstance("pluginMessageBundleNames");
+ bundleNames.addAll(Arrays.asList(CORE_BUNDLE_NAMES));
+ String[] bundles = new String[bundleNames.size()];
+ return bundleNames.toArray(bundles);
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/WikiUtil.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -10,7 +10,6 @@
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
import org.jboss.seam.wiki.core.model.*;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
import org.jboss.seam.wiki.preferences.Preferences;
import javax.faces.context.FacesContext;
@@ -122,11 +121,11 @@
public static boolean showEmailAddress() {
Integer accessLevel = (Integer)Component.getInstance("currentAccessLevel");
- if (Preferences.getInstance(WikiPreferences.class).isShowEmailToLoggedInOnly()
+ if (Preferences.instance().get(WikiPreferences.class).isShowEmailToLoggedInOnly()
&& Identity.instance().isLoggedIn()
&& accessLevel == Role.ADMINROLE_ACCESSLEVEL) {
return true;
- } else if (!Preferences.getInstance(WikiPreferences.class).isShowEmailToLoggedInOnly()) {
+ } else if (!Preferences.instance().get(WikiPreferences.class).isShowEmailToLoggedInOnly()) {
return true;
}
return false;
@@ -167,12 +166,12 @@
public static String escapeEmailURL(String string) {
return string.length() >= 7 && string.substring(0, 7).equals("mailto:")
- ? string.replaceAll("@", Preferences.getInstance(WikiPreferences.class).getAtSymbolReplacement())
+ ? string.replaceAll("@", Preferences.instance().get(WikiPreferences.class).getAtSymbolReplacement())
: string;
}
public static String escapeAtSymbol(String string) {
- return string.replaceAll("@", Preferences.getInstance(WikiPreferences.class).getAtSymbolReplacement());
+ return string.replaceAll("@", Preferences.instance().get(WikiPreferences.class).getAtSymbolReplacement());
}
public static String escapeHtml(String string, boolean convertNewlines) {
@@ -327,7 +326,7 @@
*/
public static String calculateMessageId(Long id, String s) {
- WikiPreferences prefs = Preferences.getInstance(WikiPreferences.class);
+ WikiPreferences prefs = Preferences.instance().get(WikiPreferences.class);
Hash hash = (Hash)Component.getInstance(Hash.class);
String domain;
try {
@@ -341,12 +340,4 @@
return msgId.toString();
}
- public static String macroCacheKey(WikiDocument currentDocument, WikiMacro macro) {
- Hash hash = (Hash)Component.getInstance(Hash.class);
-
- StringBuilder builder = new StringBuilder();
- builder.append(currentDocument.getId()).append(macro.hashCode()).append(macro.getParams().hashCode());
- return macro.getName() + "-" + hash.hash(builder.toString());
- }
-
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/XmlDeploymentHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/XmlDeploymentHandler.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/util/XmlDeploymentHandler.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.util;
+
+import org.dom4j.DocumentException;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+import org.jboss.seam.deployment.DeploymentHandler;
+import org.jboss.seam.util.DTDEntityResolver;
+
+import java.io.InputStream;
+import java.io.FileNotFoundException;
+import java.util.HashMap;
+import java.util.Map;
+import java.net.UnknownHostException;
+
+/**
+ * Seam deployment handler, can be configured in seam-deployment.properties.
+ * <p>
+ * Supports scanning of files with <tt>getExtension()</tt>, returns them as dom4j
+ * <tt>Element</tt> (the root element of each XML file). Override the
+ * <tt>isSchemaValidating()</tt> method to force DTD/schema validation.
+ * </p>
+ *
+ * @author Christian Bauer
+ */
+public abstract class XmlDeploymentHandler implements DeploymentHandler {
+
+ Map<String, InputStream> files = new HashMap<String, InputStream>();
+ Map<String, Element> elements;
+
+ public void handle(String s, ClassLoader classLoader) {
+ if (s.endsWith(getExtension())) {
+ files.put(s, classLoader.getResourceAsStream(s));
+ }
+ }
+
+ public abstract String getExtension();
+
+ public boolean isSchemaValidating() {
+ return false;
+ }
+
+ public Map<String, Element> getDescriptorsAsXmlElements() {
+ // Lazy access to streams
+ if (elements == null) {
+ elements = new HashMap<String, Element>();
+ for (Map.Entry<String, InputStream> fileInputStream : files.entrySet()) {
+ try {
+ SAXReader saxReader = new SAXReader();
+ saxReader.setMergeAdjacentText(true);
+
+ if (isSchemaValidating()) {
+ saxReader.setEntityResolver(new DTDEntityResolver());
+ saxReader.setValidation(true);
+ saxReader.setFeature("http://apache.org/xml/features/validation/schema",true);
+ }
+
+ elements.put(fileInputStream.getKey(), saxReader.read(fileInputStream.getValue()).getRootElement());
+
+ } catch (DocumentException dex) {
+ Throwable nested = dex.getNestedException();
+ if (nested != null) {
+ if (nested instanceof FileNotFoundException) {
+ throw new RuntimeException(
+ "Can't find schema/DTD reference for file: "
+ + fileInputStream.getKey() + "': "
+ + nested.getMessage(), dex
+ );
+ } else if (nested instanceof UnknownHostException) {
+ throw new RuntimeException(
+ "Cannot connect to host from schema/DTD reference: "
+ + nested.getMessage()
+ + " - check that your schema/DTD reference is current", dex
+ );
+ }
+ }
+ throw new RuntimeException("Could not parse XML file: " + fileInputStream.getKey() ,dex);
+ } catch (Exception ex) {
+ throw new RuntimeException("Could not parse XML file: " + fileInputStream.getKey() ,ex);
+ }
+ }
+ }
+ return elements;
+ }
+
+}
Added: 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 (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin key="basic"
+ xmlns="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/wiki/plugin
+ classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
+
+ <plugin-info version="1.0">
+ <application-version min="1.0" max="1.0"/>
+ <vendor name="Red Hat Inc." url="http://www.seamframework.org/"/>
+ </plugin-info>
+
+ <macro key="clearBackground" name="clearBackground">
+ <skins>
+ <skin name="d"/>
+ </skins>
+ <applicable-to content="true" header="true"/>
+ </macro>
+
+ <macro key="hideControls" name="hideControls">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true" header="true" footer="true"/>
+ </macro>
+
+ <macro key="hideComments" name="hideComments">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true" header="true" footer="true"/>
+ </macro>
+
+ <macro key="hideTags" name="hideTags">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true" header="true" footer="true"/>
+ </macro>
+
+ <macro key="hideCreatorHistory" name="hideCreatorHistory">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true" header="true" footer="true"/>
+ </macro>
+
+ <macro key="disableContentMacros" name="disableContentMacros">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to header="true"/>
+ </macro>
+
+ <macro key="dirMenu" name="dirMenu">
+ <skins>
+ <skin name="d"/>
+ </skins>
+ <applicable-to content="true"/>
+ <cache-regions>
+ <cache-region name="DirMenuList">
+ <invalidation-event name="Node.removed"/>
+ <invalidation-event name="Node.updated"/>
+ <invalidation-event name="Node.persisted"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="dirToc" name="dirToc">
+ <skins>
+ <skin name="d"/>
+ </skins>
+ <applicable-to content="true"/>
+ <cache-regions>
+ <cache-region name="DirectoryToc">
+ <invalidation-event name="Node.persisted"/>
+ <invalidation-event name="Node.removed"/>
+ <invalidation-event name="Node.updated"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="docPager" name="docPager">
+ <skins>
+ <skin name="m"/>
+ <skin name="d"/>
+ </skins>
+ <applicable-to content="true" header="true" footer="true"/>
+ <cache-regions>
+ <cache-region name="DocPager">
+ <invalidation-event name="Node.persisted"/>
+ <invalidation-event name="Node.removed"/>
+ <invalidation-event name="Node.updated"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="lastModifiedDocuments" name="lastModifiedDocuments">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <cache-regions>
+ <cache-region name="LastModifiedDocumentList">
+ <invalidation-event name="Node.removed"/>
+ <invalidation-event name="Node.updated"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="flash" name="flash">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ </skins>
+ </macro>
+
+ <macro key="tags" name="tags">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <cache-regions>
+ <cache-region name="Tags">
+ <invalidation-event name="Node.persisted"/>
+ <invalidation-event name="Node.removed"/>
+ <invalidation-event name="Node.updated"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="userProfile" name="userProfile">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <cache-regions>
+ <cache-region name="UserProfile">
+ <invalidation-event name="User.updated"/>
+ <invalidation-event name="User.removed"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+</plugin>
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenu.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirMenu/DirMenu.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenu.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenu.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -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.plugin.basic;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.nestedset.query.NestedSetNodeWrapper;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+
+import java.io.Serializable;
+
+/**
+ * Menu tree, base is the current directory.
+ *
+ * @author Christian Bauer
+ */
+@Name("dirMenu")
+(a)Scope(ScopeType.PAGE)
+public class DirMenu implements Serializable {
+
+ public static final String MACRO_ATTR_ROOT = "dirMenuRoot";
+
+ @In
+ WikiDirectory currentDirectory;
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+ public NestedSetNodeWrapper<WikiDirectory> getRoot(WikiPluginMacro macro) {
+ // We cache the result in the macro, so that when the getter is called over and over during rendering, we have it
+ if (macro.getAttributes().get(MACRO_ATTR_ROOT) == null) {
+ NestedSetNodeWrapper<WikiDirectory> root;
+ DirMenuPreferences prefs = Preferences.instance().get(DirMenuPreferences.class, macro);
+ if (prefs.getOnlyMenuItems() != null && prefs.getOnlyMenuItems()) {
+ root = wikiNodeDAO.findMenuItemTree(currentDirectory, 3l, 3l, false);
+ } else {
+ root = wikiNodeDAO.findWikiDirectoryTree(currentDirectory, 3l, 3l, false);
+ }
+ macro.getAttributes().put(MACRO_ATTR_ROOT, root);
+ }
+ return (NestedSetNodeWrapper<WikiDirectory>)macro.getAttributes().get(MACRO_ATTR_ROOT);
+ }
+
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenu.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenuPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirMenu/DirMenuPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenuPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenuPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
+import org.hibernate.validator.Length;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+
+import java.io.Serializable;
+
+@Preferences(
+ name = "DirMenu",
+ description = "#{messages['basic.dirMenu.preferences.description']}",
+ mappedTo = "basic.dirMenu"
+)
+public class DirMenuPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirMenu.preferences.property.title']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ @NotNull
+ private String title;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirMenu.preferences.property.menuLevels']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 10l)
+ @NotNull
+ private Long menuLevels;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirMenu.preferences.property.menuDepth']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+
+ )
+ @Range(min = 1l, max = 100l)
+ @NotNull
+ private Long menuDepth;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirMenu.preferences.property.showSubscribeIcon']}",
+ visibility = PreferenceVisibility.INSTANCE
+ )
+ private Boolean showSubscribeIcon;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirMenu.preferences.property.onlyMenuItems']}",
+ visibility = PreferenceVisibility.INSTANCE
+ )
+ private Boolean onlyMenuItems;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public Long getMenuLevels() {
+ return menuLevels;
+ }
+
+ public Long getMenuDepth() {
+ return menuDepth;
+ }
+
+ public Boolean getShowSubscribeIcon() {
+ return showSubscribeIcon;
+ }
+
+ public Boolean getOnlyMenuItems() {
+ return onlyMenuItems;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenuPreferences.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Length;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(
+ name = "DirToc",
+ description = "#{messages['basic.dirToc.preferences.description']}",
+ mappedTo = "basic.dirToc"
+)
+public class DirTocPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirToc.preferences.property.showRootDocuments']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean showRootDocuments;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirToc.preferences.property.showDefaultDocuments']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean showDefaultDocuments;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.dirToc.preferences.property.showLastUpdatedTimestamp']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean showLastUpdatedTimestamp;
+
+ @PreferenceProperty(
+ description = "#{messages['dirToc.preferences.property.withHeaderMacro']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String withHeaderMacro;
+
+ @PreferenceProperty(
+ description = "#{messages['dirToc.preferences.property.rootDocumentLink']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String rootDocumentLink;
+
+ public Boolean getShowRootDocuments() {
+ return showRootDocuments;
+ }
+
+ public Boolean getShowDefaultDocuments() {
+ return showDefaultDocuments;
+ }
+
+ public Boolean getShowLastUpdatedTimestamp() {
+ return showLastUpdatedTimestamp;
+ }
+
+ public String getWithHeaderMacro() {
+ return withHeaderMacro;
+ }
+
+ public String getRootDocumentLink() {
+ return rootDocumentLink;
+ }
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocQuery.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/dirToc/DirTocQuery.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocQuery.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirTocQuery.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.engine.WikiLinkResolver;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.nestedset.query.NestedSetNodeWrapper;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+import org.richfaces.component.UITree;
+
+import javax.persistence.EntityManager;
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("dirTocQuery")
+(a)Scope(ScopeType.CONVERSATION)
+public class DirTocQuery implements Serializable {
+
+ public static final String MACRO_ATTR_TOCROOT = "dirTocRoot";
+
+ @In
+ EntityManager restrictedEntityManager;
+
+ @In
+ Integer currentAccessLevel;
+
+ @In
+ WikiDirectory currentDirectory;
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+
+ public NestedSetNodeWrapper<WikiDirectory> getTocRoot(WikiPluginMacro macro) {
+
+ NestedSetNodeWrapper<WikiDirectory> tocRoot =
+ (NestedSetNodeWrapper<WikiDirectory>)macro.getAttributes().get(MACRO_ATTR_TOCROOT);
+ if (tocRoot == null) {
+ DirTocPreferences prefs = Preferences.instance().get(DirTocPreferences.class, macro);
+
+ if (prefs.getRootDocumentLink() != null) {
+ Long id = ((WikiLinkResolver)Component.getInstance("wikiLinkResolver"))
+ .resolveWikiDirectoryId(currentDirectory.getAreaNumber(), prefs.getRootDocumentLink());
+ WikiDirectory foundDir = wikiNodeDAO.findWikiDirectory(id);
+ if (foundDir != null)
+ currentDirectory = foundDir;
+ }
+
+ // Query the directory tree
+ tocRoot = wikiNodeDAO.findWikiDirectoryTree(currentDirectory);
+
+ Set<Long> directoryIds = new HashSet<Long>(tocRoot.getFlatTree().keySet());
+ if (prefs.getShowRootDocuments() != null && prefs.getShowRootDocuments()) {
+ directoryIds.add(tocRoot.getWrappedNode().getId());
+ }
+ if (directoryIds.size() == 0) return null; // Early exit
+
+ // Now query the documents for the directories in the tree
+ StringBuilder queryString = new StringBuilder();
+ queryString.append("select d from WikiDocument d ");
+ // TODO: Rewrite this query to use a subselect nested set query, this has limits
+ queryString.append("where d.parent.id in (:directories) ");
+ if (prefs.getWithHeaderMacro() != null)
+ queryString.append("and d.headerMacrosString like :headerMacro").append(" ");
+ queryString.append("order by d.createdOn asc");
+
+ Query query = getSession().createQuery(queryString.toString());
+ query.setParameterList("directories", directoryIds);
+ if (prefs.getWithHeaderMacro() != null)
+ query.setParameter("headerMacro", "%"+prefs.getWithHeaderMacro()+"%");
+ query.setComment("retrieving documents for toc directory tree");
+
+ List<WikiDocument> flatDocs = query.list();
+
+ // Now attach the documents as payloads to the directories in the tree
+ for (WikiDocument flatDoc : flatDocs) {
+
+ Long directoryId = flatDoc.getParent().getId();
+ NestedSetNodeWrapper<WikiDirectory> dirWrapper;
+
+ if (prefs.getShowRootDocuments() != null && prefs.getShowRootDocuments()
+ && directoryId.equals(tocRoot.getWrappedNode().getId())) {
+ dirWrapper = tocRoot;
+ } else {
+ dirWrapper = tocRoot.getFlatTree().get(directoryId);
+ }
+
+ if (dirWrapper.getPayload() == null)
+ dirWrapper.setPayload(new ArrayList<WikiDocument>());
+
+ ((Collection)dirWrapper.getPayload()).add(flatDoc);
+ }
+
+ macro.getAttributes().put(MACRO_ATTR_TOCROOT, tocRoot);
+ }
+
+ return tocRoot;
+ }
+
+ public boolean expandTocTree(UITree tree) {
+ return true; // Expand all nodes by default;
+ }
+
+ private Session getSession() {
+ return ((Session)((org.jboss.seam.persistence.EntityManagerProxy) restrictedEntityManager).getDelegate());
+ }
+
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPager.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/docPager/DocPager.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPager.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPager.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiNode;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("docPager")
+(a)Scope(ScopeType.PAGE)
+public class DocPager implements Serializable {
+
+ public static final String MACRO_ATTR_PAGER_PREVIOUS = "docPagerPrevious";
+ public static final String MACRO_ATTR_PAGER_NEXT = "docPagerNext";
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+ @In
+ WikiDocument currentDocument;
+
+ public WikiDocument getPrevious(WikiPluginMacro macro) {
+ WikiDocument previous = (WikiDocument) macro.getAttributes().get(MACRO_ATTR_PAGER_PREVIOUS);
+ if (previous == null) {
+ previous = wikiNodeDAO.findSiblingWikiDocumentInDirectory(currentDocument, getSortingProperty(macro), true);
+ macro.getAttributes().put(MACRO_ATTR_PAGER_PREVIOUS, previous);
+ }
+ return previous;
+ }
+
+ public WikiDocument getNext(WikiPluginMacro macro) {
+ WikiDocument next = (WikiDocument) macro.getAttributes().get(MACRO_ATTR_PAGER_NEXT);
+ if (next == null) {
+ next = wikiNodeDAO.findSiblingWikiDocumentInDirectory(currentDocument, getSortingProperty(macro), false);
+ macro.getAttributes().put(MACRO_ATTR_PAGER_NEXT, next);
+ }
+ return next;
+ }
+
+ private WikiNode.SortableProperty getSortingProperty(WikiPluginMacro macro) {
+ DocPagerPreferences prefs = Preferences.instance().get(DocPagerPreferences.class, macro);
+ // By default, previous/next documents are searched by creation date
+ WikiNode.SortableProperty byProperty = WikiNode.SortableProperty.createdOn;
+ if (prefs.getByProperty() != null) {
+ try {
+ byProperty = WikiNode.SortableProperty.valueOf(prefs.getByProperty());
+ } catch (IllegalArgumentException ex) {}
+ }
+ return byProperty;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPager.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPagerPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/docPager/DocPagerPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPagerPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPagerPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotNull;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(
+ name = "DocPager",
+ description = "#{messages['basic.docPager.preferences.description']}",
+ mappedTo = "basic.docPager"
+)
+public class DocPagerPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description = "#{messages['basic.docPager.preferences.property.byProperty']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String byProperty;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.docPager.preferences.property.showNames']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE}
+ )
+ @NotNull
+ private Boolean showNames;
+
+ public String getByProperty() {
+ return byProperty;
+ }
+
+ public Boolean getShowNames() {
+ return showNames;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DocPagerPreferences.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Flash.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/flash/Flash.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Flash.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Flash.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,41 @@
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.log.Log;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.util.Arrays;
+
+@Name("flash")
+(a)Scope(ScopeType.PAGE)
+public class Flash implements Serializable {
+
+ @Logger
+ Log log;
+
+ public boolean isValidURL(FlashPreferences prefs) {
+
+ String allowedDomains = prefs.getAllowedDomains();
+ if (allowedDomains == null || allowedDomains.length() == 0) return false;
+
+ String desiredDomainName;
+ try {
+ URI uri = new URI(prefs.getUrl());
+ desiredDomainName = uri.getHost();
+ } catch (Exception ex) {
+ log.debug("Exception parsing flash movie URL into URI: " + ex.getMessage());
+ return false;
+ }
+ allowedDomains = allowedDomains.replaceAll("\\s", ""); // Remove spaces
+ String[] allowedDomainNames = allowedDomains.split(",");
+ if (desiredDomainName == null || desiredDomainName.length() == 0) return true;
+
+ Arrays.sort(allowedDomainNames);
+ return Arrays.binarySearch(allowedDomainNames, desiredDomainName) >= 0;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Flash.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/FlashPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/flash/FlashPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/FlashPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/FlashPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,61 @@
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Range;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+
+import java.io.Serializable;
+
+@Preferences(
+ name = "Flash",
+ description = "#{messages['basic.flash.preferences.description']}",
+ mappedTo = "basic.flash"
+)
+public class FlashPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description = "#{messages['basic.flash.preferences.property.flashURL']}",
+ visibility = PreferenceVisibility.INSTANCE
+ )
+ @Length(min = 0, max = 1024)
+ private String url;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.flash.preferences.property.width']}",
+ visibility = PreferenceVisibility.INSTANCE
+ )
+ @Range(min = 1l, max = 2000l)
+ private Long width;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.flash.preferences.property.height']}",
+ visibility = PreferenceVisibility.INSTANCE
+ )
+ @Range(min = 1l, max = 2000l)
+ private Long height;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.flash.preferences.property.allowedDomains']}",
+ visibility = PreferenceVisibility.SYSTEM
+ )
+ @Length(min = 3, max = 1024)
+ private String allowedDomains;
+
+ public String getUrl() {
+ return url;
+ }
+
+ public Long getWidth() {
+ return width;
+ }
+
+ public Long getHeight() {
+ return height;
+ }
+
+ public String getAllowedDomains() {
+ return allowedDomains;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/FlashPreferences.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocuments.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocuments.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocuments.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiNode;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Name("lastModifiedDocuments")
+(a)Scope(ScopeType.PAGE)
+public class LastModifiedDocuments implements Serializable {
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+ public List<WikiDocument> getListOfDocuments(LastModifiedDocumentsPreferences prefs) {
+ return
+ wikiNodeDAO.findWikiDocuments(
+ Long.valueOf(prefs.getNumberOfItems()).intValue(),
+ WikiNode.SortableProperty.lastModifiedOn,
+ false
+ );
+ }
+
+}
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocumentsPreferences.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocumentsPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/LastModifiedDocumentsPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,68 @@
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
+import org.hibernate.validator.Length;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+
+import java.io.Serializable;
+
+@Preferences(
+ name = "LastModifiedDocuments",
+ description = "#{messages['basic.lastModifiedDocuments.preferences.description']}",
+ mappedTo = "basic.lastModifiedDocuments"
+)
+public class LastModifiedDocumentsPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description = "#{messages['basic.lastModifiedDocuments.preferences.property.title']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ @NotNull
+ private String title;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.lastModifiedDocuments.preferences.property.numberOfItems']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 3l, max = 25l)
+ @NotNull
+ private Long numberOfItems;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.lastModifiedDocuments.preferences.property.showUsernames']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE}
+ )
+ @NotNull
+ private Boolean showUsernames;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.lastModifiedDocuments.preferences.property.documentTitleLength']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 5l, max = 100l)
+ @NotNull
+ private Long documentTitleLength;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public Long getNumberOfItems() {
+ return numberOfItems;
+ }
+
+ public Boolean getShowUsernames() {
+ return showUsernames;
+ }
+
+ public Long getDocumentTitleLength() {
+ return documentTitleLength;
+ }
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsAggregator.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsAggregator.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsAggregator.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsAggregator.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,67 @@
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.DisplayTagCount;
+import org.jboss.seam.wiki.core.dao.TagDAO;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+
+import java.util.*;
+import java.io.Serializable;
+
+@Name("tagsAggregator")
+(a)Scope(ScopeType.PAGE)
+public class TagsAggregator implements Serializable {
+
+ public static final String MACRO_ATTR_AGGREGATED_TAGS = "aggregatedTags";
+ public static final String MACRO_ATTR_HIGHEST_TAG_COUNT = "highestTagCount";
+
+ @In
+ TagDAO tagDAO;
+
+ @In
+ WikiDirectory currentDirectory;
+
+ @In
+ WikiDocument currentDocument;
+
+ public List<DisplayTagCount> getTagsSortedByCount(WikiPluginMacro macro) {
+
+ List<DisplayTagCount> tagsSortedByCount = (List<DisplayTagCount>) macro.getAttributes().get(MACRO_ATTR_AGGREGATED_TAGS);
+ if (tagsSortedByCount == null) {
+
+ TagsPreferences prefs = Preferences.instance().get(TagsPreferences.class, macro);
+ tagsSortedByCount =
+ tagDAO.findTagCounts(
+ currentDirectory,
+ currentDocument,
+ prefs.getMaxNumberOfTags() != null ? prefs.getMaxNumberOfTags().intValue() : 0,
+ prefs.getMinimumCount() != null ? prefs.getMinimumCount() : 1l
+ );
+
+ macro.getAttributes().put(MACRO_ATTR_AGGREGATED_TAGS, tagsSortedByCount);
+ }
+
+ return tagsSortedByCount;
+ }
+
+ public Long getHighestTagCount(WikiPluginMacro macro) {
+ Long highestTagCount = (Long)macro.getAttributes().get(MACRO_ATTR_HIGHEST_TAG_COUNT);
+ if (highestTagCount == null) {
+ highestTagCount = 0l;
+ List<DisplayTagCount> tagsSortedByCount = getTagsSortedByCount(macro);
+ for (DisplayTagCount tagCount : tagsSortedByCount) {
+ if (tagCount.getCount() > highestTagCount) highestTagCount= tagCount.getCount();
+ }
+ macro.getAttributes().put(MACRO_ATTR_HIGHEST_TAG_COUNT, highestTagCount);
+ }
+ return highestTagCount;
+ }
+
+
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsAggregator.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(
+ name = "Tags",
+ description = "#{messages['basic.tags.preferences.description']}",
+ mappedTo = "basic.tags"
+)
+public class TagsPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['basic.tags.preferences.property.linkToCurrentDocument']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE}
+ )
+ @NotNull
+ private Boolean linkToCurrentDocument;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.tags.preferences.property.maxNumberOfTags']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 99l)
+ private Long maxNumberOfTags;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.tags.preferences.property.minimumCount']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 99l)
+ private Long minimumCount;
+
+ @PreferenceProperty(
+ description = "#{messages['basic.tags.preferences.property.cloud']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean cloud;
+
+ public Boolean getLinkToCurrentDocument() {
+ return linkToCurrentDocument;
+ }
+
+ public Long getMaxNumberOfTags() {
+ return maxNumberOfTags;
+ }
+
+ public Long getMinimumCount() {
+ return minimumCount;
+ }
+
+ public Boolean getCloud() {
+ return cloud;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/TagsPreferences.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: 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 (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,77 @@
+basic.label=Basic Wiki Macros
+basic.description=Built-in and basic macros
+
+basic.clearBackground.label=Clear Background
+basic.clearBackground.description=Clear the background of the rendered document
+
+basic.hideControls.label=Hide Controls
+basic.hideControls.description=Do not display page controls
+
+basic.hideComments.label=Hide Comments
+basic.hideComments.description=Do not display comments of document (even if comments are enabled)
+
+basic.hideTags.label=Hide Tags
+basic.hideTags.description=Do not display tags of document
+
+basic.hideCreatorHistory.label=Hide Creator/History
+basic.hideCreatorHistory.description=Do not display creator and history of document
+
+basic.disableContentMacros.label=Disable Content Macros
+basic.disableContentMacros.description=Disable execution of macros in document content area
+
+basic.dirMenu.label=Directory Menu
+basic.dirMenu.description=Shows a list of subdirectories of the current directory
+basic.dirMenu.preferences.description=Plugin: Directory Menu
+basic.dirMenu.preferences.property.title=Default menu title
+basic.dirMenu.preferences.property.menuLevels=Flatten display of menu tree to levels
+basic.dirMenu.preferences.property.menuDepth=Maximum depth of menu items
+basic.dirMenu.preferences.property.showSubscribeIcon=Show 'Subscribe' icon
+basic.dirMenu.preferences.property.onlyMenuItems=Display only menu items
+basic.dirMenu.label.Subscribe=Subscribe
+
+basic.lastModifiedDocuments.label=Last Modified Documents
+basic.lastModifiedDocuments.description=Displays list of recently updated wiki documents
+basic.lastModifiedDocuments.preferences.description=Plugin: Last Modified Documents
+basic.lastModifiedDocuments.preferences.property.title=Title of plugin box
+basic.lastModifiedDocuments.preferences.property.numberOfItems=Number of items shown in list
+basic.lastModifiedDocuments.preferences.property.showUsernames=Show user names
+basic.lastModifiedDocuments.preferences.property.documentTitleLength=Truncate document titles after characters
+
+basic.flash.label=Flash Object
+basic.flash.description=Embedding of Flash objects
+basic.flash.preferences.description=Plugin: Flash
+basic.flash.preferences.property.flashURL=URL of flash movie
+basic.flash.preferences.property.width=Width in pixels
+basic.flash.preferences.property.height=Height in pixels
+basic.flash.preferences.property.allowedDomains=Comma-separated list of allowed domain names
+basic.flash.msg.URLNotSupplied=[Flash Macro: Add 'url' macro parameter to embed flash movie.]
+basic.flash.msg.URLNotAllowed=[Flash Macro: The flash URL you supplied is not in the list of valid domains, please ask the system administrator to add it.]
+
+basic.dirToc.label=Directory TableOfContents
+basic.dirToc.description=Display a tree of subdirectories/documents as a ToC
+basic.dirToc.preferences.decription=Plugin: Directory TOC
+basic.dirToc.preferences.property.showRootDocuments=Show documents of root directory
+basic.dirToc.preferences.property.showDefaultDocuments=Show default documents of all directories
+basic.dirToc.preferences.property.showLastUpdatedTimestamp=Show 'Last Updated' timestamp
+basic.dirToc.preferences.property.sithHeaderMacro=Only show documents with macro in header
+basic.dirToc.preferences.property.rootDocumentLink=Wiki link to root document of TOC
+basic.dirToc.label.LastUpdated=Last Updated
+
+basic.docPager.label=Document Pager
+basic.docPager.description=Displays a previous/next document pager
+basic.docPager.preferences.description=Plugin: Doc Pager
+basic.docPager.preferences.property.byProperty=Property used to search previous/next doc
+basic.docPager.preferences.property.showNames=Show names of previous/next document
+
+basic.tags.label=Tags
+basic.tags.description=Displays tag lists or clouds
+basic.tags.preferences.description=Plugin: Tags
+basic.tags.preferences.property.linkToCurrentDocument=Link to current (aggregator) document
+basic.tags.preferences.property.maxNumberOfTags=Maximum number of tags displayed
+basic.tags.preferences.property.minimumCount=Minimum number of occurences of a tag
+basic.tags.preferences.property.cloud=Display tags as cloud (not list)
+basic.tags.label.Tags=Tags
+basic.tags.label.All=All...
+
+basic.userProfile.label=User Profile
+basic.userProfile.description=Display the profile of the current document owner/creator
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/clearBackground.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/clearBackground/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/clearBackground.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/clearBackground.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,14 @@
+<wiki:plugin
+ 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:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <script type="text/javascript">jQuery(function() {
+ clearDocumentBackground();
+ });</script>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/clearBackground.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenu.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/dirMenu/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenu.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenu.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,50 @@
+<wiki:plugin
+ 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:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="box dirMenu">
+
+ <s:div styleClass="boxHeader" rendered="#{not preferences.get('DirMenu', currentMacro).showSubscribeIcon}">
+ <h:outputText value="#{preferences.get('DirMenu', currentMacro).title}"/>
+ </s:div>
+
+ <h:panelGrid rendered="#{preferences.get('DirMenu', currentMacro).showSubscribeIcon}"
+ columns="2" cellpadding="0" cellspacing="0" border="0"
+ styleClass="boxHeader fullWidth">
+
+ <h:panelGrid rendered="#{not empty currentDirectory.feed}" columns="2" cellpadding="0" cellspacing="0" border="0">
+ <h:outputLink target="_top"
+ value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
+ <h:graphicImage value="#{imagePath}/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"/>
+ </h:outputLink>
+ <h:outputLink target="_top"
+ value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
+ <h:outputText value="#{currentMacro.getMessage('label.Subscribe')}"/>
+ </h:outputLink>
+ </h:panelGrid>
+
+ <h:outputText value="#{preferences.get('DirMenu', currentMacro).title}"/>
+
+ </h:panelGrid>
+
+ <div class="boxContent">
+
+ <s:cache region="#{currentMacro.getCacheRegion('DirMenuList')}"
+ key="#{currentMacro.cacheKey}">
+ <ui:include src="dirMenuItem.xhtml">
+ <ui:param name="node" value="#{dirMenu.getRoot(currentMacro)}"/>
+ </ui:include>
+ </s:cache>
+ </div>
+
+ <s:div styleClass="boxFooter"/>
+
+ </s:div>
+
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenu.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenuItem.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/dirMenu/dirMenuItem.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenuItem.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenuItem.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,35 @@
+<ui:composition
+ 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:c="http://java.sun.com/jstl/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<c:forEach var="childWrapper" items="#{node.wrappedChildren}">
+ <s:div styleClass="level#{childWrapper.level}">
+ <s:div styleClass="level#{childWrapper.level}Body">
+ <h:panelGrid columns="3"
+ columnClasses="level#{childWrapper.level}Marker, level#{childWrapper.level}Icon, level#{childWrapper.level}LinkColumn">
+
+ <h:outputText value="·"/>
+
+ <s:span>
+ <h:graphicImage value="#{imagePath}/icon.dir.gif" width="18" height="20"/>
+ </s:span>
+
+ <h:outputLink styleClass="level#{childWrapper.level}Link" target="_top"
+ value="#{wikiURLRenderer.renderURL(childWrapper.wrappedNode)}">#{wiki:truncateString(childWrapper.wrappedNode.name, 40, '...')}</h:outputLink>
+
+ </h:panelGrid>
+ </s:div>
+ <s:div styleClass="level#{childWrapper.level}Children" style="padding-left: #{childWrapper.level*7}px;">
+ <ui:include src="dirMenuItem.xhtml">
+ <ui:param name="node" value="#{childWrapper}"/>
+ </ui:include>
+ </s:div>
+ </s:div>
+</c:forEach>
+
+</ui:composition>
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirMenuItem.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirToc.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/dirToc/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirToc.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/dirToc.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,78 @@
+<wiki:plugin
+ 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:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:cache region="#{currentMacro.getCacheRegion('DirectoryToc')}"
+ key="#{currentMacro.cacheKey}">
+
+ <rich:tree switchType="client" styleClass="dirToc"
+ adviseNodeOpened="#{dirTocQuery.expandTocTree}">
+
+ <rich:treeNodesAdaptor
+ var="rootDoc"
+ nodes="#{dirTocQuery.getTocRoot(currentMacro).payload}"
+ includedNode="#{rootDoc.id != dirTocQuery.getTocRoot(currentMacro).wrappedNode.defaultFile.id or
+ preferences.get('DirToc', currentMacro).showDefaultDocuments}">
+ <rich:treeNode>
+ <f:facet name="iconLeaf">
+ <h:graphicImage value="#{imagePath}/icon.doc.gif" width="18" height="20"/>
+ </f:facet>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(doc)}">
+ <h:outputText styleClass="tocDocumentLabel" value="#{doc.name}"/>
+ </h:outputLink>
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+
+ <rich:recursiveTreeNodesAdaptor
+ var="tocDir"
+ roots="#{dirTocQuery.getTocRoot(currentMacro).wrappedChildren}"
+ nodes="#{tocDir.wrappedChildren}">
+
+ <rich:treeNode>
+ <f:facet name="icon">
+ <h:graphicImage value="#{imagePath}/icon.dir.gif" width="18" height="20"/>
+ </f:facet>
+ <f:facet name="iconLeaf">
+ <h:graphicImage value="#{imagePath}/icon.dir.gif" width="18" height="20"/>
+ </f:facet>
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(tocDir.wrappedNode)}">
+ <h:outputText styleClass="tocDirectoryLabel" value="#{tocDir.wrappedNode.name}"/>
+ </h:outputLink>
+ </s:span>
+ </rich:treeNode>
+
+ <rich:treeNodesAdaptor var="doc" nodes="#{tocDir.payload}"
+ includedNode="#{doc.id != tocDir.wrappedNode.defaultFile.id or
+ preferences.get('DirToc', currentMacro).showDefaultDocuments}">
+ <rich:treeNode>
+ <f:facet name="iconLeaf">
+ <h:graphicImage value="#{imagePath}/icon.doc.gif" width="18" height="20"/>
+ </f:facet>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(doc)}">
+ <h:outputText styleClass="tocDocumentLabel" value="#{doc.name}"/>
+ </h:outputLink>
+ <s:span styleClass="tocLastUpdatedLabel"
+ rendered="#{preferences.get('DirToc', currentMacro).showLastUpdatedTimestamp and not empty doc.lastModifiedOn}">
+ <h:outputText value=" (#{messages['basic.dirToc.label.LastUpdated']}: "/>
+ <h:outputText value="#{doc.lastModifiedOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ <h:outputText value=")"/>
+ </s:span>
+ </rich:treeNode>
+ </rich:treeNodesAdaptor>
+
+ </rich:recursiveTreeNodesAdaptor>
+ </rich:tree>
+
+ </s:cache>
+
+</wiki:plugin>
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/docPager.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/docPager/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/docPager.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/docPager.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,45 @@
+<wiki:plugin
+ 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:s="http://jboss.com/products/seam/taglib">
+
+ <s:cache region="#{currentMacro.getCacheRegion('DocPager')}"
+ key="#{currentMacro.cacheKey}">
+
+ <h:panelGrid columns="2" styleClass="docPager" columnClasses="docPagerPrevious, docPagerNext"
+ cellpadding="0" cellspacing="0" border="0">
+ <s:div styleClass="undecoratedLink">
+ <s:fragment rendered="#{not empty docPager.getPrevious(currentMacro)}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.getPrevious(currentMacro))}">
+ <h:graphicImage styleClass="docPagerButton" value="#{imagePath}/left.gif" width="18" height="18"/>
+ <h:outputText styleClass="docPagerLabel"
+ rendered="#{not preferences.get('DocPager', currentMacro).showNames}"
+ value="#{messages['lacewiki.label.Previous']}"/>
+ <h:outputText styleClass="docPagerLabel"
+ rendered="#{preferences.get('DocPager', currentMacro).showNames}"
+ value="#{wiki:truncateString(docPager.getPrevious(currentMacro).name, 35, '...')}"/>
+ </h:outputLink>
+ </s:fragment>
+ </s:div>
+ <s:div styleClass="undecoratedLink">
+ <s:fragment rendered="#{not empty docPager.getNext(currentMacro)}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.getNext(currentMacro))}">
+ <h:outputText styleClass="docPagerLabel"
+ rendered="#{not preferences.get('DocPager', currentMacro).showNames}"
+ value="#{messages['lacewiki.label.Next']}"/>
+ <h:outputText styleClass="docPagerLabel"
+ rendered="#{preferences.get('DocPager', currentMacro).showNames}"
+ value="#{wiki:truncateString(docPager.getNext(currentMacro).name, 35, '...')}"/>
+ <h:graphicImage styleClass="docPagerButton" value="#{imagePath}/right.gif" width="18" height="18"/>
+ </h:outputLink>
+ </s:fragment>
+ </s:div>
+ </h:panelGrid>
+
+ </s:cache>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/docPager.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/flash.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/flash/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/flash.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/flash.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,38 @@
+<wiki:plugin
+ 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 id="flashPluginDiv">
+
+ <s:div rendered="#{not empty preferences.get('Flash', currentMacro).url and flash.isValidURL(preferences.get('Flash', currentMacro))}">
+ <object width="#{preferences.get('Flash', currentMacro).width}"
+ height="#{preferences.get('Flash', currentMacro).height}">
+ <param name="movie" value="#{preferences.get('Flash', currentMacro).url}"></param>
+ <param name="wmode" value="transparent"></param>
+ <embed src="#{preferences.get('Flash', currentMacro).url}"
+ type="application/x-shockwave-flash"
+ wmode="transparent"
+ width="#{preferences.get('Flash', currentMacro).width}"
+ height="#{preferences.get('Flash', currentMacro).height}">
+ </embed>
+ </object>
+ </s:div>
+
+ <s:div rendered="#{empty preferences.get('Flash', currentMacro).url}"
+ styleClass="flashURLNotSupplied">
+ <h:outputText value="#{messages['basic.flash.msg.URLNotSupplied']}"/>
+ </s:div>
+
+ <s:div rendered="#{not empty preferences.get('Flash', currentMacro).url and
+ not flash.isValidURL(preferences.get('Flash', currentMacro))}"
+ styleClass="flashURLNotAllowed">
+ <h:outputText value="#{messages['basic.flash.msg.URLNotAllowed']}"/>
+ </s:div>
+
+</s:div>
+
+</wiki:plugin>
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/flash.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: 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 (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,70 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ 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:cache region="#{currentMacro.getCacheRegion('LastModifiedDocumentList')}"
+ key="#{currentMacro.cacheKey}">
+
+ <s:div styleClass="box lastModifiedDocuments">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('LastModifiedDocuments', currentMacro).title}"/>
+ </s:div>
+
+ <div class="boxContent">
+
+ <h:dataTable value="#{lastModifiedDocuments.getListOfDocuments(preferences.get('LastModifiedDocuments', currentMacro))}"
+ var="doc"
+ styleClass="datatable lastModifiedDocumentsTable"
+ columnClasses="defaultColumn alignLeft lastModifiedColumn"
+ rowClasses="rowOdd,rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+ <h:column>
+
+ <s:div styleClass="lastModifiedAuthorDate smallFont">
+
+ <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:outputText value="#{doc.lastModifiedBy.username}"/>
+ </h:outputLink>
+ </s:span>
+ <s:span rendered="#{not wiki:isRegularUser(doc.lastModifiedBy)}">
+ <h:outputText value="#{doc.lastModifiedBy.username}"/>
+ </s:span>)
+
+ <h:outputText value=" "/>
+ </s:fragment>
+
+ <h:outputText value="#{doc.lastModifiedOn}"
+ rendered="#{!empty doc.lastModifiedOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+
+ </s:div>
+
+ <s:div styleClass="lastModifiedTitle wrapWhitespace">
+ <h:outputLink target="_top" value="#{wikiURLRenderer.renderURL(doc)}" styleClass="lastModifiedLink">
+ <h:outputText value="#{wiki:truncateString(doc.name, preferences.get('LastModifiedDocuments', currentMacro).documentTitleLength, '...')}"/>
+ </h:outputLink>
+ </s:div>
+
+ </h:column>
+ </h:dataTable>
+
+ </div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</s:cache>
+
+</wiki:plugin>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/tags.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/tags/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/tags.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/tags.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,83 @@
+<wiki:plugin
+ 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:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:cache region="#{currentMacro.getCacheRegion('Tags')}"
+ key="#{currentMacro.cacheKey}">
+
+ <s:div styleClass="box">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{messages['basic.tags.label.Tags']}"/>
+ </s:div>
+
+ <div class="boxContent" style="padding: 5px;">
+
+ <s:fragment rendered="#{not preferences.get('Tags', currentMacro).cloud}">
+
+ <h:dataTable value="#{tagsAggregator.getTagsSortedByCount(currentMacro)}" var="tagCount"
+ rendered="#{not preferences.get('Tags', currentMacro).cloud}"
+ columnClasses="defaultColumn, onePercentColumn"
+ cellpadding="0" cellspacing="0" border="0">
+ <h:column>
+ <s:span rendered="#{param.tag != tagCount.tag and preferences.get('Tags', currentMacro).linkToCurrentDocument}" styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}/Tag/#{wiki:encodeURL(tagCount.tag)}">#{tagCount.tag}</h:outputLink>
+ </s:span>
+ <s:span rendered="#{param.tag != tagCount.tag and not preferences.get('Tags', currentMacro).linkToCurrentDocument}" styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderTagURL(tagCount.tag)}">
+ <h:outputText value="#{tagCount.tag}"/>
+ </h:outputLink>
+ </s:span>
+ <s:span rendered="#{param.tag == tagCount.tag}">
+ <h:outputText value="> #{tagCount.tag} <"/>
+ </s:span>
+ </h:column>
+ <h:column>
+ <h:outputText value="(#{tagCount.count})"/>
+ </h:column>
+ </h:dataTable>
+
+ </s:fragment>
+
+ <s:fragment rendered="#{preferences.get('Tags', currentMacro).cloud}">
+
+ <ui:repeat var="tagCount" value="#{tagsAggregator.getTagsSortedByCount(currentMacro)}">
+ <s:span styleClass="tagCloudItem noWrapWhitespace" style="font-size: #{70+(100/tagsAggregator.getHighestTagCount(currentMacro)*tagCount.count)}%;">
+ <s:span rendered="#{param.tag != tagCount.tag and preferences.get('Tags', currentMacro).linkToCurrentDocument}" styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}/Tag/#{wiki:encodeURL(tagCount.tag)}">#{tagCount.tag}</h:outputLink>
+ </s:span>
+ <s:span rendered="#{param.tag != tagCount.tag and not preferences.get('Tags', currentMacro).linkToCurrentDocument}" styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderTagURL(tagCount.tag)}">
+ <h:outputText value="#{tagCount.tag}"/>
+ </h:outputLink>
+ </s:span>
+ <s:span rendered="#{param.tag == tagCount.tag}">
+ <h:outputText value="> #{tagCount.tag} <"/>
+ </s:span>
+ </s:span>
+ <h:outputText value="   "/>
+ </ui:repeat>
+
+ </s:fragment>
+
+ <s:span styleClass="undecoratedLink defaultColumn"
+ rendered="#{preferences.get('Tags', currentMacro).linkToCurrentDocument and not empty param.tag}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}">
+ <h:outputText value="#{messages['basic.tags.label.All']}"/>
+ </h:outputLink>
+ </s:span>
+
+ </div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+ </s:cache>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/tags.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/userProfile/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,17 @@
+<wiki:plugin
+ rendered="#{currentDocument.ownedByRegularUser}"
+ 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:cache region="#{currentMacro.getCacheRegion('UserProfile')}"
+ key="#{currentMacro.getCacheKey(currentDocument.createdBy.id)}">
+ <ui:include src="/includes/userInfo.xhtml">
+ <ui:param name="user" value="#{currentDocument.createdBy}"/>
+ </ui:include>
+ </s:cache>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirMenu.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/dirMenu.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirMenu.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirMenu.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,59 @@
+.dirMenu .level1 {
+}
+
+.dirMenu .level1Body {
+ background-color: white;
+}
+
+.dirMenu .level1Marker {
+ display: none;
+}
+
+.dirMenu .level1Link {
+ color: #962325;
+ font-size: 95%;
+ text-decoration: none;
+}
+
+.dirMenu .level1Link:hover {color: #666}
+
+.dirMenu .level1Children {
+ background-color: white;
+}
+
+.dirMenu .level2 {
+}
+
+.dirMenu .level2Marker {
+ padding-left: 2px;
+ padding-right: 2px;
+ font-size: 80%;
+ color: #962325;
+}
+
+.dirMenu .level2Link {
+ font-size: 80%;
+ color: #962325;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.dirMenu .level2Link:hover {color: #666}
+
+.dirMenu .level3 {}
+
+.dirMenu .level3Marker {
+ padding-left: 2px;
+ padding-right: 2px;
+ font-size: 80%;
+ color: #962325;
+}
+
+.dirMenu .level3Link {
+ font-size: 80%;
+ color: #962325;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.dirMenu .level3Link:hover {color: #666}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirMenu.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirToc.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/dirToc.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirToc.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/dirToc.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,20 @@
+.dirToc {
+}
+
+.tocDirectoryLabel {
+ font-weight: bold;
+}
+
+.tocDirectoryLabel {
+ cursor: pointer;
+}
+
+.tocDocumentLabel {
+ margin-left: 5px;
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted .tocDirectoryLabel,
+.rich-tree-node-highlighted .tocDocumentLabel {
+ color: black;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/docPager.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/docPager.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/docPager.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/docPager.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+.docPager {
+ width: 100%;
+ background: #f5f5f5;
+}
+
+.docPagerPrevious {
+ text-align: left;
+}
+
+.docPagerNext {
+ text-align: right;
+}
+
+.docPagerButton {
+ vertical-align: text-bottom;
+}
+
+.docPagerLabel {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/docPager.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/lastModifiedDocuments.css
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/lastModifiedDocuments.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/default/css/lastModifiedDocuments.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,17 @@
+.lastModifiedDocuments {}
+
+.lastModifiedLink {
+}
+
+.lastModifiedColumn {
+ padding-bottom: 5px;
+}
+
+.lastModifiedAuthorDate {
+ text-align: right;
+}
+
+.lastModifiedLink:link {color: #962325}
+.lastModifiedLink:visited {color: #962325}
+.lastModifiedLink:hover {color: #000}
+.lastModifiedLink:active {color: #aaa}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirMenu.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/dirMenu.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirMenu.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirMenu.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,59 @@
+.dirMenu .level1 {
+}
+
+.dirMenu .level1Body {
+ background-color: white;
+}
+
+.dirMenu .level1Marker {
+ display: none;
+}
+
+.dirMenu .level1Link {
+ color: #d75525;
+ font-size: 95%;
+ text-decoration: none;
+}
+
+.dirMenu .level1Link:hover {color: #666}
+
+.dirMenu .level1Children {
+ background-color: white;
+}
+
+.dirMenu .level2 {
+}
+
+.dirMenu .level2Marker {
+ color: #d75525;
+ padding-left: 2px;
+ padding-right: 2px;
+ font-size: 80%;
+}
+
+.dirMenu .level2Link {
+ color: #d75525;
+ font-size: 80%;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.dirMenu .level2Link:hover {color: #666}
+
+.dirMenu .level3 {}
+
+.dirMenu .level3Marker {
+ color: #d75525;
+ padding-left: 2px;
+ padding-right: 2px;
+ font-size: 80%;
+}
+
+.dirMenu .level3Link {
+ color: #d75525;
+ font-size: 80%;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.dirMenu .level3Link:hover {color: #666}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirToc.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirToc.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/dirToc.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,20 @@
+.dirToc {
+}
+
+.tocDirectoryLabel {
+ font-weight: bold;
+}
+
+.tocDirectoryLabel {
+ cursor: pointer;
+}
+
+.tocDocumentLabel {
+ margin-left: 5px;
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted .tocDirectoryLabel,
+.rich-tree-node-highlighted .tocDocumentLabel {
+ color: black;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/docPager.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/docPager.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/docPager.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/docPager.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+.docPager {
+ width: 100%;
+ background: #f5f5f5;
+}
+
+.docPagerPrevious {
+ text-align: left;
+}
+
+.docPagerNext {
+ text-align: right;
+}
+
+.docPagerButton {
+ vertical-align: text-bottom;
+}
+
+.docPagerLabel {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/lastModifiedDocuments.css
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/lastModifiedDocuments.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/lastModifiedDocuments.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,17 @@
+.lastModifiedDocuments {}
+
+.lastModifiedLink {
+}
+
+.lastModifiedColumn {
+ padding-bottom: 5px;
+}
+
+.lastModifiedAuthorDate {
+ text-align: right;
+}
+
+.lastModifiedLink:link {color: #d75525}
+.lastModifiedLink:visited {color: #d75525}
+.lastModifiedLink:hover {color: #000}
+.lastModifiedLink:active {color: #aaa}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/userProfile.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/userProfile.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/userProfile.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/inrelationto/css/userProfile.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,43 @@
+.userProfilePortrait {
+ margin-left: 10px;
+ margin-right: 10px;
+ margin-top: 3px;
+ margin-bottom: 5px;
+ float: left;
+}
+
+.userProfilePortraitImage {
+ border: 1px solid #87786e;
+}
+
+.userProfileBio{
+ font-size: 75%;
+ margin-right: 10px;
+ margin-left: 10px;
+ color: #000;
+ text-align: justify;
+ line-height: 130%;
+}
+
+.userProfileEntry {
+ clear: both;
+ margin-bottom: 5px;
+ margin-left: 10px;
+ margin-right: 10px;
+ font-size: 75%;
+ color: #000;
+ line-height: 140%;
+}
+
+.userProfileEntryLabel {
+ font-weight: bold;
+}
+
+.userProfileEntryText {
+}
+
+.userProfileEntryLink {
+ color: #d75525;
+}
+
+.userProfileEntryLink:hover {color: #666}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirMenu.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/dirMenu.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirMenu.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirMenu.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,42 @@
+.dirMenu .level1 {
+}
+
+.dirMenu .level1Body {
+ background-color: white;
+}
+
+.dirMenu .level1Marker {
+ display: none;
+}
+
+.dirMenu .level1Link {
+}
+
+
+.dirMenu .level1Children {
+ background-color: white;
+}
+
+.dirMenu .level2 {
+}
+
+.dirMenu .level2Marker {
+ padding-left: 2px;
+ padding-right: 2px;
+}
+
+.dirMenu .level2Link {
+ white-space: nowrap;
+}
+
+.dirMenu .level3 {}
+
+.dirMenu .level3Marker {
+ padding-left: 2px;
+ padding-right: 2px;
+}
+
+.dirMenu .level3Link {
+ white-space: nowrap;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirMenu.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirToc.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirToc.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/dirToc.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,21 @@
+.dirToc {
+}
+
+.tocDirectoryPanel {
+ margin-top: 5px;
+}
+
+.tocDirectoryLabel {
+ font-weight: bold;
+ cursor: pointer;
+}
+
+.tocDocumentLabel {
+ margin-left: 5px;
+ cursor: pointer;
+}
+
+.rich-tree-node-highlighted .tocDirectoryLabel,
+.rich-tree-node-highlighted .tocDocumentLabel {
+ color: black;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/docPager.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/docPager.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/docPager.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/docPager.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+.docPager {
+ width: 100%;
+ background: #f5f5f5;
+}
+
+.docPagerPrevious {
+ text-align: left;
+}
+
+.docPagerNext {
+ text-align: right;
+}
+
+.docPagerButton {
+ vertical-align: text-bottom;
+}
+
+.docPagerLabel {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/docPager.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/lastModifiedDocuments.css
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/lastModifiedDocuments.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/themes/sfwkorg/css/lastModifiedDocuments.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,17 @@
+.lastModifiedDocuments {}
+
+.lastModifiedLink {
+}
+
+.lastModifiedColumn {
+ padding-bottom: 5px;
+}
+
+.lastModifiedAuthorDate {
+ text-align: right;
+}
+
+.lastModifiedLink:link {color: #576c74}
+.lastModifiedLink:visited {color: #576c74}
+.lastModifiedLink:hover {color: #000}
+.lastModifiedLink:active {color: #000}
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin key="blog"
+ xmlns="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/wiki/plugin
+ classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
+
+ <plugin-info version="1.0">
+ <application-version min="1.0" max="1.0"/>
+ <vendor name="Red Hat Inc." url="http://www.seamframework.org/"/>
+ </plugin-info>
+
+ <macro key="directory" name="blogDirectory">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <render-options>
+ <singleton/>
+ </render-options>
+ </macro>
+
+ <macro key="archive" name="blogArchive">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <cache-regions>
+ <cache-region name="BlogArchiveList">
+ <invalidation-event name="Node.persisted"/>
+ <invalidation-event name="Node.updated"/>
+ <invalidation-event name="Node.removed"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="recentEntries" name="blogRecentEntries">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <cache-regions>
+ <cache-region name="BlogRecentEntriesList">
+ <invalidation-event name="Node.persisted"/>
+ <invalidation-event name="Node.updated"/>
+ <invalidation-event name="Node.removed"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+</plugin>
+
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDAO.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,255 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.blog;
+
+import org.hibernate.Hibernate;
+import org.hibernate.Query;
+import org.hibernate.SQLQuery;
+import org.hibernate.Session;
+import org.hibernate.transform.ResultTransformer;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.action.Pager;
+import org.jboss.seam.ScopeType;
+
+import javax.persistence.EntityManager;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.io.Serializable;
+import java.math.BigInteger;
+
+/**
+ * Queries and database operations related to blog entries (mostly aggregation queries).
+ *
+ * TODO: The queries (especially since they are all SQL) should be externalized to a hbm.xml file. However,
+ * building them dynamically here is less duplication for now.
+ *
+ * @author Christian Bauer
+ */
+@Name("blogDAO")
+(a)Scope(ScopeType.CONVERSATION)
+@AutoCreate
+public class BlogDAO implements Serializable {
+
+ @In
+ EntityManager restrictedEntityManager;
+
+ @In
+ Integer currentAccessLevel;
+
+ // Too bad, but we really need a SQL query here... better use SQL queries for ALL queries in this DAO and generalize things
+ private String[] getWikiDocumentSQLColumnNames() {
+ return new String[]{
+ "doc2.NODE_ID",
+ "doc2.OBJ_VERSION", "doc2.PARENT_NODE_ID", "doc2.RATING",
+ "doc2.AREA_NR", "doc2.NAME", "doc2.WIKINAME", "doc2.CREATED_BY_USER_ID", "doc2.CREATED_ON", "doc2.WRITE_PROTECTED",
+ "doc2.LAST_MODIFIED_BY_USER_ID", "doc2.LAST_MODIFIED_ON", "doc2.READ_ACCESS_LEVEL", "doc2.WRITE_ACCESS_LEVEL",
+ "doc1.FILE_REVISION",
+ "doc.NAME_AS_TITLE", "doc.ENABLE_COMMENTS", "doc.ENABLE_COMMENT_FORM", "doc.ENABLE_COMMENTS_ON_FEEDS",
+ "doc.HEADER", "doc.HEADER_MACROS", "doc.CONTENT", "doc.CONTENT_MACROS", "doc.FOOTER", "doc.FOOTER_MACROS"
+ };
+ }
+
+ private String getblogEntryFromClause(String tag) {
+ StringBuilder clause = new StringBuilder();
+ clause.append("from WIKI_DOCUMENT doc").append(" ");
+ clause.append("inner join WIKI_FILE doc1 on doc.NODE_ID=doc1.NODE_ID").append(" ");
+ clause.append("inner join WIKI_NODE doc2 on doc.NODE_ID=doc2.NODE_ID").append(" ");
+ if (tag != null && tag.length() > 0) clause.append("inner join WIKI_TAG t on t.FILE_ID = doc1.NODE_ID").append(" ");
+ return clause.toString();
+ }
+
+ private String getBlogEntryWhereClause(WikiDocument ignoreDoc, Integer year, Integer month, Integer day, String tag) {
+ StringBuilder clause = new StringBuilder();
+ clause.append("where doc2.PARENT_NODE_ID in").append(" (");
+ clause.append("select distinct dir1.NODE_ID from WIKI_DIRECTORY dir1, WIKI_DIRECTORY dir2").append(" ");
+ clause.append("where dir1.NS_THREAD = dir2.NS_THREAD").append(" ");
+ clause.append("and dir1.NS_LEFT between dir2.NS_LEFT and dir2.NS_RIGHT").append(" ");
+ clause.append("and dir2.NS_THREAD=:nsThread and dir2.NS_LEFT>=:nsLeft and dir2.NS_RIGHT<=:nsRight");
+ clause.append(") ");
+ clause.append("and doc.HEADER_MACROS like '%blogEntry%'").append(" ");
+ clause.append("and doc2.READ_ACCESS_LEVEL <= :currentAccessLevel").append(" ");
+ if (ignoreDoc != null && ignoreDoc.getId() != null) clause.append("and doc.NODE_ID<>:ignoreDoc").append(" ");
+ if (tag != null && tag.length()>0) clause.append("and t.TAG = :tag").append(" ");
+ if (year != null) clause.append("and year(doc2.CREATED_ON) = :limitYear").append(" ");
+ if (month != null) clause.append("and month(doc2.CREATED_ON) = :limitMonth").append(" ");
+ if (day != null) clause.append("and day(doc2.CREATED_ON) = :limitDay").append(" ");
+ return clause.toString();
+ }
+
+ private void bindBlogEntryWhereClause(Query query, WikiDirectory startDir, WikiDocument ignoreDoc,
+ Integer year, Integer month, Integer day, String tag) {
+ query.setParameter("nsThread", startDir.getNodeInfo().getNsThread());
+ query.setParameter("nsLeft", startDir.getNodeInfo().getNsLeft());
+ query.setParameter("nsRight", startDir.getNodeInfo().getNsRight());
+ query.setParameter("currentAccessLevel", currentAccessLevel);
+
+ if (ignoreDoc != null && ignoreDoc.getId() != null) query.setParameter("ignoreDoc", ignoreDoc);
+ if (tag != null && tag.length()>0) query.setParameter("tag", tag);
+ if (year != null) query.setParameter("limitYear", year);
+ if (month != null) query.setParameter("limitMonth", month);
+ if (day != null) query.setParameter("limitDay", day);
+ }
+
+ public List<BlogEntry> findBlogEntriesInDirectory(WikiDirectory startDir,
+ WikiDocument ignoreDoc,
+ Pager pager,
+ Integer year,
+ Integer month,
+ Integer day,
+ String tag,
+ boolean countComments) {
+
+ final Map<Long, BlogEntry> blogEntryMap = new HashMap<Long, BlogEntry>();
+
+ StringBuilder queryString = new StringBuilder();
+ queryString.append("select").append(" ");
+ for (int i = 0; i < getWikiDocumentSQLColumnNames().length; i++) {
+ queryString.append(getWikiDocumentSQLColumnNames()[i]);
+ if (i != getWikiDocumentSQLColumnNames().length-1) queryString.append(", ");
+ }
+ queryString.append(", '0' as COMMENT_COUNT").append(" ");
+ queryString.append(getblogEntryFromClause(tag));
+ queryString.append(getBlogEntryWhereClause(ignoreDoc, year, month, day, tag));
+
+ queryString.append(" ");
+ queryString.append("order by doc2.CREATED_ON desc");
+
+ SQLQuery query = getSession().createSQLQuery(queryString.toString());
+
+ bindBlogEntryWhereClause(query, startDir, ignoreDoc, year, month, day, tag);
+
+ query.setComment("Finding all blogEntry documents recursively in dir: " + startDir.getName());
+ query.addEntity(WikiDocument.class);
+ query.addScalar("COMMENT_COUNT", Hibernate.LONG);
+ query.setFirstResult( pager.getQueryFirstResult() );
+ query.setMaxResults( pager.getQueryMaxResults() );
+
+ query.setResultTransformer(
+ new ResultTransformer() {
+ public Object transformTuple(Object[] result, String[] aliases) {
+ BlogEntry be = new BlogEntry();
+ be.setEntryDocument( (WikiDocument)result[0]);
+ blogEntryMap.put(be.getEntryDocument().getId(), be); // Put in map so we can attach comment count later
+ return be;
+ }
+ public List transformList(List list) { return list; }
+ }
+ );
+
+ List<BlogEntry> result = (List<BlogEntry>)query.list();
+
+ if (countComments) {
+ // The risk here is that pager.getQueryMaxResults() is too large for the IN() operator of some DBs...
+ StringBuilder commentQueryString = new StringBuilder();
+ commentQueryString.append("select doc.NODE_ID as DOC_ID, count(c3.NODE_ID) as COMMENT_COUNT").append(" ");
+ commentQueryString.append("from WIKI_DOCUMENT doc").append(" ");
+ commentQueryString.append("left outer join WIKI_NODE c1 on doc.NODE_ID = c1.PARENT_NODE_ID").append(" ");
+ commentQueryString.append("left outer join WIKI_COMMENT c2 on c1.NODE_ID = c2.NODE_ID").append(" ");
+ commentQueryString.append("left outer join WIKI_COMMENT c3 on c2.NS_THREAD = c3.NS_THREAD").append(" ");
+ commentQueryString.append("where doc.NODE_ID in (:blogEntriesIds)").append(" ");
+ commentQueryString.append("group by doc.NODE_ID");
+
+ SQLQuery commentQuery = getSession().createSQLQuery(commentQueryString.toString());
+ commentQuery.setComment("Finding comment count for blog entries");
+ commentQuery.addScalar("DOC_ID");
+ commentQuery.addScalar("COMMENT_COUNT");
+ commentQuery.setParameterList("blogEntriesIds", blogEntryMap.keySet());
+
+ commentQuery.setResultTransformer(
+ new ResultTransformer() {
+ public Object transformTuple(Object[] result, String[] aliases) {
+ BlogEntry be = blogEntryMap.get( ((BigInteger)result[0]).longValue() );
+ be.setCommentCount( ((BigInteger)result[1]).longValue() );
+ return null;
+ }
+ public List transformList(List list) { return list; }
+ }
+ );
+ commentQuery.list();
+ }
+
+ return result;
+ }
+
+ public Long countBlogEntries(WikiDirectory startDir, WikiDocument ignoreDoc, Integer year, Integer month, Integer day, String tag) {
+ return countBlogEntries(startDir, ignoreDoc, false, false, false, year, month, day, tag).get(0).getNumOfEntries();
+ }
+
+ public List<BlogEntryCount> countAllBlogEntriesGroupByYearMonth(WikiDirectory startDir, WikiDocument ignoreDoc, String tag) {
+ return countBlogEntries(startDir, ignoreDoc, true, true, false, null, null, null, tag);
+ }
+
+ private List<BlogEntryCount> countBlogEntries(WikiDirectory startDir, WikiDocument ignoreDoc,
+ final boolean projectYear, final boolean projectMonth, final boolean projectDay,
+ Integer limitYear, Integer limitMonth, Integer limitDay,
+ String tag) {
+
+ // Sanity input check
+ if (projectDay && (!projectMonth || !projectYear))
+ throw new IllegalArgumentException("Can't project on day without months or year");
+ if (projectMonth && !projectYear)
+ throw new IllegalArgumentException("Can't project on month without year");
+
+ StringBuilder queryString = new StringBuilder();
+
+ queryString.append("select count(doc.NODE_ID) as NUM_OF_ENTRIES").append(" ");
+ if (projectYear) queryString.append(", ").append("year(doc2.CREATED_ON) as YEAR");
+ if (projectMonth) queryString.append(", ").append("month(doc2.CREATED_ON) as MONTH");
+ if (projectDay) queryString.append(", ").append("day(doc2.CREATED_ON) as DAY");
+ queryString.append(" ");
+
+ queryString.append(getblogEntryFromClause(tag));
+ queryString.append(getBlogEntryWhereClause(ignoreDoc, limitYear, limitMonth, limitDay, tag));
+
+ if (projectYear || projectMonth || projectDay) queryString.append("group by").append(" ");
+ if (projectYear) queryString.append("year(doc2.CREATED_ON)");
+ if (projectMonth) queryString.append(", month(doc2.CREATED_ON)");
+ if (projectDay) queryString.append(", day(doc2.CREATED_ON)");
+
+ if (projectYear || projectMonth || projectDay) queryString.append("order by").append(" ");
+ if (projectYear) queryString.append("YEAR desc");
+ if (projectMonth) queryString.append(", MONTH desc");
+ if (projectDay) queryString.append(", DAY desc");
+
+ SQLQuery query = getSession().createSQLQuery(queryString.toString());
+
+ bindBlogEntryWhereClause(query, startDir, ignoreDoc, limitYear, limitMonth, limitDay, tag);
+
+ query.setComment("Finding blogEntry counts");
+ query.addScalar("NUM_OF_ENTRIES", Hibernate.LONG);
+ if (projectYear) query.addScalar("YEAR", Hibernate.INTEGER);
+ if (projectMonth) query.addScalar("MONTH", Hibernate.INTEGER);
+ if (projectDay) query.addScalar("DAY", Hibernate.INTEGER);
+
+ query.setResultTransformer(
+ new ResultTransformer() {
+ public Object transformTuple(Object[] result, String[] aliases) {
+ BlogEntryCount beCount = new BlogEntryCount();
+ beCount.setNumOfEntries( (Long)result[0] );
+ if (projectYear) beCount.setYear( (Integer)result[1] );
+ if (projectMonth) beCount.setMonth( (Integer)result[2] );
+ if (projectDay) beCount.setDay( (Integer)result[3] );
+ return beCount;
+ }
+ public List transformList(List list) { return list; }
+ }
+ );
+
+ return (List<BlogEntryCount>) query.list();
+ }
+
+ private Session getSession() {
+ return ((Session)((org.jboss.seam.persistence.EntityManagerProxy) restrictedEntityManager).getDelegate());
+ }
+
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.blog;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.web.RequestParameter;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
+import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.action.Pager;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.preferences.Preferences;
+import org.jboss.seam.wiki.util.Hash;
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("blogDirectory")
+(a)Scope(ScopeType.CONVERSATION)
+public class BlogDirectory implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In
+ WikiNodeDAO wikiNodeDAO;
+
+ @In
+ BlogDAO blogDAO;
+
+ @In
+ WikiDirectory currentDirectory;
+
+ @In
+ WikiDocument currentDocument;
+
+ private Pager pager;
+ private Integer page;
+ private Integer year;
+ private Integer month;
+ private Integer day;
+ private String tag;
+ private Long numberOfEntriesForCurrentTag;
+
+ @RequestParameter
+ public void setPage(Integer page) {
+ this.page = page;
+ }
+
+ @RequestParameter
+ public void setYear(Integer year) {
+ this.year = year;
+ }
+ @RequestParameter
+ public void setMonth(Integer month) {
+ this.month = month;
+ }
+ @RequestParameter
+ public void setDay(Integer day) {
+ this.day = day;
+ }
+ @RequestParameter
+ public void setTag(String tag) {
+ this.tag = tag;
+ }
+
+ /* ############################### BLOG ENTRIES ############################### */
+
+ private List<BlogEntry> blogEntries;
+
+ public List<BlogEntry> getBlogEntries(WikiPluginMacro macro) {
+ BlogPreferences prefs = Preferences.instance().get(BlogPreferences.class, macro);
+
+ if (pager == null) {
+ log.debug("creating new pager with page size from macro preferences: " + prefs.getPageSize());
+ pager = new Pager(prefs.getPageSize());
+ pager.setPage(page);
+ }
+
+ if (blogEntries == null || !pager.getPageSize().equals(prefs.getPageSize())) {
+ log.debug("blog entries list is null or pager is outdated, loading blog entries");
+ pager.setPageSize(prefs.getPageSize());
+ loadBlogEntries();
+ }
+ return blogEntries;
+ }
+
+ @Observer(value = {"PersistenceContext.filterReset"}, create = false)
+ public void loadBlogEntries() {
+ if (pager == null) throw new IllegalStateException("Need to call getBlogEntries(currentMacro) first!");
+
+ log.debug("loading blog entries with existing: " + pager);
+
+ pager.setNumOfRecords(
+ blogDAO.countBlogEntries(currentDirectory, currentDocument, year, month, day, tag)
+ );
+
+ // Don't do the expensive query if we got no records
+ if (pager.getNumOfRecords() == 0) {
+ blogEntries = Collections.EMPTY_LIST;
+ return;
+ }
+
+ blogEntries =
+ blogDAO.findBlogEntriesInDirectory(
+ currentDirectory, currentDocument,
+ pager, year, month, day, tag,
+ true
+ );
+ }
+
+ public Pager getPager() {
+ return pager;
+ }
+
+ public Long getNumberOfEntriesForCurrentTag() {
+ if (numberOfEntriesForCurrentTag == null) {
+ numberOfEntriesForCurrentTag = blogDAO.countBlogEntries(currentDirectory, currentDocument, null, null, null, tag);
+ }
+ return numberOfEntriesForCurrentTag;
+ }
+
+ /* ################################ BLOG ARCHIVE ############################################ */
+
+ private List<BlogEntryCount> archivedEntries;
+
+ public List<BlogEntryCount> getArchivedEntries() {
+ if (archivedEntries == null) loadArchivedEntries();
+ return archivedEntries;
+ }
+
+ @Observer(value = {"PersistenceContext.filterReset"}, create = false)
+ public void loadArchivedEntries() {
+ log.debug("loading blog entries and counting/aggregating them by year and month");
+ archivedEntries =
+ blogDAO.countAllBlogEntriesGroupByYearMonth(currentDirectory, currentDocument, tag);
+ log.debug("archived entries: " + archivedEntries.size());
+ }
+
+ public String getArchiveCacheKeyAppendix() {
+ StringBuilder builder = new StringBuilder();
+ if (tag != null && Math.abs(tag.hashCode()) != 0) builder.append(Math.abs(tag.hashCode()));
+ builder.append(WikiUtil.dateAsString(year, month, day));
+ Hash hash = (Hash)Component.getInstance(Hash.class);
+ return hash.hash(builder.toString());
+ }
+
+ /* ################################ BLOG RECENT ENTRIES ############################################ */
+
+ // Need to expose this as a datamodel so Seam can convert our map to a collection of Map.Entry objects
+ @DataModel
+ private Map<Date, List<BlogEntry>> recentBlogEntries;
+
+ @Factory(value = "recentBlogEntries")
+ @Observer(value = {"PersistenceContext.filterReset"}, create = false)
+ public void loadRecentBlogEntries() {
+ // TODO: This is supposed to use the currentMacro parameter to get the INSTANCE prefs value... how?
+ BlogPreferences prefs = Preferences.instance().get(BlogPreferences.class);
+ List<BlogEntry> recentBlogEntriesNonAggregated =
+ blogDAO.findBlogEntriesInDirectory(
+ currentDirectory,
+ currentDocument,
+ new Pager(prefs.getRecentEntriesItems()),
+ null, null, null,
+ null, false
+ );
+
+ // Now aggregate by day
+ recentBlogEntries = new LinkedHashMap<Date, List<BlogEntry>>();
+ for (BlogEntry blogEntry : recentBlogEntriesNonAggregated) {
+
+ // Find the day (ignore the hours, minutes, etc.)
+ Calendar createdOn = new GregorianCalendar();
+ createdOn.setTime(blogEntry.getEntryDocument().getCreatedOn());
+ GregorianCalendar createdOnDay = new GregorianCalendar(
+ createdOn.get(Calendar.YEAR), createdOn.get(Calendar.MONTH), createdOn.get(Calendar.DAY_OF_MONTH)
+ );
+ Date createdOnDate = createdOnDay.getTime(); // Jesus, this API is just bad...
+
+ // Aggregate by day
+ List<BlogEntry> entriesForDay =
+ recentBlogEntries.containsKey(createdOnDate)
+ ? recentBlogEntries.get(createdOnDate)
+ : new ArrayList<BlogEntry>();
+
+ entriesForDay.add(blogEntry);
+ recentBlogEntries.put(createdOnDate, entriesForDay);
+ }
+ }
+
+ public String getDateUrl() {
+ return WikiUtil.dateAsString(year, month, day);
+ }
+
+ public String getTagUrl() {
+ return tag != null && tag.length()>0 ? "/Tag/" + WikiUtil.encodeURL(tag) : "";
+ }
+
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogDirectory.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntry.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntry.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntry.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntry.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.blog;
+
+import org.jboss.seam.wiki.core.model.WikiDocument;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Christian Bauer
+ */
+public class BlogEntry implements Serializable {
+
+ WikiDocument entryDocument;
+ Long commentCount;
+ List<String> tags;
+
+ public BlogEntry() {}
+
+ public BlogEntry(WikiDocument entryDocument) {
+ this.entryDocument = entryDocument;
+ }
+
+ public BlogEntry(WikiDocument entryDocument, Long commentCount) {
+ this.entryDocument = entryDocument;
+ this.commentCount = commentCount;
+ }
+
+ public WikiDocument getEntryDocument() {
+ return entryDocument;
+ }
+
+ public void setEntryDocument(WikiDocument entryDocument) {
+ this.entryDocument = entryDocument;
+ }
+
+ public Long getCommentCount() {
+ return commentCount;
+ }
+
+ public void setCommentCount(Long commentCount) {
+ this.commentCount = commentCount;
+ }
+
+ public List<String> getTagsAsList() {
+ if (tags == null) tags = new ArrayList<String>(entryDocument.getTags());
+ return tags;
+ }
+
+ public String toString() {
+ return "BlogEntry: " + entryDocument + " Comments: " + commentCount;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntry.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryCount.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryCount.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryCount.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryCount.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.blog;
+
+import org.jboss.seam.wiki.util.WikiUtil;
+
+/**
+ * @author Christian Bauer
+ */
+public class BlogEntryCount {
+
+ Long numOfEntries;
+ Integer year;
+ Integer month;
+ Integer day;
+
+ public BlogEntryCount() {}
+
+ public Long getNumOfEntries() {
+ return numOfEntries;
+ }
+
+ public void setNumOfEntries(Long numOfEntries) {
+ this.numOfEntries = numOfEntries;
+ }
+
+ public Integer getYear() {
+ return year;
+ }
+
+ public void setYear(Integer year) {
+ this.year = year;
+ }
+
+ public Integer getMonth() {
+ return month;
+ }
+
+ public void setMonth(Integer month) {
+ this.month = month;
+ }
+
+ public Integer getDay() {
+ return day;
+ }
+
+ public void setDay(Integer day) {
+ this.day = day;
+ }
+
+ public String getAsString() {
+ return WikiUtil.dateAsString(year, month, day);
+ }
+
+ public String toString() {
+ return "NumOfEntries: " + getNumOfEntries() + " Year: " + getYear() + " Month: " + getMonth() + " Day: " + getDay();
+ }
+
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryCount.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryDefaults.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogEntryDefaults.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryDefaults.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogEntryDefaults.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.blog;
+
+import org.jboss.seam.wiki.core.template.WikiDocumentTemplate;
+import org.jboss.seam.wiki.core.template.WikiDocumentEditorDefaults;
+import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
+import org.jboss.seam.wiki.core.action.DocumentHome;
+import org.jboss.seam.international.Messages;
+
+/**
+ * @author Christian Bauer
+ */
+@WikiDocumentTemplate("#{messages['blog.directory.label.template.BlogEntry']}")
+public class BlogEntryDefaults extends WikiDocumentDefaults implements WikiDocumentEditorDefaults {
+
+ @Override
+ public String getName() {
+ return Messages.instance().get("blog.directory.label.template.NewBlogEntryTitle");
+ }
+
+ @Override
+ public String[] getHeaderMacrosAsString() {
+ return new String[]{ "blogEntry" };
+ }
+
+ public void setEditorDefaults(DocumentHome editor) {
+ editor.setPushOnFeeds(true);
+ editor.setPushOnSiteFeed(true);
+ }
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.blog;
+
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Range;
+import org.hibernate.validator.NotNull;
+
+import java.io.Serializable;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(
+ name = "Blog",
+ description = "#{messages['blog.preferences.description']}"
+)
+public class BlogPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description = "#{messages['blog.directory.preferences.property.pageSize']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange",
+ mappedTo = "blog.directory"
+ )
+ @Range(min = 3l, max = 25l)
+ @NotNull
+ private Long pageSize;
+
+ @PreferenceProperty(
+ description = "#{messages['blog.archive.preferences.property.archiveSubscribeIcon']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ mappedTo = "blog.archive"
+ )
+ @NotNull
+ private Boolean archiveSubscribeIcon;
+
+ @PreferenceProperty(
+ description = "#{messages['blog.recentEntries.preferences.property.recentEntriesItems']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange",
+ mappedTo = "blog.recentEntries"
+ )
+ @Range(min = 3l, max = 100l)
+ @NotNull
+ private Long recentEntriesItems;
+
+ @PreferenceProperty(
+ description = "#{messages['blog.recentEntries.preferences.property.recentEntriesTruncateTitle']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange",
+ mappedTo = "blog.recentEntries"
+ )
+ @Range(min = 3l, max = 100l)
+ @NotNull
+ private Long recentEntriesTruncateTitle;
+
+ @PreferenceProperty(
+ description = "#{messages['blog.recentEntries.preferences.property.recentEntriesSubscribeIcon']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ mappedTo = "blog.recentEntries"
+ )
+ @NotNull
+ private Boolean recentEntriesSubscribeIcon;
+
+ public Long getPageSize() {
+ return pageSize;
+ }
+
+ public Boolean getArchiveSubscribeIcon() {
+ return archiveSubscribeIcon;
+ }
+
+ public Long getRecentEntriesItems() {
+ return recentEntriesItems;
+ }
+
+ public Long getRecentEntriesTruncateTitle() {
+ return recentEntriesTruncateTitle;
+ }
+
+ public Boolean getRecentEntriesSubscribeIcon() {
+ return recentEntriesSubscribeIcon;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/BlogPreferences.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,37 @@
+blog.label=Weblog
+blog.description=Macros for building a weblog
+
+blog.preferences.description=Plugin: Weblog
+
+blog.directory.label=Blog Directory
+blog.directory.description=Displays all documents in the current directory as blog entries
+blog.directory.preferences.property.pageSize=Number of blog entries per page
+blog.directory.label.Attachment=attachment
+blog.directory.label.Attachments=attachments
+blog.directory.label.Showing=Showing
+blog.directory.label.To=to
+blog.directory.label.Of=of
+blog.directory.label.BlogEntries=blog entries
+blog.directory.label.In=in
+blog.directory.label.Tagged=tagged
+blog.directory.label.NoBlogEntriesFound=No blog entries found.
+blog.directory.label.Tag=Tag
+blog.directory.label.Tags=Tags
+blog.directory.label.template.BlogEntry=Weblog Entry
+blog.directory.label.template.NewBlogEntryTitle=My weblog entry title...
+
+blog.archive.label=Blog Archive
+blog.archive.description=Displays all blog entries in combo box (tag filtered)
+blog.archive.preferences.property.archiveSubscribeIcon=Show feed subscribe icon on archive
+blog.archive.label.Archive=Archive
+blog.archive.label.Subscribe=Subscribe
+blog.archive.label.AllEntries=All Entries
+
+blog.recentEntries.label=Recent Entries
+blog.recentEntries.description=Displays all recent entries
+blog.recentEntries.label.RecentEntries=Recent Entries
+blog.recentEntries.label.Subscribe=Subscribe
+blog.recentEntries.preferences.property.recentEntriesItems=Number of recent entries shown
+blog.recentEntries.preferences.property.recentEntriesTruncateTitle=Truncate recent entries title after characters
+blog.recentEntries.preferences.property.recentEntriesSubscribeIcon=Show feed subscribe icon on recent entries
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogArchive.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/blogArchive/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogArchive.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogArchive.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,69 @@
+<wiki:plugin
+ rendered="#{skin == 'd'}"
+ 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:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:cache region="#{currentMacro.getCacheRegion('BlogArchiveList')}"
+ key="#{currentMacro.getCacheKey(blogDirectory.archiveCacheKeyAppendix)}">
+
+ <s:div styleClass="blogArchive box">
+
+ <s:div styleClass="blogArchive">
+
+ <s:div styleClass="boxHeader" rendered="#{not preferences.get('Blog', currentMacro).archiveSubscribeIcon}">
+ <h:outputText rendered="#{empty param.tag}" value="#{messages['blog.archive.label.Archive']}"/>
+ <h:outputText rendered="#{not empty param.tag}" value="#{messages['blog.archive.label.Archive']} '#{param.tag}'"/>
+ </s:div>
+
+ <h:panelGrid rendered="#{preferences.get('Blog', currentMacro).archiveSubscribeIcon}"
+ columns="2" cellpadding="0" cellspacing="0" border="0"
+ styleClass="boxHeader fullWidth">
+
+ <h:panelGrid styleClass="smallFont" rendered="#{not empty currentDirectory.feed}" columns="2"
+ cellpadding="2" cellspacing="0" border="0">
+ <h:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
+ <h:graphicImage value="#{imagePath}/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"/>
+ </h:outputLink>
+ <h:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
+ <h:outputText value="#{messages['blog.archive.label.Subscribe']}"/>
+ </h:outputLink>
+ </h:panelGrid>
+
+ <h:outputText rendered="#{empty param.tag}" value="#{messages['blog.archive.label.Archive']}"/>
+ <h:outputText rendered="#{not empty param.tag}" value="#{messages['blog.archive.label.Archive']} '#{param.tag}'"/>
+
+ </h:panelGrid>
+
+ <div class="blogArchiveSelector boxContent">
+ <select id="blogArchiveCombo" class="blogArchiveCombo"
+ onchange="top.location.href = jQuery('#blogArchiveCombo')[0].options[jQuery('#blogArchiveCombo')[0].selectedIndex].value;">
+ <option value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.tagUrl}">#{messages['blog.archive.label.AllEntries']} (#{blogDirectory.numberOfEntriesForCurrentTag})</option>
+ <ui:repeat var="beCount" value="#{blogDirectory.archivedEntries}">
+ <s:fragment rendered="#{blogDirectory.dateUrl != beCount.asString}">
+ <option value="#{wikiURLRenderer.renderURL(currentDocument)}#{beCount.asString}#{blogDirectory.tagUrl}">
+ #{messages[wiki:concat('lacewiki.label.', converters.monthNames[beCount.month])]} #{beCount.year} (#{beCount.numOfEntries})
+ </option>
+ </s:fragment>
+ <s:fragment rendered="#{blogDirectory.dateUrl == beCount.asString}">
+ <option value="#{wikiURLRenderer.renderURL(currentDocument)}#{beCount.asString}#{blogDirectory.tagUrl}" selected="true">
+ #{messages[wiki:concat('lacewiki.label.', converters.monthNames[beCount.month])]} #{beCount.year} (#{beCount.numOfEntries})
+ </option>
+ </s:fragment>
+ </ui:repeat>
+ </select>
+ </div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+ </s:div>
+
+ </s:cache>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogArchive.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/blogDirectory/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,190 @@
+<wiki:plugin id="blogDirectoryPlugin"
+ 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:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="blogDirectory">
+
+ <s:div id="blogEntries">
+ <s:div rendered="#{!empty blogDirectory.getBlogEntries(currentMacro)}">
+
+ <c:forEach var="blogEntry" items="#{blogDirectory.getBlogEntries(currentMacro)}">
+
+ <div class="box blogEntryContainer">
+
+ <div class="boxHeader blogEntryHeader">
+
+ <div class="title">
+ <h:outputText value="#{blogEntry.entryDocument.name}"/>
+ </div>
+
+ <div class="dateAuthor smallFont">
+ <h:outputText value="#{blogEntry.entryDocument.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ <h:outputText value=", by "/>
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(blogEntry.entryDocument.createdBy.memberHome)}" target="_top"
+ rendered="#{!empty blogEntry.entryDocument.createdBy.memberHome}">
+ <h:outputText value="#{blogEntry.entryDocument.createdBy.fullname}"/>
+ </h:outputLink>
+ <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(blogEntry.entryDocument.createdBy)}" target="_top"
+ rendered="#{empty blogEntry.entryDocument.createdBy.memberHome}">
+ <h:outputText value="#{blogEntry.entryDocument.createdBy.fullname}"/>
+ </h:outputLink>
+ </s:span>
+ </div>
+
+ </div>
+
+ <div class="boxContent blogEntryContent">
+ <wiki:formattedText value="#{blogEntry.entryDocument.content}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="attachmentLink"
+ thumbnailLinkStyleClass="regularLink"
+ updateResolvedLinks="false"
+ internalTargetFrame="_top"
+ externalTargetFrame="_top"
+ linkBaseFile="#{blogEntry.entryDocument}"
+ currentAreaNumber="#{currentDirectory.areaNumber}"
+ enableMacroRendering="true"/>
+
+ <s:div rendered="#{preferences.get('Wiki').showTags and not blogEntry.entryDocument.macroPresent('hideTags') and not empty blogEntry.entryDocument.tags}"
+ styleClass="documentTags undecoratedLink">
+ <s:div>
+ <h:outputText rendered="#{blogEntry.entryDocument.tags.size()==1}" value="#{messages['blog.directory.label.Tag']}: "/>
+ <h:outputText rendered="#{blogEntry.entryDocument.tags.size()>1}" value="#{messages['blog.directory.label.Tags']}: "/>
+ <ui:repeat var="tag" value="#{blogEntry.entryDocument.tagsAsList}">
+ <h:outputLink value="#{wikiURLRenderer.renderTagURL(tag)}">
+ <h:outputText value="#{tag}"/>
+ </h:outputLink>
+ <h:outputText rendered="#{not wiki:isLastItemInList(blogEntry.entryDocument.tagsAsList, tag)}" value=" | "/>
+ </ui:repeat>
+ </s:div>
+ </s:div>
+
+ </div>
+
+ <div class="boxFooter blogEntryFooter">
+ <h:panelGrid styleClass="blogEntryFooterTable" columns="5" cellpadding="0" cellspacing="0" border="0">
+ <s:div styleClass="blogEntryCommentCount undecoratedLink"
+ rendered="#{blogEntry.commentCount > 0 and blogEntry.entryDocument.enableComments}">
+ <h:outputLink value="#{wikiURLRenderer.renderPermURL(blogEntry.entryDocument)}#comments" target="_top">
+ <span class="blogEntryCommentCountText">
+ <h:outputText value="#{blogEntry.commentCount} "/>
+ <h:outputText value="#{blogEntry.commentCount>1
+ ? messages['lacewiki.label.commentsDisplay.Comments']
+ : messages['lacewiki.label.commentsDisplay.Comment']}"/>
+ </span>
+ </h:outputLink>
+ </s:div>
+ <s:div styleClass="blogEntryCommentLink undecoratedLink"
+ rendered="#{blogEntry.entryDocument.enableComments and blogEntry.entryDocument.enableCommentForm}">
+ <h:outputLink target="_top" value="#{wikiURLRenderer.renderURL(blogEntry.entryDocument)}?showCommentForm=true#commentForm">
+ <h:outputText styleClass="blogEntryCommentLinkText" value="#{messages['lacewiki.label.commentForm.PostComment']}"/>
+ </h:outputLink>
+ </s:div>
+ <s:div styleClass="blogEntryAttachmentsLink undecoratedLink"
+ rendered="#{wiki:sizeOf(wikiTextAttachments) > 0}">
+ <h:outputLink value="#{wikiURLRenderer.renderPermURL(blogEntry.entryDocument)}#attachments" target="_top">
+ <span class="blogEntryAttachmentsLinkText">
+ <h:outputText value="#{wiki:sizeOf(wikiTextAttachments)} "/>
+ <h:outputText value="#{wiki:sizeOf(wikiTextAttachments)>1
+ ? messages['blog.directory.label.Attachments']
+ : messages['blog.directory.label.Attachment']}"/>
+ </span>
+ </h:outputLink>
+ </s:div>
+ <s:div styleClass="blogEntryPermLink undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderPermURL(blogEntry.entryDocument)}" target="_top">
+ <h:outputText styleClass="blogEntryPermLinkText" value="#{messages['lacewiki.label.PermLink']}"/>
+ </h:outputLink>
+ </s:div>
+ <s:div styleClass="blogEntryWikiLink undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderWikiURL(blogEntry.entryDocument)}" target="_top">
+ <h:outputText styleClass="blogEntryWikiLinkText" value="#{messages['lacewiki.label.WikiLink']}"/>
+ </h:outputLink>
+ </s:div>
+ </h:panelGrid>
+ </div>
+
+ </div>
+
+ <div class="blogEntrySeparator"/>
+
+ </c:forEach>
+
+ </s:div>
+
+ <h:panelGrid columns="5" rendered="#{blogDirectory.pager.numOfRecords > blogDirectory.pager.pageSize}"
+ styleClass="blogPagerTable"
+ columnClasses="blogPagerColumn, blogPagerColumn, blogPagerTextColumn, blogPagerColumn, blogPagerColumn, "
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputLink rendered="#{blogDirectory.pager.previousPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}#{blogDirectory.tagUrl}">
+ <div style="width:30px;">
+ <h:graphicImage value="#{imagePath}/page.first.gif" width="13" height="11"/>
+ </div>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!blogDirectory.pager.previousPageAvailable}"/>
+
+ <h:outputLink rendered="#{blogDirectory.pager.previousPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.previousPage}#{blogDirectory.tagUrl}">
+ <div style="width:30px;">
+ <h:graphicImage value="#{imagePath}/page.previous.gif" width="13" height="11"/>
+ </div>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!blogDirectory.pager.previousPageAvailable}"/>
+
+ <s:span>
+ <h:outputText value="#{messages['blog.directory.label.Showing']}
+ #{blogDirectory.pager.firstRecord} #{messages['blog.directory.label.To']}
+ #{blogDirectory.pager.lastRecord} #{messages['blog.directory.label.Of']}
+ #{blogDirectory.pager.numOfRecords} #{messages['blog.directory.label.BlogEntries']}"/>
+
+ <h:outputText rendered="#{!empty param.day || !empty param.month || !empty param.year}"
+ value=" #{messages['blog.directory.label.In']}"/>
+ <h:outputText rendered="#{!empty param.day}" value=" #{param.day}."/>
+ <h:outputText rendered="#{!empty param.month}" value=" #{messages[wiki:concat('lacewiki.label.', converters.monthNames[param.month])]}"/>
+ <h:outputText rendered="#{!empty param.year}" value=" #{param.year}"/>
+ <h:outputText rendered="#{!empty param.tag}" value=" #{messages['blog.directory.label.Tagged']} '#{param.tag}'"/>
+ </s:span>
+
+ <h:outputLink rendered="#{blogDirectory.pager.nextPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.nextPage}#{blogDirectory.tagUrl}">
+ <div style="width:30px;">
+ <h:graphicImage value="#{imagePath}/page.next.gif" width="13" height="11"/>
+ </div>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!blogDirectory.pager.nextPageAvailable}"/>
+
+ <h:outputLink rendered="#{blogDirectory.pager.nextPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}#{blogDirectory.dateUrl}/Page/#{blogDirectory.pager.lastPage}#{blogDirectory.tagUrl}">
+ <div style="width:30px;">
+ <h:graphicImage value="#{imagePath}/page.last.gif" width="13" height="11"/>
+ </div>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!blogDirectory.pager.nextPageAvailable}"/>
+
+ </h:panelGrid>
+
+ </s:div>
+
+ <s:div id="noBlogEntriesContainer" rendered="#{empty blogDirectory.getBlogEntries(currentMacro)}">
+ <h:outputText value="#{messages['blog.directory.label.NoBlogEntriesFound']}"/>
+ </s:div>
+
+ </s:div>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogRecentEntries.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/blogRecentEntries/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogRecentEntries.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogRecentEntries.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,78 @@
+<wiki:plugin
+ 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:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:cache region="#{currentMacro.getCacheRegion('BlogRecentEntriesList')}"
+ key="#{currentMacro.cacheKey}">
+
+ <s:div styleClass="blogRecentEntries box">
+
+ <s:div styleClass="blogRecentEntries">
+
+ <s:div styleClass="boxHeader" rendered="#{not preferences.get('Blog', currentMacro).recentEntriesSubscribeIcon}">
+ <h:outputText value="#{messages['blog.recentEntries.label.RecentEntries']}"/>
+ </s:div>
+
+ <h:panelGrid rendered="#{preferences.get('Blog', currentMacro).recentEntriesSubscribeIcon}"
+ columns="2" cellpadding="0" cellspacing="0" border="0"
+ styleClass="boxHeader fullWidth">
+
+ <h:panelGrid styleClass="undecoratedLink smallFont" rendered="#{not empty currentDirectory.feed}" columns="2"
+ cellpadding="2" cellspacing="0" border="0">
+ <h:outputLink
+ target="_top"
+ value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
+ <h:graphicImage value="#{imagePath}/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"/>
+ </h:outputLink>
+ <h:outputLink
+ target="_top"
+ value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}">
+ <h:outputText value="#{messages['blog.recentEntries.label.Subscribe']}"/>
+ </h:outputLink>
+ </h:panelGrid>
+
+ <h:outputText value="#{messages['blog.recentEntries.label.RecentEntries']}"/>
+
+ </h:panelGrid>
+
+ <h:dataTable value="#{recentBlogEntries}" var="dayMap"
+ rendered="#{recentBlogEntries.rowCount > 0}"
+ styleClass="datatable boxContent"
+ columnClasses="defaultColumn"
+ cellpadding="0" cellspacing="0" border="0">
+ <h:column>
+ <div class="blogRecentEntriesDay smallFont">
+ <h:outputText value="#{dayMap.key}">
+ <f:convertDateTime pattern="dd. MMM yyyy" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ </div>
+
+ <h:dataTable value="#{dayMap.value}" var="be"
+ columnClasses="blogRecentEntriesItem smallFont"
+ cellpadding="0" cellspacing="0" border="0">
+ <h:column>
+ <h:outputLink styleClass="blogRecentEntriesItemLink" target="_top" value="#{wikiURLRenderer.renderURL(be.entryDocument)}">
+ <h:outputText styleClass="blogRecentEntriesItemLinkText"
+ value="#{wiki:truncateString(be.entryDocument.name, preferences.get('Blog', currentMacro).recentEntriesTruncateTitle, '...')}"/>
+ </h:outputLink>
+ </h:column>
+ </h:dataTable>
+
+ </h:column>
+ </h:dataTable>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+ </s:div>
+
+ </s:cache>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogRecentEntries.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogArchive.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/blogArchive.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogArchive.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogArchive.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,9 @@
+.blogArchiveSelector {
+ text-align: center;
+}
+.blogArchiveCombo {
+ border: 0;
+ margin: 10px;
+ color: #000;
+ font-weight: normal;
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogArchive.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogDirectory.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/blogDirectory.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogDirectory.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogDirectory.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,84 @@
+.blogEntryHeader {
+}
+
+.blogEntryHeader .title {
+ text-align: left;
+ line-height: 200%;
+ font-size: 115%;
+}
+
+.blogEntryHeader .dateAuthor {
+ text-align: right;
+ white-space: nowrap;
+ font-weight: normal;
+ line-height: 100%;
+}
+
+.blogEntryContent {
+ padding-left: 15px;
+ padding-right: 15px;
+ line-height: 150%;
+ text-align: justify;
+}
+
+.blogEntryContent .wikiHeadline1 a,
+.blogEntryContent .wikiHeadline2 a,
+.blogEntryContent .wikiHeadline3 a,
+.blogEntryContent .wikiHeadline4 a {
+ color: black;
+}
+
+.blogEntryFooter {
+}
+
+.blogEntryFooterTable {}
+
+.blogEntryCommentCount,
+.blogEntryCommentLink,
+.blogEntryAttachmentsLink,
+.blogEntryPermLink,
+.blogEntryWikiLink {
+ padding-right: 25px;
+ text-align:left;
+}
+.blogEntryCommentCountText,
+.blogEntryCommentLinkText,
+.blogEntryAttachmentsLinkText,
+.blogEntryPermLinkText,
+.blogEntryWikiLinkText {
+ color: #962325;
+}
+.blogEntryCommentCountText:hover,
+.blogEntryCommentLinkText:hover,
+.blogEntryAttachmentsLinkText:hover,
+.blogEntryPermLinkText:hover,
+.blogEntryWikiLinkText:hover {
+ color: #962325;
+}
+
+.blogEntrySeparator {
+ height: 25px;
+}
+
+.blogPagerTable {
+ width: 100%;
+ font-weight: bold;
+ padding: 0;
+ margin: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border: 0;
+ text-align: center;
+}
+
+.blogPagerColumn {
+ width: 10%;
+}
+.blogPagerTextColumn {
+ width: 60%;
+}
+
+.documentTags {
+ margin-left: 10px;
+ margin-right: 10px;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogDirectory.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogRecentEntries.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/blogRecentEntries.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogRecentEntries.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogRecentEntries.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,7 @@
+.blogRecentEntriesDay {
+ font-weight: bold;
+}
+
+.blogRecentEntriesItem {
+ padding-left: 10px;
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/default/css/blogRecentEntries.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogArchive.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/blogArchive.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogArchive.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogArchive.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,10 @@
+.blogArchiveSelector {
+ text-align: center;
+}
+.blogArchiveCombo {
+ border: 0;
+ color: #000;
+ font-size: 91%;
+ font-weight: normal;
+ font-family: "Lucida Sans", Arial, Helvetica, sans-serif;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogDirectory.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/blogDirectory.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogDirectory.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogDirectory.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,102 @@
+#blogDirectoryPlugin\:blogEntries .boxheader {
+ padding-bottom: 0;
+}
+
+#blogDirectoryPlugin\:blogEntries .boxContent {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+#blogDirectoryPlugin\:blogEntries .boxContent .wikiPara:first-child {
+ padding-top: 5px;
+ margin-top: 0;
+}
+
+.blogEntryHeader .title {
+ text-align: left;
+ line-height: 200%;
+ font-size: 120%;
+}
+
+.blogEntryHeader .dateAuthor {
+ text-align: right;
+ white-space: nowrap;
+ font-weight: normal;
+ line-height: 100%;
+}
+
+.blogEntryContent {
+ padding-left: 15px;
+ padding-right: 15px;
+ line-height: 150%;
+ text-align: justify;
+}
+
+.blogEntryContent .documentTags {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-left: 0;
+ padding-right: 0;
+ margin: 0;
+ font-size: 85%;
+}
+
+.blogEntryContent .wikiHeadline1 a,
+.blogEntryContent .wikiHeadline2 a,
+.blogEntryContent .wikiHeadline3 a,
+.blogEntryContent .wikiHeadline4 a {
+ color: black;
+}
+
+.blogEntryFooter {
+ font-size: 85%;
+}
+
+.blogEntryFooterTable {
+ margin-right: auto;
+}
+
+.blogEntryCommentCount,
+.blogEntryCommentLink,
+.blogEntryAttachmentsLink,
+.blogEntryPermLink,
+.blogEntryWikiLink {
+ padding-right: 25px;
+ text-align:left;
+}
+.blogEntryCommentCountText,
+.blogEntryCommentLinkText,
+.blogEntryAttachmentsLinkText,
+.blogEntryPermLinkText,
+.blogEntryWikiLinkText {
+ color: #d75525;
+}
+.blogEntryCommentCountText:hover,
+.blogEntryCommentLinkText:hover,
+.blogEntryAttachmentsLinkText:hover,
+.blogEntryPermLinkText:hover,
+.blogEntryWikiLinkText:hover {
+ color: #666;
+}
+
+.blogEntrySeparator {
+ height: 25px;
+}
+
+.blogPagerTable {
+ width: 100%;
+ font-weight: bold;
+ padding: 0;
+ margin: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border: 0;
+ text-align: center;
+}
+
+.blogPagerColumn {
+ width: 10%;
+}
+.blogPagerTextColumn {
+ width: 60%;
+}
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogRecentEntries.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/blogRecentEntries.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogRecentEntries.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/inrelationto/css/blogRecentEntries.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,7 @@
+.blogRecentEntriesDay {
+ font-weight: bold;
+}
+
+.blogRecentEntriesItem {
+ padding-left: 10px;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogArchive.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogArchive.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogArchive.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,18 @@
+.blogArchiveSelector {
+ text-align: center;
+}
+.blogArchiveCombo {
+ border: 0;
+ color: #000;
+ font-weight: normal;
+}
+
+.blogArchiveFooter {
+ background: #ede8db url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
+ padding-top: 5px;
+ padding-bottom: 10px;
+ padding-left: 15px;
+ padding-right: 15px;
+ font-weight: normal;
+ color: #962325;
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogArchive.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogDirectory.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogDirectory.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogDirectory.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,89 @@
+
+.blogEntryHeader {
+}
+
+.blogEntryHeader .title {
+ text-align: left;
+ line-height: 200%;
+ font-size: 115%;
+}
+
+.blogEntryHeader .dateAuthor {
+ text-align: right;
+ white-space: nowrap;
+ font-weight: normal;
+ line-height: 100%;
+}
+
+.blogEntryContent {
+ padding-left: 15px;
+ padding-right: 15px;
+ line-height: 150%;
+ text-align: justify;
+}
+
+.blogEntryContent .wikiPara {
+ margin-top: 0;
+}
+
+.blogEntryContent .wikiHeadline1 a,
+.blogEntryContent .wikiHeadline2 a,
+.blogEntryContent .wikiHeadline3 a,
+.blogEntryContent .wikiHeadline4 a {
+ color: black;
+}
+
+.blogEntryFooter {
+}
+
+.blogEntryFooterTable {
+}
+
+.blogEntryCommentCount,
+.blogEntryCommentLink,
+.blogEntryAttachmentsLink,
+.blogEntryPermLink,
+.blogEntryWikiLink {
+ padding-right: 25px;
+ text-align:left;
+}
+.blogEntryCommentCountText,
+.blogEntryCommentLinkText,
+.blogEntryAttachmentsLinkText,
+.blogEntryPermLinkText,
+.blogEntryWikiLinkText {
+ color: #576c74;
+}
+.blogEntryCommentCountText:hover,
+.blogEntryCommentLinkText:hover,
+.blogEntryAttachmentsLinkText:hover,
+.blogEntryPermLinkText:hover,
+.blogEntryWikiLinkText:hover {
+ color: #000;
+}
+
+.blogEntrySeparator {
+ height: 25px;
+}
+
+.blogPagerTable {
+ width: 100%;
+ font-weight: bold;
+ padding: 0;
+ margin: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border: 0;
+ text-align: center;
+}
+
+.blogPagerColumn {
+ width: 10%;
+}
+.blogPagerTextColumn {
+ width: 60%;
+}
+
+.documentTags {
+ margin-top: 10px;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogDirectory.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogRecentEntries.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/blogRecentEntries.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogRecentEntries.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogRecentEntries.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,12 @@
+.blogRecentEntriesDay {
+ font-weight: bold;
+}
+
+.blogRecentEntriesItem {
+ padding-left: 10px;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+.blogRecentEntriesItemLink {
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/themes/sfwkorg/css/blogRecentEntries.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser)
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.plugin.xml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqBrowser.plugin.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin key="fb"
+ xmlns="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/wiki/plugin
+ classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
+
+ <plugin-info version="1.0">
+ <application-version min="1.0" max="1.0"/>
+ <vendor name="Red Hat Inc." url="http://www.seamframework.org/"/>
+ </plugin-info>
+
+ <macro key="faqBrowser" name="faqBrowser">
+ <skins>
+ <skin name="d"/>
+ </skins>
+ <applicable-to header="true"/>
+ <render-options>
+ <singleton/>
+ </render-options>
+ </macro>
+
+</plugin>
+
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionDefaults.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -22,7 +22,7 @@
@Override
public String getName() {
- return Messages.instance().get("faqBrowser.label.NewQuestionTitle");
+ return Messages.instance().get("fb.faqBrowser.label.NewQuestionTitle");
}
@Override
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -69,7 +69,7 @@
protected void createdMessage() {
getFacesMessages().addFromResourceBundleOrDefault(
SEVERITY_INFO,
- "faqBrowser.msg.Question.Persist",
+ "fb.faqBrowser.msg.Question.Persist",
"Question '{0}' has been saved.",
getInstance().getName()
);
@@ -78,7 +78,7 @@
protected void updatedMessage() {
getFacesMessages().addFromResourceBundleOrDefault(
SEVERITY_INFO,
- "faqBrowser.msg.Question.Update",
+ "fb.faqBrowser.msg.Question.Update",
"Question '{0}' has been updated.",
getInstance().getName()
);
@@ -87,7 +87,7 @@
protected void deletedMessage() {
getFacesMessages().addFromResourceBundleOrDefault(
SEVERITY_INFO,
- "faqBrowser.msg.Question.Delete",
+ "fb.faqBrowser.msg.Question.Delete",
"Question '{0}' has been deleted.",
getInstance().getName()
);
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/i18n/messages_faqBrowser_en.properties (from rev 8123, trunk/examples/wiki/src/etc/i18n/messages_faqBrowser_en.properties)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/i18n/messages_faqBrowser_en.properties (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/i18n/messages_faqBrowser_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,26 @@
+fb.label=FAQ Browser
+fb.description=FAQ browser and editor
+
+fb.faqBrowser.label=FAQ Browser
+fb.faqBrowser.description=Shows the FAQ browser/editor above the document
+
+fb.faqBrowser.label.Category=FAQ Category
+fb.faqBrowser.label.Question=Question
+fb.faqBrowser.label.Updated=Updated
+fb.faqBrowser.label.NoQuestionsInCategory=No questions in this category.
+fb.faqBrowser.button.NewQuestion=New <u>Q</u>uestion
+fb.faqBrowser.button.NewQuestion.accesskey=Q
+
+fb.faqBrowser.label.NewFaqQuestion=New question in category
+fb.faqBrowser.label.NewQuestionTitle=Your question?
+fb.faqBrowser.label.QuestionTitle=Question
+fb.faqBrowser.label.QuestionText=Text
+fb.faqBrowser.button.SaveNoKey=Save
+fb.faqBrowser.button.CancelNoKey=Cancel
+
+fb.faqBrowser.msg.Question.Persist=Question '{0}' has been saved.
+fb.faqBrowser.msg.Question.Update=Question '{0}' has been updated.
+fb.faqBrowser.msg.Question.Delete=Question '{0}' has been deleted.
+
+fb.faqBrowser.msg.TreeNotFound=Could not find FAQ tree, please create a default document with [<=faqBrowser] header!
+fb.faqBrowser.msg.TreeEmpty=No FAQ categories found, create subdirectories in the current directory.
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/i18n/messages_faqBrowser_en.properties
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqBrowser.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/faqBrowser/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqBrowser.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqBrowser.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,20 @@
+<wiki:plugin id="faqBrowserPlugin"
+ 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 id="faqBrowserPluginContainer">
+
+ <ui:include src="faqControls.xhtml"/>
+
+ <ui:include src="faqQuestionForm.xhtml"/>
+
+ </s:div>
+
+</wiki:plugin>
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqBrowser.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,121 @@
+<s:div id="faqControlsContainer"
+ styleClass="faqControlsContainer"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ rendered="#{not faqQuestionHome.showForm}">
+
+ <h:form id="faqsSelectorForm">
+
+ <s:div styleClass="faqBrowserPanel">
+
+ <h:panelGrid columns="4"
+ columnClasses="categoryLabel, categoryMenu, questionsControl, categoryLink, status"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <s:span>
+ <h:outputText value="#{messages['fb.faqBrowser.label.Category']}:"/>
+ </s:span>
+
+ <s:span>
+ <h:selectOneMenu value="#{faqBrowser.selectedDir}"
+ rendered="#{not empty faqBrowser.tree and faqBrowser.tree.wrappedChildren.size() > 0}"
+ converter="#{nestedSetNodeWrapperRestrictedEntityConverter}"
+ styleClass="ajaxSupport" tabindex="1">
+ <s:selectItems value="#{faqBrowser.tree.wrappedChildren}"
+ var="faqsDir"
+ label="#{wiki:repeatString(' · ',faqsDir.level-1)}#{wiki:truncateString(faqsDir.wrappedNode.name, 40, '...')}"/>
+ <a:support event="onchange" status="globalStatus"
+ action="#{faqBrowser.showQuestions}"
+ reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"/>
+ </h:selectOneMenu>
+ <h:outputText value="#{messages['fb.faqBrowser.msg.TreeNotFound']}" rendered="#{empty faqBrowser.tree}"/>
+ <h:outputText value="#{messages['fb.faqBrowser.msg.TreeEmpty']}" rendered="#{faqBrowser.tree.wrappedChildren.size() == 0}"/>
+ </s:span>
+
+ <s:span id="faqQuestionsControl">
+ <a:commandLink action="#{faqBrowser.showQuestions}" tabindex="1"
+ reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"
+ status="globalStatus"
+ rendered="#{not faqBrowser.directorySelected and not empty faqBrowser.tree and faqBrowser.tree.wrappedChildren.size() > 0}">
+ <h:graphicImage value="#{imagePath}/menu_down.gif" width="18" height="18"/>
+ </a:commandLink>
+ <a:commandLink action="#{faqBrowser.hideQuestions}" tabindex="1"
+ reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"
+ status="globalStatus"
+ rendered="#{faqBrowser.directorySelected and not empty faqBrowser.tree and faqBrowser.tree.wrappedChildren.size() > 0}">
+ <h:graphicImage value="#{imagePath}/menu_up.gif" width="18" height="18"/>
+ </a:commandLink>
+ </s:span>
+
+ <s:span id="faqCategoryLink" styleClass="undecoratedLink">
+ <s:fragment rendered="#{faqBrowser.directorySelected}">
+ <h:outputLink value="#{wikiURLRenderer.renderWikiURL(currentDocument)}/Category/#{faqBrowser.selectedDir.wrappedNode.wikiname}">
+ <h:outputText value="Link"/>
+ </h:outputLink>
+ </s:fragment>
+ </s:span>
+
+ </h:panelGrid>
+ </s:div>
+
+ <s:div id="faqQuestions">
+ <s:div styleClass="faqQuestionPanel" rendered="#{faqBrowser.directorySelected}">
+
+ <h:panelGrid columns="2" styleClass="header" columnClasses="categoryDescription, newQuestionButton"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputText value="#{faqBrowser.selectedDir.wrappedNode.description}"/>
+
+ <s:fragment rendered="#{s:hasPermission('Node', 'create', faqBrowser.selectedDir.wrappedNode)}">
+ <a:commandLink action="#{faqQuestionHome.newQuestion()}"
+ reRender="faqBrowserPluginContainer, messageBoxContainer"
+ status="globalStatus"
+ accesskey="#{messages['fb.faqBrowser.button.NewQuestion.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['fb.faqBrowser.button.NewQuestion']}"/>
+ </a:commandLink>
+ </s:fragment>
+
+ </h:panelGrid>
+
+ <h:dataTable value="#{faqBrowser.questions}" var="q" rendered="#{not empty faqBrowser.questions}"
+ styleClass="faqQuestionList"
+ columnClasses="defaultColumn alignLeft minorPadding wrapWhitespace, twentyPercentColumn alignLeft minorPadding smallFont"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+ <h:column>
+ <h:outputLink value="#{wikiURLRenderer.renderURL(q)}">
+ <h:outputText value="#{q.name}"/>
+ </h:outputLink>
+ </h:column>
+
+ <h:column>
+ <s:fragment rendered="#{!empty q.lastModifiedOn and !empty q.lastModifiedBy}">
+ <h:outputText value="#{messages['fb.faqBrowser.label.Updated']}: "/>
+ <h:outputText value="#{q.lastModifiedOn}">
+ <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:outputText value="#{q.lastModifiedBy.username}"/>
+ </h:outputLink>
+ </s:span>)
+ </s:fragment>
+ </h:column>
+
+ </h:dataTable>
+
+ <s:div styleClass="noQuestions" rendered="#{empty faqBrowser.questions}">
+ <h:outputText value="#{messages['fb.faqBrowser.label.NoQuestionsInCategory']}"/>
+ </s:div>
+ </s:div>
+ </s:div>
+
+ </h:form>
+
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqQuestionForm.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/faqBrowser/faqQuestionForm.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqQuestionForm.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqQuestionForm.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,86 @@
+<s:div id="faqQuestionFormContainer"
+ styleClass="faqQuestionFormContainer"
+ 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:c="http://java.sun.com/jstl/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki">
+
+<c:if test="#{faqQuestionHome.showForm}">
+
+ <div class="box">
+
+ <h:form id="faqQuestionForm">
+ <div class="form">
+
+ <div class="formHead">
+ <h:outputText value="#{messages['fb.faqBrowser.label.NewFaqQuestion']}: #{faqQuestionHome.parentNode.name}"/>
+ </div>
+
+ <s:div styleClass="formFields formBorder">
+
+ <s:decorate id="nameDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['fb.faqBrowser.label.QuestionTitle']}</ui:define>
+ <h:inputText id="faqQuestionName" tabindex="1" size="60" maxlength="255" required="true" value="#{faqQuestionHome.instance.name}"/>
+ </s:decorate>
+
+ <ui:include src="/includes/wikiTextEditor.xhtml">
+ <ui:param name="textEditorId" value="faqQuestion"/>
+ <ui:param name="textPreviewId" value="faqQuestionPreview"/>
+ <ui:param name="namingContainer" value="faqBrowserPlugin\\\\:faqQuestionForm"/>
+ <ui:param name="label" value="#{messages['fb.faqBrowser.label.QuestionText']}"/>
+ <ui:param name="valueBinding" value="#{faqQuestionHome.formContent}"/>
+ <ui:param name="valueMaxLength" value="32767"/>
+ <ui:param name="valueRequired" value="true"/>
+ <ui:param name="textEditorColumns" value="60"/>
+ <ui:param name="textEditorRows" value="20"/>
+ </ui:include>
+
+ <s:div styleClass="marginLeft">
+ <ui:include src="/includes/wikiTextPreview.xhtml">
+ <ui:param name="textPreviewId" value="faqQuestionPreview"/>
+ <ui:param name="valueBinding" value="#{faqQuestionHome.instance.content}"/>
+ <ui:param name="baseDocument" value="#{faqQuestionHome.instance}"/>
+ <ui:param name="baseDirectory" value="#{currentDirectory}"/>
+ </ui:include>
+ </s:div>
+
+ </s:div>
+
+ <div class="formControls">
+ <div class="entry">
+ <div class="label"> </div>
+ <div class="input">
+
+ <a:commandLink id="save" action="#{faqQuestionHome.persist}"
+ eventsQueue="ajaxEventQueue"
+ reRender="faqBrowserPluginContainer, messageBoxContainer"
+ status="globalStatus"
+ tabindex="1"
+ styleClass="button saveButton sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['fb.faqBrowser.button.SaveNoKey']}"/>
+ </a:commandLink>
+
+ <a:commandLink action="#{faqQuestionHome.cancel}"
+ reRender="faqBrowserPluginContainer, messageBoxContainer"
+ immediate="true"
+ status="globalStatus"
+ eventsQueue="ajaxEventQueue"
+ tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['fb.faqBrowser.button.CancelNoKey']}"/>
+ </a:commandLink>
+
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </h:form>
+
+ </div>
+
+</c:if>
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqQuestionForm.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/default/css/faqBrowser.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/faqBrowser.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/default/css/faqBrowser.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/default/css/faqBrowser.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,72 @@
+.faqControlsContainer {
+ margin-bottom: 10px;
+}
+
+.faqBrowserPanel {
+ border: 1px solid #C3BBB6;
+ background: white url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
+ padding: 2px;
+ padding-left: 5px;
+ padding-right: 5px;
+ line-height: 250%;
+}
+
+.faqBrowserPanel .categoryLabel {
+ padding-left: 5px;
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .categoryMenu {
+ padding-left: 10px;
+ padding-right: 10px;
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .questionsControl {
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .categoryLink {
+ padding-left: 10px;
+ padding-right: 10px;
+ white-space:nowrap;
+}
+
+.faqQuestionPanel {
+ border-left: 1px solid #C3BBB6;
+ border-right: 1px solid #C3BBB6;
+ border-bottom: 1px solid #C3BBB6;
+ background: white url(#{themePathGetRequest}/img/th.bg.inverse.gif) 0 0 repeat-x;
+}
+
+.faqQuestionPanel .header {
+ white-space:nowrap;
+ width: 100%;
+}
+
+.faqQuestionPanel .header .categoryDescription {
+ padding-left: 10px;
+ line-height: 250%;
+ font-weight: bold;
+}
+
+.faqQuestionPanel .header .newQuestionButton {
+ text-align:right;
+}
+
+.faqQuestionPanel .noQuestions {
+ padding-left: 10px;
+ line-height: 250%;
+}
+
+.faqQuestionList {
+ width: 100%;
+}
+
+.faqQuestionList .rowOdd {
+ background-color: #fff;
+}
+
+.faqQuestionList .rowEven {
+ background-color: #eae8e5;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/default/css/faqBrowser.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/inrelationto/css/faqBrowser.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/faqBrowser.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/inrelationto/css/faqBrowser.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/inrelationto/css/faqBrowser.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,78 @@
+#faqBrowserPlugin\:faqQuestionForm {
+ border: 1px solid #C3BBB6;
+}
+
+#faqBrowserPlugin\:faqQuestionForm .form {
+ margin:0;
+}
+
+.faqControlsContainer {
+ margin-bottom: 10px;
+}
+
+.faqBrowserPanel {
+ border: 1px solid #C3BBB6;
+ background: #d6d5c8 url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
+ padding: 2px;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+.faqBrowserPanel .categoryLabel {
+ padding-left: 5px;
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .categoryMenu {
+ padding-left: 10px;
+ padding-right: 10px;
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .questionsControl {
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .categoryLink {
+ padding-left: 10px;
+ padding-right: 10px;
+ white-space:nowrap;
+}
+
+.faqQuestionPanel {
+ border-left: 1px solid #C3BBB6;
+ border-right: 1px solid #C3BBB6;
+ border-bottom: 1px solid #C3BBB6;
+ background: white url(#{themePathGetRequest}/img/th.bg.inverse.gif) 0 0 repeat-x;
+}
+
+.faqQuestionPanel .header {
+ white-space:nowrap;
+ width: 100%;
+}
+
+.faqQuestionPanel .header .categoryDescription {
+ padding-left: 10px;
+ line-height: 250%;
+ font-weight: bold;
+}
+
+.faqQuestionPanel .header .newQuestionButton {
+ text-align:right;
+}
+
+.faqQuestionPanel .noQuestions {
+ padding-left: 10px;
+ line-height: 250%;
+}
+
+.faqQuestionList {
+}
+
+.faqQuestionList .rowOdd {
+ background-color: #fff;
+}
+
+.faqQuestionList .rowEven {
+ background-color: #eae8e5;
+}
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/sfwkorg/css/faqBrowser.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/sfwkorg/css/faqBrowser.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/sfwkorg/css/faqBrowser.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,73 @@
+.faqControlsContainer {
+ margin-bottom: 10px;
+}
+
+.faqBrowserPanel {
+ border: 1px solid #d3d2d1;
+ background: #ede8db url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 5px;
+ line-height: 250%;
+}
+
+.faqBrowserPanel .categoryLabel {
+ padding-left: 5px;
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .categoryMenu {
+ padding-left: 10px;
+ padding-right: 10px;
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .questionsControl {
+ white-space:nowrap;
+}
+
+.faqBrowserPanel .categoryLink {
+ padding-left: 10px;
+ padding-right: 10px;
+ white-space:nowrap;
+}
+
+.faqQuestionPanel {
+ border-left: 1px solid #d3d2d1;
+ border-right: 1px solid #d3d2d1;
+ border-bottom: 1px solid #d3d2d1;
+ background: white url(#{themePathGetRequest}/img/th.bg.inverse.gif) 0 0 repeat-x;
+}
+
+.faqQuestionPanel .header {
+ white-space:nowrap;
+ width: 100%;
+}
+
+.faqQuestionPanel .header .categoryDescription {
+ padding-left: 10px;
+ line-height: 250%;
+ font-weight: bold;
+}
+
+.faqQuestionPanel .header .newQuestionButton {
+ text-align:right;
+}
+
+.faqQuestionPanel .noQuestions {
+ padding-left: 10px;
+ line-height: 250%;
+}
+
+.faqQuestionList {
+ border-right: 1px solid #d3d2d1;
+ width: 100%;
+}
+
+.faqQuestionList .rowOdd {
+ background-color: #fff;
+}
+
+.faqQuestionList .rowEven {
+ background-color: #f5f5f5;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/themes/sfwkorg/css/faqBrowser.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/Feed.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/Feed.plugin.xml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/Feed.plugin.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin key="feed"
+ xmlns="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/wiki/plugin
+ classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
+
+ <plugin-info version="1.0">
+ <application-version min="1.0" max="1.0"/>
+ <vendor name="Red Hat Inc." url="http://www.seamframework.org/"/>
+ </plugin-info>
+
+ <macro key="teasers" name="feedTeasers">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true"/>
+ <cache-regions>
+ <cache-region name="TeaserList">
+ <invalidation-event name="FeedEntry.created"/>
+ <invalidation-event name="FeedEntry.updated"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="aggregator" name="feedAggregator">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true"/>
+ </macro>
+
+</plugin>
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregator.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregator.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregator.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregator.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feed;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.connectors.feed.FeedAggregatorDAO;
+import org.jboss.seam.wiki.connectors.feed.FeedEntryDTO;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+
+import java.io.Serializable;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("feedAggregator")
+(a)Scope(ScopeType.PAGE)
+public class FeedAggregator implements Serializable {
+
+ public static final String MACRO_ATTR_FEEDENTRYLIST = "feedEntryList";
+
+ @Logger
+ Log log;
+
+ @In
+ FeedAggregatorDAO feedAggregatorDAO;
+
+ public List<FeedEntryDTO> getFeedEntries(WikiPluginMacro macro) {
+ List<FeedEntryDTO> feedEntries = (List<FeedEntryDTO>)macro.getAttributes().get(MACRO_ATTR_FEEDENTRYLIST);
+ if (feedEntries == null) {
+ FeedAggregatorPreferences prefs = Preferences.instance().get(FeedAggregatorPreferences.class, macro);
+ if (prefs.getUrls() == null || prefs.getUrls().length() < 8) return null;
+
+ List<URL> validURLs = getValidURLs(prefs.getUrls());
+ log.debug("aggregating feeds: " + validURLs.size());
+
+ String aggregateId =
+ prefs.getAggregateId() != null && prefs.getAggregateId().length() > 0
+ ? prefs.getAggregateId()
+ : null;
+
+ if (aggregateId != null) {
+ log.debug("aggregating under subscribable identifier: "+ aggregateId);
+ }
+
+ int numberOfEntries =
+ prefs.getNumberOfFeedEntries() != null ? prefs.getNumberOfFeedEntries().intValue() : 10;
+
+ feedEntries =
+ feedAggregatorDAO.getLatestFeedEntries(
+ numberOfEntries,
+ validURLs.toArray(new URL[validURLs.size()]),
+ aggregateId
+ );
+ macro.getAttributes().put(MACRO_ATTR_FEEDENTRYLIST, feedEntries);
+
+ }
+ return feedEntries;
+ }
+
+ private List<URL> getValidURLs(String spaceSeparatedURLs) {
+
+ // Split the URLs by space
+ String[] urls = spaceSeparatedURLs.split(" ");
+
+ // First check if the URLs are valid, if not we might as well just skip it...
+ List<URL> validUrls = new ArrayList<URL>();
+ for (String url : urls) {
+ try {
+ URL u = new URL(url);
+ if (!u.getProtocol().equals("http")) {
+ log.debug("skipping URL with unsupported protocol: " + url);
+ continue;
+ }
+ validUrls.add(u);
+ } catch (MalformedURLException e) {
+ log.debug("skipping invalid URL: " + url);
+ continue;
+ }
+ }
+ return validUrls;
+ }
+
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregatorPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedAggregator/FeedAggregatorPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregatorPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedAggregatorPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feed;
+
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
+import org.hibernate.validator.Pattern;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(
+ name = "FeedAggregator",
+ description = "#{messages['feed.aggregator.preferences.property.description']}",
+ mappedTo = "feed.aggregator"
+)
+public class FeedAggregatorPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.title']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ @NotNull
+ private String title;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.urls']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 4096)
+ private String urls;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.numberOfFeedEntries']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 3l, max = 99l)
+ @NotNull
+ private Long numberOfFeedEntries;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.truncateDescription']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 10l, max = 1000l)
+ @NotNull
+ private Long truncateDescription;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.aggregateId']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Pattern(regex="^[a-zA-Z0-9]+[a-zA-Z0-9\\s]*")
+ @Length(min = 0, max = 255)
+ private String aggregateId;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.hideDate']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideDate;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.hideAuthor']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideAuthor;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.hideFeedInfo']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideFeedInfo;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.hideDescription']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideDescription;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.aggregator.preferences.property.hideTitle']}",
+ visibility = {PreferenceVisibility.INSTANCE}
+ )
+ private Boolean hideTitle;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getUrls() {
+ return urls;
+ }
+
+ public Long getNumberOfFeedEntries() {
+ return numberOfFeedEntries;
+ }
+
+ public Long getTruncateDescription() {
+ return truncateDescription;
+ }
+
+ public String getAggregateId() {
+ return aggregateId;
+ }
+
+ public Boolean getHideDate() {
+ return hideDate;
+ }
+
+ public Boolean getHideAuthor() {
+ return hideAuthor;
+ }
+
+ public Boolean getHideFeedInfo() {
+ return hideFeedInfo;
+ }
+
+ public Boolean getHideDescription() {
+ return hideDescription;
+ }
+
+ public Boolean getHideTitle() {
+ return hideTitle;
+ }
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasers.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedTeasers/FeedTeasers.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasers.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasers.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,38 @@
+package org.jboss.seam.wiki.plugin.feed;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.wiki.core.feeds.FeedDAO;
+import org.jboss.seam.wiki.core.model.FeedEntry;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+import org.jboss.seam.ScopeType;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Name("feedTeasers")
+(a)Scope(ScopeType.PAGE)
+public class FeedTeasers implements Serializable {
+
+ public static final String MACRO_ATTR_TEASERLIST = "feedTeaserList";
+
+ @In
+ FeedDAO feedDAO;
+
+ public List<FeedEntry> getTeasers(WikiPluginMacro macro) {
+ List<FeedEntry> teaserList = (List<FeedEntry>)macro.getAttributes().get(MACRO_ATTR_TEASERLIST);
+ if (teaserList == null) {
+ FeedTeasersPreferences prefs = Preferences.instance().get(FeedTeasersPreferences.class, macro);
+ teaserList =
+ feedDAO.findLastFeedEntries(
+ prefs.getFeed(),
+ prefs.getNumberOfTeasers().intValue()
+ );
+ macro.getAttributes().put(MACRO_ATTR_TEASERLIST, teaserList);
+ }
+ return teaserList;
+ }
+
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasers.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersFeedPreferenceValueTemplate.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedTeasers/FeedTeasersFeedPreferenceValueTemplate.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersFeedPreferenceValueTemplate.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersFeedPreferenceValueTemplate.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.feed;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.wiki.core.feeds.FeedDAO;
+import org.jboss.seam.wiki.core.model.Feed;
+import org.jboss.seam.wiki.preferences.PreferenceValueTemplate;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("feedTeasersFeedPreferenceValueTemplate")
+(a)Scope(ScopeType.CONVERSATION)
+public class FeedTeasersFeedPreferenceValueTemplate implements PreferenceValueTemplate, Serializable {
+
+ @In
+ FeedDAO feedDAO;
+
+ List<String> feedIdentifiers;
+
+ public List<String> getTemplateValues() {
+ if (feedIdentifiers == null) {
+ List<Feed> feeds = feedDAO.findAllFeeds();
+ for (Feed feed : feeds) {
+ feedIdentifiers.add(feed.getId().toString());
+ }
+ }
+ return feedIdentifiers;
+ }
+
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersFeedPreferenceValueTemplate.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersPreferences.java (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/feedTeasers/FeedTeasersPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,80 @@
+package org.jboss.seam.wiki.plugin.feed;
+
+import org.hibernate.validator.NotNull;
+import org.hibernate.validator.Range;
+import org.hibernate.validator.Length;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+
+import java.io.Serializable;
+
+@Preferences(
+ name = "FeedTeasers",
+ description = "#{messages['feed.teasers.preferences.description']}",
+ mappedTo = "feed.teasers"
+)
+public class FeedTeasersPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description = "#{messages['feed.teasers.preferences.property.Title']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ @NotNull
+ private String title;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.teasers.preferences.property.feed']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "SelectOne",
+ templateComponentName = "feedTeasersFeedPreferenceValueTemplate"
+ )
+ private Long feed;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.teasers.preferences.property.numberOfTeasers']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 3l, max = 25l)
+ @NotNull
+ private Long numberOfTeasers;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.teasers.preferences.property.truncateDescription']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 10l, max = 5000l)
+ @NotNull
+ private Long truncateDescription;
+
+ @PreferenceProperty(
+ description = "#{messages['feed.teasers.preferences.property.showAuthor']}",
+ visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE}
+ )
+ @NotNull
+ private Boolean showAuthor;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public Long getFeed() {
+ return feed;
+ }
+
+ public Long getNumberOfTeasers() {
+ return numberOfTeasers;
+ }
+
+ public Long getTruncateDescription() {
+ return truncateDescription;
+ }
+
+ public Boolean getShowAuthor() {
+ return showAuthor;
+ }
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/FeedTeasersPreferences.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/i18n/messages_feed_en.properties (from rev 8123, trunk/examples/wiki/src/etc/i18n/messages_feedTeasers_en.properties)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/i18n/messages_feed_en.properties (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/i18n/messages_feed_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,32 @@
+feed.label=Atom Feeds
+feed.description=Display internal and aggregate external Atom feeds
+
+feed.teasers.label=Feed Teasers
+feed.teasers.description=Display internal feeds (from the local datastore)
+feed.teasers.preferences.description=Plugin: Feed Teasers
+feed.teasers.preferences.property.title=Title of teaser box
+feed.teasers.preferences.property.feed=Feed
+feed.teasers.preferences.property.numberOfTeasers=Number of feed entries
+feed.teasers.preferences.property.truncateDescription=Truncate teaser text after characters
+feed.teasers.preferences.property.showAuthor=Show author name
+feed.teasers.label.More=more...
+feed.teasers.label.By=by
+
+feed.aggregator.label=Feed Aggregator
+feed.aggregator.description=Display external feeds (from given URIs)
+feed.aggregator.preferences.description=Plugin: Feed Aggregator
+feed.aggregator.preferences.property.title=Title of aggregator box
+feed.aggregator.preferences.property.urls=URLs of feeds to aggregate, space separated
+feed.aggregator.preferences.property.numberOfFeedEntries=Number of feed entries
+feed.aggregator.preferences.property.truncateDescription=Truncate description text after characters
+feed.aggregator.preferences.property.hideDate=Hide date display
+feed.aggregator.preferences.property.hideAuthor=Hide author display
+feed.aggregator.preferences.property.hideFeedInfo=Hide link to feed
+feed.aggregator.preferences.property.hideDescription=Hide feed entry text
+feed.aggregator.preferences.property.hideTitle=Hide feed entry title
+feed.aggregator.preferences.property.aggregateId=Identifier for aggregate (enables subscription)
+feed.aggregator.label.More=more...
+feed.aggregator.label.By=by
+feed.aggregator.label.On=on
+feed.aggregator.label.Subscribe=Subscribe
+feed.aggregator.label.NoEntriesFound=No feed entries found.
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/i18n/messages_feed_en.properties
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/feedAggregator/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,109 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:stringutils="http://org.apache.commons.lang/StringUtils"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="feedAggregator box">
+
+ <s:div styleClass="boxHeader">
+
+ <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0"
+ styleClass="feedAggregatorTitle">
+
+ <h:outputLink value="#{wikiURLRenderer.renderAggregateFeedURL(preferences.get('FeedAggregator', currentMacro).aggregateId)}"
+ rendered="#{not empty preferences.get('FeedAggregator', currentMacro).aggregateId}"
+ style="margin-right:10px;">
+ <h:graphicImage value="#{imagePath}/icon.atom.ongrey.gif" width="18" height="18" alt="Atom"
+ />
+ </h:outputLink>
+
+ <h:outputText value="#{preferences.get('FeedAggregator', currentMacro).title}"/>
+
+ </h:panelGrid>
+
+ </s:div>
+
+
+ <div class="boxContent">
+ <h:dataTable value="#{feedAggregator.getFeedEntries(currentMacro)}" var="feDTO"
+ rendered="#{not empty feedAggregator.getFeedEntries(currentMacro) and feedAggregator.getFeedEntries(currentMacro).size() > 0}"
+ styleClass="datatable feedAggregatorTable"
+ columnClasses="feedEntryColumn"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <s:div styleClass="feedEntryInfo smallFont">
+
+ <s:span rendered="#{not preferences.get('FeedAggregator', currentMacro).hideDate}" styleClass="noWrapWhitespace">
+ <h:outputText value="#{feDTO.feedEntry.publishedDate}" rendered="#{empty feDTO.feedEntry.updatedDate}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value="#{feDTO.feedEntry.updatedDate}" rendered="#{not empty feDTO.feedEntry.updatedDate}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ </s:span>
+
+ <s:span styleClass="undecoratedLink noWrapWhitespace"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideAuthor}">
+ <h:outputText value=", #{messages['feed.aggregator.label.By']} "/>
+ <h:outputText styleClass="feedEntryAuthor" value="#{wiki:escapeAtSymbol(feDTO.feedEntry.author)}"/>
+ </s:span>
+
+ <s:span styleClass="undecoratedLink noWrapWhitespace"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideFeedInfo}">
+ <h:outputText value=" #{messages['feed.aggregator.label.On']} "/>
+ <h:outputLink value="#{feDTO.feed.link}">
+ <h:outputText value="#{feDTO.feed.title}"/>
+ </h:outputLink>
+ </s:span>
+
+ </s:div>
+
+ <s:div styleClass="feedEntryTitle undecoratedLink"
+ rendered="#{not preferences.get('FeedAggregator', currentMacro).hideTitle}">
+ <h:outputLink target="_top" value="#{feDTO.feedEntry.link}">
+ <h:outputText value="#{wiki:escapeAtSymbol(wiki:removeHtml(stringutils:unescapeHtml(feDTO.feedEntry.title)))}"/>
+ </h:outputLink>
+ </s:div>
+
+ <s:div styleClass="feedEntryBody" rendered="#{not preferences.get('FeedAggregator', currentMacro).hideDescription}">
+ <h:outputText value="#{wiki:truncateStringOnWordBoundary(
+ wiki:escapeAtSymbol(
+ wiki:removeHtml(
+ stringutils:unescapeHtml(feDTO.feedEntry.descriptionValue)
+ )
+ ),
+ preferences.get('FeedAggregator', currentMacro).truncateDescription)}"/>
+
+ <h:outputLink target="_top" styleClass="feedEntryBodyMoreLink"
+ value="#{feDTO.feedEntry.link}"
+ rendered="#{wiki:length(wiki:removeHtml(stringutils:unescapeHtml(feDTO.feedEntry.descriptionValue)))
+ > preferences.get('FeedAggregator', currentMacro).truncateDescription}">
+  #{messages['feed.aggregator.label.More']}
+ </h:outputLink>
+ </s:div>
+
+ </h:column>
+
+ </h:dataTable>
+
+ </div>
+
+ <s:div styleClass="feedAggregatorEmpty"
+ rendered="#{empty feedAggregator.getFeedEntries(currentMacro) or
+ feedAggregator.getFeedEntries(currentMacro).size() == 0}">
+ <h:outputText value="#{messages['feed.aggregator.label.NoEntriesFound']}"/>
+ </s:div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</wiki:plugin>
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedTeasers.xhtml (from rev 8108, trunk/examples/wiki/view/plugins/feedTeasers/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedTeasers.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedTeasers.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,73 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ 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:cache region="#{currentMacro.getCacheRegion('TeaserList')}"
+ key="#{currentMacro.cacheKey}">
+
+ <s:div styleClass="feedTeasers box">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('FeedTeasers', currentMacro).title}"/>
+ </s:div>
+
+ <div class="boxContent">
+
+ <h:dataTable value="#{feedTeasers.getTeasers(currentMacro)}"
+ var="fe"
+ styleClass="datatable feedTeaserTable"
+ columnClasses="teaserColumn"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+ <h:column>
+ <div class="teaserAuthorDate smallFont">
+ <s:span styleClass="teaserDate">
+ <h:outputText value="#{fe.updatedDate}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ </s:span>
+ <s:span styleClass="undecoratedLink"
+ rendered="#{preferences.get('FeedTeasers', currentMacro).showAuthor}">
+ <h:outputText value=", #{messages['feed.teasers.label.By']} "/>
+ <h:outputText styleClass="teaserAuthor" value="#{fe.author}"/>
+ </s:span>
+
+ </div>
+
+ <div class="teaserTitle undecoratedLink">
+ <h:outputLink target="_top" value="#{fe.link}">
+ <h:outputText value="#{wiki:removeHtml(fe.title)}"/>
+ </h:outputLink>
+ </div>
+
+ <h:outputText styleClass="teaserBody"
+ value="#{wiki:truncateStringOnWordBoundary(
+ wiki:removeHtml(fe.descriptionValue),
+ preferences.get('FeedTeasers', currentMacro).truncateDescription
+ )}"/>
+
+ <h:outputLink target="_top" styleClass="teaserBody"
+ value="#{fe.link}"
+ rendered="#{wiki:length(wiki:removeHtml(fe.descriptionValue))
+ > preferences.get('FeedTeasers', currentMacro).truncateDescription}">
+ <h:outputText value=" #{messages['feed.teasers.label.More']}"/>
+ </h:outputLink>
+
+ </h:column>
+ </h:dataTable>
+
+ </div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</s:cache>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedTeasers.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedAggregator.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/feedAggregator.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedAggregator.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedAggregator.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+.feedAggregatorTitle {
+ margin-left: auto;
+}
+
+.feedEntryColumn {
+ padding: 10px;
+}
+
+.feedEntryTitle {
+ font-weight: bold;
+ padding-top: 15px;
+ padding-bottom: 15px;
+}
+
+.feedEntryInfo {
+ text-align: right;
+}
+
+.feedEntryBody {
+ line-height: 150%;
+ text-align:justify;
+}
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedTeasers.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/feedTeasers.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedTeasers.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedTeasers.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,28 @@
+.teaserColumn {
+ padding: 10px;
+}
+
+.teaserTitle {
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+.teaserAuthorDate {
+ text-align: right;
+}
+
+.teaserAuthor {
+}
+
+.teaserAuthorLink {
+ color: #962325;
+ text-decoration: none;
+}
+
+.teaserDate {
+}
+
+.teaserBody {
+ line-height: 150%;
+ text-align:justify;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/default/css/feedTeasers.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedAggregator.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/feedAggregator.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedAggregator.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedAggregator.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+.feedAggregatorTitle {
+ margin-left: auto;
+}
+
+.feedEntryColumn {
+ padding: 10px;
+}
+
+.feedEntryTitle {
+ font-weight: bold;
+ padding-top: 15px;
+ padding-bottom: 15px;
+}
+
+.feedEntryInfo {
+ text-align: right;
+}
+
+.feedEntryBody {
+ line-height: 150%;
+ text-align:justify;
+}
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedTeasers.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/feedTeasers.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedTeasers.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/inrelationto/css/feedTeasers.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,28 @@
+.teaserColumn {
+ padding: 10px;
+}
+
+.teaserTitle {
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+.teaserAuthorDate {
+ text-align: right;
+}
+
+.teaserAuthor {
+}
+
+.teaserAuthorLink {
+ color: #d75525;
+ text-decoration: none;
+}
+
+.teaserDate {
+}
+
+.teaserBody {
+ line-height: 150%;
+ text-align:justify;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedAggregator.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedAggregator.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedAggregator.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,20 @@
+.feedAggregatorTitle {
+ margin-left:auto;
+}
+
+.feedEntryColumn {
+ padding: 10px;
+}
+
+.feedEntryTitle {
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+.feedEntryInfo {
+ text-align: right;
+}
+
+.feedEntryBody {
+ line-height: 130%;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedTeasers.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/feedTeasers.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedTeasers.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedTeasers.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+.teaserColumn {
+ padding: 10px;
+}
+
+.teaserTitle {
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+.teaserAuthorDate {
+ text-align: right;
+}
+
+.teaserAuthor {
+}
+
+.teaserDate {
+}
+
+.teaserBody {
+ line-height: 130%;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/themes/sfwkorg/css/feedTeasers.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum)
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin key="forum"
+ xmlns="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/wiki/plugin
+ classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
+
+ <plugin-info version="1.0">
+ <application-version min="1.0" max="1.0"/>
+ <vendor name="Red Hat Inc." url="http://www.seamframework.org/"/>
+ </plugin-info>
+
+ <macro key="list" name="forumList">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <render-options>
+ <singleton/>
+ </render-options>
+ <cache-regions>
+ <cache-region name="ForumList">
+ <invalidation-event name="Node.persisted"/>
+ <invalidation-event name="Node.updated"/>
+ <invalidation-event name="Node.removed"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="topics" name="forumTopics">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <render-options>
+ <singleton/>
+ </render-options>
+ <cache-regions>
+ <cache-region name="TopicList">
+ <invalidation-event name="Node.persisted"/>
+ <invalidation-event name="Node.updated"/>
+ <invalidation-event name="Node.removed"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+ <macro key="posting" name="forumPosting">
+ <applicable-to header="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <render-options>
+ <singleton/>
+ </render-options>
+ </macro>
+
+ <macro key="stickyPosting" name="forumStickyPosting">
+ <applicable-to header="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <render-options>
+ <singleton/>
+ </render-options>
+ </macro>
+
+ <macro key="replies" name="forumReplies">
+ <applicable-to footer="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <render-options>
+ <singleton/>
+ </render-options>
+ </macro>
+
+ <macro key="topPosters" name="forumTopPosters">
+ <applicable-to content="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <cache-regions>
+ <cache-region name="TopPostersList">
+ <invalidation-event name="Node.removed"/>
+ <invalidation-event name="User.removed"/>
+ <invalidation-event name="User.updated"/>
+ <invalidation-event name="Comment.rated"/>
+ </cache-region>
+ </cache-regions>
+ </macro>
+
+</plugin>
+
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -10,11 +10,14 @@
import java.io.Serializable;
-@Preferences(name = "Forum", description = "#{messages['forum.preferences.Name']}")
+@Preferences(
+ name = "Forum",
+ description = "#{messages['forum.preferences.description']}"
+)
public class ForumPreferences implements Serializable {
@PreferenceProperty(
- description = "#{messages['forum.preferences.TopicsPerPage']}",
+ description = "#{messages['forum.preferences.property.topicsPerPage']}",
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.USER},
editorIncludeName = "NumberRange"
)
@@ -23,7 +26,7 @@
private Long topicsPerPage;
@PreferenceProperty(
- description = "#{messages['forum.preferences.NotificationMailingList']}",
+ description = "#{messages['forum.preferences.property.notificationMailingList']}",
visibility = {PreferenceVisibility.SYSTEM},
editorIncludeName = "AdaptiveTextInput"
)
@@ -32,7 +35,7 @@
private String notificationMailingList;
@PreferenceProperty(
- description = "#{messages['forum.preferences.NotifyMeOfReplies']}",
+ description = "#{messages['forum.preferences.property.notifyMeOfReplies']}",
visibility = PreferenceVisibility.USER
)
private Boolean notifyMeOfReplies;
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -12,6 +12,8 @@
import org.jboss.seam.wiki.core.engine.WikiLinkResolver;
import org.jboss.seam.wiki.core.model.User;
import org.jboss.seam.wiki.core.model.WikiDirectory;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
import java.io.Serializable;
import java.util.*;
@@ -30,9 +32,6 @@
@In("#{preferences.get('Forum')}")
ForumPreferences forumPrefs;
- @In("#{preferences.get('ForumTopPosters', currentMacro)}")
- ForumTopPostersPreferences forumTopPostersPrefs;
-
@RequestParameter
public void setPage(Integer page) {
if (pager == null) pager = new Pager(forumPrefs.getTopicsPerPage());
@@ -135,41 +134,41 @@
/* ####################### POSTERS ########################## */
- private Map<Long, List<User>> forumsTopPosters = new HashMap<Long, List<User>>();
+ public static final String MACRO_ATTR_TOPPOSTERS = "forumTopPostersList";
- public List<User> getTopPosters() {
- Long forumId = resolveForumId(forumTopPostersPrefs.getForumLink());
- return forumId != null ? forumsTopPosters.get(forumId) : null;
- }
+ public List<User> getTopPosters(WikiPluginMacro macro) {
- @Observer(value = "Macro.render.forumTopPosters", create = true)
- public void loadForumTopPosters() {
- log.debug("loading top posters of forum: " + forumTopPostersPrefs.getForumLink());
+ ForumTopPostersPreferences forumTopPostersPrefs =
+ Preferences.instance().get(ForumTopPostersPreferences.class, macro);
- Long forumId = resolveForumId(forumTopPostersPrefs.getForumLink());
- if (forumId == null) {
- log.debug("could not resolve forum id for forum start page link: " + forumTopPostersPrefs.getForumLink());
- return;
- }
+ // Cache the list in the macro, this getter is called a thousand times during datatable rendering
+ List<User> forumTopPosters =
+ (List<User>)macro.getAttributes().get(MACRO_ATTR_TOPPOSTERS + forumTopPostersPrefs.getForumLink());
+ if (forumTopPosters == null) {
- log.debug("resolved forum id: " + forumId);
+ Long forumId = resolveForumId(forumTopPostersPrefs.getForumLink());
+ if (forumId == null) {
+ log.debug("could not resolve forum id for forum start page link: " + forumTopPostersPrefs.getForumLink());
+ return null;
+ }
- List<String> excludeRoles = new ArrayList<String>();
- if (forumTopPostersPrefs.getExcludeRoles() != null &&
- forumTopPostersPrefs.getExcludeRoles().length() > 0) {
- log.debug("excluding posters with roles: " + forumTopPostersPrefs.getExcludeRoles());
- excludeRoles = Arrays.asList(forumTopPostersPrefs.getExcludeRoles().split(" "));
- }
+ List<String> excludeRoles = new ArrayList<String>();
+ if (forumTopPostersPrefs.getExcludeRoles() != null &&
+ forumTopPostersPrefs.getExcludeRoles().length() > 0) {
+ log.debug("excluding posters with roles: " + forumTopPostersPrefs.getExcludeRoles());
+ excludeRoles = Arrays.asList(forumTopPostersPrefs.getExcludeRoles().split(" "));
+ }
- log.debug("loading top " + forumTopPostersPrefs.getNumberOfPosters() + " posters of forum id: " + forumId);
- List<User> topPosters =
- forumDAO.findPostersAndRatingPoints(
- forumId,
- forumTopPostersPrefs.getNumberOfPosters().intValue(),
- excludeRoles
- );
- log.debug("found top posters: " + topPosters.size());
- forumsTopPosters.put(forumId, topPosters);
+ log.debug("loading top " + forumTopPostersPrefs.getNumberOfPosters() + " posters of forum id: " + forumId);
+ forumTopPosters =
+ forumDAO.findPostersAndRatingPoints(
+ forumId,
+ forumTopPostersPrefs.getNumberOfPosters().intValue(),
+ excludeRoles
+ );
+ macro.getAttributes().put(MACRO_ATTR_TOPPOSTERS+forumTopPostersPrefs.getForumLink(), forumTopPosters);
+ }
+ return forumTopPosters;
}
private Long resolveForumId(String forumLink) {
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumTopPostersPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumTopPostersPreferences.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumTopPostersPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -16,11 +16,15 @@
/**
* @author Christian Bauer
*/
-@Preferences(name = "ForumTopPosters", description = "#{messages['forumTopPosters.preferences.Name']}")
+@Preferences(
+ name = "ForumTopPosters",
+ description = "#{messages['forum.topPosters.preferences.description']}",
+ mappedTo = "forum.topPosters"
+)
public class ForumTopPostersPreferences {
@PreferenceProperty(
- description = "#{messages['forumTopPosters.preferences.Title']}",
+ description = "#{messages['forum.topPosters.preferences.property.title']}",
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
editorIncludeName = "AdaptiveTextInput"
)
@@ -29,7 +33,7 @@
private String title;
@PreferenceProperty(
- description = "#{messages['forumTopPosters.preferences.NumberOfPosters']}",
+ description = "#{messages['forum.topPosters.preferences.property.numberOfPosters']}",
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
editorIncludeName = "NumberRange"
)
@@ -38,7 +42,7 @@
private Long numberOfPosters;
@PreferenceProperty(
- description = "#{messages['forumTopPosters.preferences.ForumLink']}",
+ description = "#{messages['forum.topPosters.preferences.property.forumLink']}",
visibility = PreferenceVisibility.INSTANCE,
editorIncludeName = "AdaptiveTextInput"
)
@@ -46,7 +50,7 @@
private String forumLink;
@PreferenceProperty(
- description = "#{messages['forumTopPosters.preferences.ExcludeRoles']}",
+ description = "#{messages['forum.topPosters.preferences.property.excludeRoles']}",
visibility = PreferenceVisibility.INSTANCE,
editorIncludeName = "AdaptiveTextInput"
)
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ReplyHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -9,6 +9,8 @@
import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
import org.jboss.seam.wiki.core.model.WikiComment;
import org.jboss.seam.wiki.core.model.WikiNode;
+import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.ui.WikiRedirect;
import org.jboss.seam.wiki.preferences.Preferences;
import static javax.faces.application.FacesMessage.SEVERITY_INFO;
@@ -32,11 +34,11 @@
// Notify forum mailing list
String notificationMailingList =
- Preferences.getInstance(ForumPreferences.class).getNotificationMailingList();
+ Preferences.instance().get(ForumPreferences.class).getNotificationMailingList();
if (notificationMailingList != null) {
getLog().debug("sending reply notification e-mail to forum list");
renderer.render("/themes/"
- + Preferences.getInstance(WikiPreferences.class).getThemeName()
+ + Preferences.instance().get(WikiPreferences.class).getThemeName()
+ "/mailtemplates/forumNotifyReplyToList.xhtml");
}
@@ -47,13 +49,13 @@
)) {
getLog().debug("sending reply notification e-mail to original poster");
renderer.render("/themes/"
- + Preferences.getInstance(WikiPreferences.class).getThemeName()
+ + Preferences.instance().get(WikiPreferences.class).getThemeName()
+ "/mailtemplates/forumNotifyReply.xhtml");
}
}
@Begin(flushMode = FlushModeType.MANUAL, join = true)
- public String replyToDocument() {
+ public void replyToDocument() {
getLog().debug("reply to document id: " + getParentNodeId());
newComment();
@@ -61,20 +63,31 @@
getInstance().setSubject(REPLY_PREFIX + getParentNode().getName());
- return "redirectToDocument";
+ WikiRedirect.instance()
+ .setWikiDocument(documentHome.getInstance())
+ .setPropagateConversation(true)
+ .execute();
}
@Begin(flushMode = FlushModeType.MANUAL, join = true)
- public String quoteDocument() {
- replyToDocument();
+ public void quoteDocument() {
+ getLog().debug("quote to document id: " + getParentNodeId());
+ newComment();
+ initEditor(false);
+
+ getInstance().setSubject(REPLY_PREFIX + getParentNode().getName());
+
getInstance().setContent(quote(
documentHome.getInstance().getContent(),
documentHome.getInstance().getCreatedOn(),
documentHome.getInstance().getCreatedBy().getFullname()
));
- return "redirectToDocument";
+ WikiRedirect.instance()
+ .setWikiDocument(documentHome.getInstance())
+ .setPropagateConversation(true)
+ .execute();
}
@Override
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/TopicHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -9,9 +9,10 @@
import org.jboss.seam.ui.validator.FormattedTextValidator;
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
import org.jboss.seam.wiki.core.model.WikiDirectory;
import org.jboss.seam.wiki.core.model.WikiDocument;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+import org.jboss.seam.wiki.core.ui.WikiRedirect;
import org.jboss.seam.wiki.preferences.Preferences;
import javax.faces.application.FacesMessage;
@@ -27,6 +28,9 @@
@In
WikiDirectory currentDirectory;
+ @In
+ WikiDocument currentDocument;
+
@In(create = true)
private Renderer renderer;
@@ -51,7 +55,7 @@
super.create();
setParentNodeId(currentDirectory.getId());
- Boolean preferencesNotifyReplies = Preferences.getInstance(ForumPreferences.class).getNotifyMeOfReplies();
+ Boolean preferencesNotifyReplies = Preferences.instance().get(ForumPreferences.class).getNotifyMeOfReplies();
notifyReplies = preferencesNotifyReplies != null && preferencesNotifyReplies;
}
@@ -85,10 +89,10 @@
// TODO: Use macro parameters for "sticky" and "notify" options instead of additional macros
if (isSticky()) {
getInstance().removeHeaderMacros("forumPosting");
- getInstance().addHeaderMacro(new WikiMacro("forumStickyPosting"));
+ getInstance().addHeaderMacro(new WikiTextMacro("forumStickyPosting"));
}
if (isNotifyReplies()) {
- getInstance().addHeaderMacro(new WikiMacro(TOPIC_NOTIFY_ME_MACRO));
+ getInstance().addHeaderMacro(new WikiTextMacro(TOPIC_NOTIFY_ME_MACRO));
}
return super.beforePersist();
}
@@ -103,15 +107,17 @@
// Notify forum mailing list
String notificationMailingList =
- Preferences.getInstance(ForumPreferences.class).getNotificationMailingList();
+ Preferences.instance().get(ForumPreferences.class).getNotificationMailingList();
if (notificationMailingList != null) {
getLog().debug("sending topic notification e-mail to forum list");
renderer.render("/themes/"
- + Preferences.getInstance(WikiPreferences.class).getThemeName()
+ + Preferences.instance().get(WikiPreferences.class).getThemeName()
+ "/mailtemplates/forumNotifyTopicToList.xhtml");
}
endConversation();
+
+ // TODO: We should redirect here to the posted topic with WikiRedirect, see cancel()
}
return null; // Prevent navigation
}
@@ -211,6 +217,9 @@
public void cancel() {
endConversation();
+
+ // Redirect to topic list
+ WikiRedirect.instance().setWikiDocument(currentDocument).execute();
}
@RequestParameter("showTopicForm")
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forumTopPosters_en.properties (from rev 8123, trunk/examples/wiki/src/etc/i18n/messages_forumTopPosters_en.properties)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forumTopPosters_en.properties (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forumTopPosters_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,14 @@
+forum.topPosters.label=Forum Top Posters
+forum.topPosters.description=Shows a list of best rated forum posters
+
+forum.topPosters.preferences.description=Plugin: Forum Top Posters
+forum.topPosters.preferences.property.title=Title of box
+forum.topPosters.preferences.property.numberOfPosters=Number of posters in list
+forum.topPosters.preferences.property.forumLink=Wiki link to forum start page (topic list)
+forum.topPosters.preferences.property.excludeRoles=Exclude users with role name (space separated)
+
+forum.topPosters.label.Position=Position
+forum.topPosters.label.User=User
+forum.topPosters.label.JoinedOn=Joined On
+forum.topPosters.label.RatingPoints=Rating Points
+forum.topPosters.label.NoPostersFound=No posters with rating points found.
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties (from rev 8123, trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,121 @@
+forum.label=Forum
+forum.description=Discussion Forums/Bulletin Boards
+
+forum.preferences.description=Plugin: Forum
+forum.preferences.property.topicsPerPage=Number of topics per page
+forum.preferences.property.notificationMailingList=Send all topics/replies to this e-mail address (empty to disable)
+forum.preferences.property.notifyMeOfReplies=Enable e-mail reply notification switch by default
+
+forum.list.label=Forum List
+forum.list.description=List of all forum subdirectories
+
+forum.topics.label=Forum Topics
+forum.topics.description=List of all topics in a forum directory
+
+forum.posting.label=Forum Posting
+forum.posting.description=Turns a WikiDocument into a regular forum posting
+
+forum.stickyPosting.label=Forum Sticky Posting
+forum.stickyPosting.description=Turns a WikiDocument into a sticky forum posting
+
+forum.replies.label=Forum Replies
+forum.replies.description=Shows wiki comments as posting replies thread
+
+forum.label.Showing=Showing
+forum.label.To=to
+forum.label.Of=of
+forum.label.Topics=topics
+forum.label.Joined=Joined On
+
+forum.label.Forum=Forum
+forum.label.TopicCount=Topics
+forum.label.PostCount=Posts
+forum.label.NewestTopic=Newest Topic
+forum.label.LatestPost=Last Post
+forum.label.Feed=Feed
+forum.label.EnableFeed=Enable syndication feed (disabling invalidates subcriber link)
+
+forum.label.EditForum=Edit Forum
+forum.label.NewForum=New Forum
+
+forum.label.NewTopic=New Topic
+forum.label.Subject=Subject
+forum.label.Message=Message
+forum.label.Options=Options
+forum.label.OpenTopicAllowReplies=Open topic, allow replies
+forum.label.StickyPosting=Sticky posting
+forum.label.NotifyMeOfReplies=Notify me via e-mail of any replies
+
+forum.label.Reply=Reply
+forum.label.NewReply=New Reply
+forum.label.Replies=Replies
+
+forum.label.ForumName=Forum Name
+forum.label.ForumDescription=Description
+
+forum.msg.NoForumsFound=No forums found.
+
+forum.button.NewForum=<u>N</u>ew Forum
+forum.button.NewForum.accesskey=N
+forum.button.ManageForums=Mana<u>g</u>e Forums
+forum.button.ManageForums.accesskey=G
+
+forum.button.Edit=Edit
+forum.button.ResetFeed=Clear Feed
+forum.button.MoveUp=Move Up
+forum.button.MoveDown=Move Down
+forum.button.SaveNoKey=Save
+forum.button.Save=<u>S</u>ave
+forum.button.Save.accesskey=S
+forum.button.Update=<u>U</u>pdate
+forum.button.Update.accesskey=U
+forum.button.Remove=<u>D</u>elete
+forum.button.Remove.accesskey=Delete
+forum.button.CancelNoKey=Cancel
+forum.button.Cancel=<u>C</u>ancel
+forum.button.Cancel.accesskey=C
+forum.button.Exit=<u>E</u>xit
+forum.button.Exit.accesskey=E
+forum.button.NewTopic=<u>N</u>ew Topic
+forum.button.NewTopic.accesskey=N
+forum.button.ForumList=F<u>o</u>rum List
+forum.button.ForumList.accesskey=O
+forum.button.TopicList=<u>T</u>opic List
+forum.button.TopicList.accesskey=T
+forum.button.Reply=R<u>e</u>ply
+forum.button.Reply.accesskey=E
+forum.button.Reply.nokey=Reply
+forum.button.Quote=<u>Q</u>uote
+forum.button.Quote.accesskey=Q
+forum.button.Quote.nokey=Quote
+forum.button.RemoveReply=Remove
+forum.button.PreviousPosting=Pre<u>v</u>ious
+forum.button.PreviousPosting.accesskey=V
+forum.button.NextPosting=Ne<u>x</u>t
+forum.button.NextPosting.accesskey=X
+
+forum.label.replyForm.Name=Name
+forum.label.replyForm.Email=E-mail address (optional)
+forum.label.replyForm.Homepage=Homepage URL (optional)
+forum.label.replyForm.Subject=Subject
+forum.label.replyForm.Message=Message
+
+forum.label.WroteOn=wrote on
+forum.label.reply.FeedEntryTitlePrefix=Re:
+
+forum.msg.Feed.Create=Created syndication feed for this forum.
+forum.msg.Feed.Remove=Removed syndication feed of this forum.
+forum.msg.Feed.Reset=Queued removal of all feed entries from the syndication feed of this directory, please update to finalize.
+
+forum.msg.Forum.Persist=Forum '{0}' has been saved.
+forum.msg.Forum.Update=Forum '{0}' has been updated.
+forum.msg.Forum.Delete=Forum '{0}' has been deleted.
+
+forum.msg.Topic.Persist=Topic '{0}' has been saved.
+forum.msg.Topic.Update=Topic '{0}' has been updated.
+forum.msg.Topic.Delete=Topic '{0}' has been deleted.
+
+forum.msg.Reply.Persist=Reply '{0}' has been saved.
+forum.msg.Reply.Update=Reply '{0}' has been updated.
+forum.msg.Reply.Delete=Reply '{0}' has been deleted.
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumForm.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumList/forumForm.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumForm.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumForm.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,123 @@
+<s:div id="forumFormContainer"
+ styleClass="forumFormContainer"
+ 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">
+
+<s:fragment rendered="#{forumHome.showForm}">
+
+<div class="box">
+
+<h:form id="forumForm">
+
+ <div class="form">
+
+ <div class="formHead">
+ <h:outputText value="#{forumHome.managed ? messages['forum.label.EditForum'] : messages['forum.label.NewForum']}"/>
+ </div>
+
+ <s:div styleClass="formFields formBorder">
+
+ <s:decorate id="nameDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['forum.label.ForumName']}</ui:define>
+ <h:inputText styleClass="ajaxSupport" size="40" maxlength="255" required="true" tabindex="1" value="#{forumHome.instance.name}">
+ <a:support event="onchange" status="globalStatus" reRender="nameDecorate"/>
+ </h:inputText>
+ </s:decorate>
+
+ <s:decorate id="descriptionDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['forum.label.ForumDescription']}</ui:define>
+ <h:inputText styleClass="ajaxSupport" size="70" maxlength="512" required="false" tabindex="1" value="#{forumHome.instance.description}">
+ <a:support event="onchange" status="globalStatus" reRender="descriptionDecorate"/>
+ </h:inputText>
+ </s:decorate>
+
+ <ui:include src="/includes/accessLevelSelector.xhtml">
+ <ui:param name="home" value="#{forumHome}"/>
+ </ui:include>
+
+ <s:div styleClass="entry">
+ <div class="label"> </div>
+ <div class="input">
+ <h:selectBooleanCheckbox value="#{forumHome.hasFeed}" tabindex="1"/>
+ <h:outputText value="#{messages['forum.label.EnableFeed']}"/>
+ <a:commandLink id="resetFeed" reRender="messageBoxContainer"
+ action="#{forumHome.resetFeed}"
+ status="globalStatus"
+ rendered="#{!empty forumHome.instance.feed}"
+ styleClass="buttonNonpersistent sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['forum.button.ResetFeed']}"/>
+ </a:commandLink>
+ </div>
+ </s:div>
+
+ </s:div>
+
+ <div class="formControls">
+ <div class="entry">
+ <div class="label"> </div>
+ <div class="input">
+
+ <a:commandLink action="#{forumHome.update}" rendered="#{forumHome.managed}"
+ reRender="forumListPluginContainer, messageBoxContainer"
+ status="globalStatus"
+ tabindex="1" accesskey="#{messages['forum.button.Update.accesskey']}"
+ styleClass="button saveButton sessionEventTrigger">
+ <h:outputText escape="false" styleClass="buttonLabel" value="#{messages['forum.button.Update']}"/>
+ </a:commandLink>
+
+
+ <s:fragment rendered="#{forumHome.removable}">
+ <ui:decorate template="/includes/confirmationAction.xhtml">
+ <ui:param name="label" value="#{messages['forum.button.Remove']}"/>
+ <ui:param name="accesskey" value="#{messages['forum.button.Remove.accesskey']}"/>
+ <ui:param name="tabindex" value="1"/>
+ <ui:param name="linkClass" value="button sessionEventTrigger saveButton"/>
+ <ui:param name="escapeLabel" value="false"/>
+ <ui:param name="jsFunctionName" value="deleteForum"/>
+ <ui:param name="message" value="#{messages['lacewiki.label.AreYouSureYouWantToDelete']
+ .concat(': \'').concat(forumHome.instance.name).concat('\'?')}"/>
+ <ui:define name="jsFunction">
+ <a:jsFunction name="#{jsFunctionName}"
+ reRender="forumListPluginContainer, messageBoxContainer"
+ action="#{forumHome.remove}"
+ status="globalStatus"/>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
+
+ <a:commandLink action="#{forumHome.persist}" rendered="#{!forumHome.managed}"
+ reRender="forumListPluginContainer, messageBoxContainer"
+ status="globalStatus"
+ tabindex="1" accesskey="#{messages['forum.button.Save.accesskey']}"
+ styleClass="button saveButton sessionEventTrigger">
+ <h:outputText escape="false" styleClass="buttonLabel" value="#{messages['forum.button.Save']}"/>
+ </a:commandLink>
+
+ <a:region>
+ <a:commandLink action="#{forumHome.cancel}"
+ immediate="true"
+ status="globalStatus"
+ reRender="forumListPluginContainer, messageBoxContainer"
+ tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger"
+ accesskey="#{messages['forum.button.Cancel.accesskey']}">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.Cancel']}"/>
+ </a:commandLink>
+ </a:region>
+
+ </div>
+ </div>
+ </div>
+
+ </div>
+
+</h:form>
+
+</div>
+</s:fragment>
+
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumForm.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumList.xhtml (from rev 7883, trunk/examples/wiki/view/plugins/forumList/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,21 @@
+<wiki:plugin id="forumListPlugin"
+ 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:span id="forumListPluginContainer">
+
+ <ui:include src="forumListControls.xhtml"/>
+
+ <ui:include src="forumForm.xhtml"/>
+
+ <ui:include src="forumListTable.xhtml"/>
+
+ </s:span>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumList.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListControls.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumList/forumListControls.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListControls.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListControls.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,68 @@
+<s:div id="forumListControlsContainer"
+ styleClass="forumListControlsContainer"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<s:fragment rendered="#{not forumListHome.managed}">
+
+ <s:div styleClass="forumsFeedLink undecoratedLink" rendered="#{not empty currentDirectory.feed}">
+ <h:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}"
+ tabindex="1">
+ <h:graphicImage value="#{imagePath}/icon.atom.gif" width="18" height="18"/>
+ <h:outputText value="#{currentDocument.name} #{messages['forum.label.Feed']}"/>
+ </h:outputLink>
+ </s:div>
+
+</s:fragment>
+
+<h:form rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}">
+<s:fragment rendered="#{not forumListHome.managed}">
+
+ <script type="text/javascript">stopSessionTimeoutCheck();</script>
+
+ <h:panelGroup>
+
+ <a:commandLink action="#{forumListHome.manage()}"
+ reRender="forumListPluginContainer, messageBoxContainer"
+ accesskey="#{messages['forum.button.ManageForums.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.ManageForums']}"/>
+ </a:commandLink>
+
+ </h:panelGroup>
+
+</s:fragment>
+
+<s:fragment rendered="#{forumListHome.managed}">
+ <script type="text/javascript">startSessionTimeoutCheck();</script>
+</s:fragment>
+
+<s:fragment rendered="#{forumListHome.managed and not forumHome.showForm}">
+
+ <h:panelGroup>
+
+ <a:commandLink action="#{forumHome.newForum()}"
+ reRender="forumListPluginContainer, messageBoxContainer"
+ accesskey="#{messages['forum.button.NewForum.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NewForum']}"/>
+ </a:commandLink>
+
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory)}"
+ accesskey="#{messages['forum.button.Exit.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.Exit']}"/>
+ </h:outputLink>
+
+ </h:panelGroup>
+
+</s:fragment>
+
+</h:form>
+
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListControls.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumList/forumListTable.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,149 @@
+<s:div id="forumListTableContainer"
+ styleClass="forumListTableContainer"
+ 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">
+
+<s:cache enabled="#{not forumListHome.managed and not identity.loggedIn}"
+ region="#{currentMacro.getCacheRegion('ForumList')}"
+ key="#{currentMacro.cacheKey}">
+
+<div class="box">
+<h:form id="forumListTableForm" rendered="#{not empty forumQuery.forums}">
+
+<h:dataTable id="forumListTable"
+ var="f"
+ value="#{forumQuery.forums}"
+ styleClass="datatable topBorder leftBorder"
+ headerClass="regularHeader rightBorder alignCenter smallFont"
+ columnClasses="onePercentColumn rightBorder bottomBorder alignCenter smallFont,
+ defaultColumn rightBorder bottomBorder alignLeft wrapWhitespace,
+ fivePercentColumn rightBorder bottomBorder alignCenter smallFont,
+ fivePercentColumn rightBorder bottomBorder alignCenter smallFont,
+ tenPercentColumn rightBorder bottomBorder alignCenter smallFont,
+ tenPercentColumn rightBorder bottomBorder alignCenter smallFont"
+ rowClasses="forumListRow"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <f:facet name="header"> </f:facet>
+ <h:panelGroup>
+
+ <h:outputLink styleClass="undecoratedLink" value="#{wikiURLRenderer.renderURL(f.forum)}" tabindex="1">
+ <h:graphicImage value="#{currentMacro.requestImagePath}/icon.posting_unread.gif" width="22" height="26"
+ rendered="#{f.unreadPostings}"/>
+
+ <h:graphicImage value="#{currentMacro.requestImagePath}/icon.posting.gif" width="22" height="26"
+ rendered="#{not f.unreadPostings}"/>
+ </h:outputLink>
+
+ <s:span styleClass="forumFeedLink undecoratedLink" rendered="#{not empty f.forum.feed}">
+ <h:outputLink value="#{wikiURLRenderer.renderFeedURL(f.forum.feed, null, null)}"
+ tabindex="1">
+ <h:graphicImage value="#{imagePath}/icon.atom.gif" width="18" height="18"/>
+ </h:outputLink>
+ </s:span>
+
+ <s:span styleClass="forumFeedLink" rendered="#{empty f.forum.feed}">
+ <h:graphicImage rendered="#{empty f.forum.feed}"
+ value="#{imagePath}/blank.gif" width="18" height="18"/>
+ </s:span>
+
+ </h:panelGroup>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">#{messages['forum.label.Forum']}</f:facet>
+ <s:div styleClass="undecoratedLink forumTitle extraLargeFont">
+ <h:outputLink styleClass="undecoratedLink" value="#{wikiURLRenderer.renderURL(f.forum)}" tabindex="1">
+ <h:outputText value="#{f.forum.name}"/>
+ </h:outputLink>
+ </s:div>
+ <s:div styleClass="forumDescription smallFont" rendered="#{not empty f.forum.description}">
+ <h:outputText value="#{f.forum.description}"/>
+ </s:div>
+ </h:column>
+
+ <h:column rendered="#{not forumListHome.managed}">
+ <f:facet name="header">#{messages['forum.label.TopicCount']}</f:facet>
+ <h:outputText value="#{f.totalNumOfTopics}"
+ rendered="#{not empty f.totalNumOfTopics}"/>
+ <h:outputText value="-" rendered="#{empty f.totalNumOfTopics}"/>
+ </h:column>
+
+ <h:column rendered="#{not forumListHome.managed}">
+ <f:facet name="header">#{messages['forum.label.PostCount']}</f:facet>
+ <h:outputText value="#{f.totalNumOfPosts}"
+ rendered="#{not empty f.totalNumOfPosts}"/>
+ <h:outputText value="-" rendered="#{empty f.totalNumOfPosts}"/>
+ </h:column>
+
+ <h:column rendered="#{not forumListHome.managed}">
+ <f:facet name="header">#{messages['forum.label.NewestTopic']}</f:facet>
+ <s:fragment rendered="#{not empty f.lastTopic}">
+ <ui:include src="lastTopicPost.xhtml">
+ <ui:param name="link" value="#{wikiURLRenderer.renderURL(f.lastTopic)}"/>
+ <ui:param name="name" value="#{f.lastTopic.name}"/>
+ <ui:param name="createdOn" value="#{f.lastTopic.createdOn}"/>
+ <ui:param name="createdBy" value="#{f.lastTopic.createdBy}"/>
+ <ui:param name="popupId" value="lastTopic#{f.lastTopic.id}"/>
+ <ui:param name="rightOffset" value="12%"/>
+ </ui:include>
+ </s:fragment>
+ <s:fragment rendered="#{empty f.lastTopic}">
+ -
+ </s:fragment>
+ </h:column>
+
+ <h:column rendered="#{not forumListHome.managed}">
+ <f:facet name="header">#{messages['forum.label.LatestPost']}</f:facet>
+ <s:fragment rendered="#{f.lastPostLastTopic}">
+ <ui:include src="lastTopicPost.xhtml">
+ <ui:param name="link" value="#{wikiURLRenderer.renderURL(f.lastTopic)}"/>
+ <ui:param name="name" value="#{f.lastTopic.name}"/>
+ <ui:param name="createdOn" value="#{f.lastTopic.createdOn}"/>
+ <ui:param name="createdBy" value="#{f.lastTopic.createdBy}"/>
+ <ui:param name="popupId" value="latestPost#{f.lastTopic.id}"/>
+ <ui:param name="rightOffset" value="1%"/>
+ </ui:include>
+ </s:fragment>
+ <s:fragment rendered="#{not empty f.lastComment and not f.lastPostLastTopic}">
+ <ui:include src="lastTopicPost.xhtml">
+ <ui:param name="link" value="#{wikiURLRenderer.renderURL(f.lastComment)}"/>
+ <ui:param name="name" value="#{f.lastComment.subject}"/>
+ <ui:param name="createdOn" value="#{f.lastComment.createdOn}"/>
+ <ui:param name="createdBy" value="#{f.lastComment.createdBy}"/>
+ <ui:param name="popupId" value="latestPost#{f.lastComment.id}"/>
+ <ui:param name="rightOffset" value="1%"/>
+ </ui:include>
+ </s:fragment>
+ <s:fragment rendered="#{empty f.lastComment and not f.lastPostLastTopic}">
+ -
+ </s:fragment>
+ </h:column>
+
+ <h:column rendered="#{forumListHome.managed and not forumHome.showForm}">
+
+ <a:commandLink action="#{forumHome.edit(f.forum.id)}"
+ reRender="forumListControlsContainer, forumListTable, forumFormContainer, messageBoxContainer"
+ tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['forum.button.Edit']}"/>
+ </a:commandLink>
+
+ </h:column>
+
+</h:dataTable>
+</h:form>
+</div>
+
+<s:div rendered="#{empty forumQuery.forums}" styleClass="box">
+ <h:outputText value="#{messages['forum.msg.NoForumsFound']}"/>
+</s:div>
+
+</s:cache>
+
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPosting.xhtml (from rev 7883, trunk/examples/wiki/view/plugins/forumPosting/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPosting.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPosting.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,18 @@
+<wiki:plugin id="forumPostingPlugin"
+ 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">
+
+ <ui:decorate template="forumPostingHeader.xhtml">
+ <ui:define name="subjectIcon">
+ <h:graphicImage value="#{currentMacro.requestImagePath}/icon.posting.gif"
+ width="22" height="26"/>
+ </ui:define>
+ </ui:decorate>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPosting.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,132 @@
+<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:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:panelGrid columns="2" styleClass="forumPostingHeaderInfoControls" columnClasses="forumPostingHeaderInfo, forumPostingHeaderControls"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}" styleClass="extraExtraLargeFont">
+ <h:outputText value="#{messages['forum.label.Forum']}: #{currentDirectory.name}"/>
+ </h:outputLink>
+
+ <h:panelGroup>
+
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.parent)}"
+ accesskey="#{messages['forum.button.ForumList.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.ForumList']}"/>
+ </h:outputLink>
+
+ <s:fragment rendered="#{empty topicPage or topicPage == 0}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}"
+ accesskey="#{messages['forum.button.TopicList.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.TopicList']}"/>
+ </h:outputLink>
+ </s:fragment>
+ <s:fragment rendered="#{topicPage > 0}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}/Page/#{topicPage}"
+ accesskey="#{messages['forum.button.TopicList.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.TopicList']}"/>
+ </h:outputLink>
+ </s:fragment>
+
+ <s:fragment rendered="#{s:hasPermission('Node', 'create', currentDirectory) and not replyHome.showForm}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.defaultFile)}?showTopicForm=true"
+ accesskey="#{messages['forum.button.NewTopic.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NewTopic']}"/>
+ </h:outputLink>
+ </s:fragment>
+
+ <!-- TODO: Fix these http://jira.jboss.com/jira/browse/JBSEAM-2633
+ <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.previous)}"
+ rendered="#{not empty docPager.previous and docPager.previous.id != currentDirectory.defaultFile.id}"
+ accesskey="#{messages['forum.button.PreviousPosting.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.PreviousPosting']}"/>
+ </h:outputLink>
+
+ <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.next)}"
+ rendered="#{not empty docPager.next and docPager.next.id != currentDirectory.defaultFile.id}"
+ accesskey="#{messages['forum.button.NextPosting.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NextPosting']}"/>
+ </h:outputLink>
+ -->
+
+ </h:panelGroup>
+
+ </h:panelGrid>
+
+ <h:outputText escape="false"
+ value="<div class='box forumPostingDocumentWrapper #{empty commentQuery.comments or not currentDocument.enableComments? 'noComments' : ''}'>"/>
+
+ <h:panelGrid columns="4" styleClass="commentHeader"
+ columnClasses="commentSubjectIcon, commentSubject, commentAuthorInfo smallFont, commentAuthorPortrait"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <s:fragment>
+ <ui:insert name="subjectIcon"/>
+ </s:fragment>
+
+ <s:div styleClass="undecoratedLink largeFont" rendered="#{currentDocument.name != c.subject}">
+ <h:outputLink styleClass="subjectLink" value="#{wikiURLRenderer.renderURL(currentDocument)}">
+ <h:outputText value="#{currentDocument.name}"/>
+ </h:outputLink>
+ </s:div>
+
+ <s:fragment>
+ <s:div>
+ <s:span styleClass="commentDate">
+ <h:outputText value="#{currentDocument.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ </s:span>
+ <h:outputText value=" | "/>
+ <s:span styleClass="commentLink undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(c)}">
+ <h:outputText value="#{messages['lacewiki.label.Link']}"/>
+ </h:outputLink>
+ </s:span>
+ </s:div>
+ <s:div rendered="#{currentDocument.ownedByRegularUser}">
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
+ <h:outputText value="#{currentDocument.createdBy.fullname}"/>
+ </h:outputLink>
+ </s:span>
+ <s:fragment rendered="#{wiki:showEmailAddress()}">
+ <h:outputText value=" | "/>
+ <h:outputLink value="#{wiki:escapeEmailURL(wiki:concat('mailto:', currentDocument.createdBy.email))}">
+ <h:outputText value="#{wiki:escapeAtSymbol(currentDocument.createdBy.email)}"/>
+ </h:outputLink>
+ </s:fragment>
+ </s:div>
+ <s:div rendered="#{not currentDocument.ownedByRegularUser}">
+ <h:outputText value="#{currentDocument.createdBy.fullname}"/>
+ </s:div>
+ </s:fragment>
+
+ <s:fragment rendered="#{currentDocument.ownedByRegularUser and !empty currentDocument.createdBy.profile.imageContentType}">
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
+ <s:graphicImage styleClass="commentAuthorPortraitImage" value="#{currentDocument.createdBy.profile.image}">
+ <s:transformImageSize width="30" maintainRatio="true"/>
+ </s:graphicImage>
+ </h:outputLink>
+ </s:span>
+ </s:fragment>
+
+ </h:panelGrid>
+
+ <!-- The forumPostingDocumentWrapper <div> stays open! -->
+
+</s:fragment>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml (from rev 7884, trunk/examples/wiki/view/plugins/forumReplies/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,176 @@
+<wiki:plugin id="forumRepliesPlugin"
+ 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">
+
+
+ <!-- The forumPostingDocumentWrapper <div> is open! -->
+
+ <s:div styleClass="commentSignature"
+ rendered="#{not empty currentDocument.createdBy.profile.signature and not empty currentDocument.areaNumber}">
+ <s:div styleClass="commentSignatureSeparator">
+ <h:outputText value=" "/>
+ </s:div>
+ <wiki:formattedText value="#{currentDocument.createdBy.profile.signature}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="regularLink"
+ thumbnailLinkStyleClass="regularLink"
+ linkBaseFile="#{currentDocument}"
+ currentAreaNumber="#{currentDocument.areaNumber}"
+ enableMacroRendering="false"/>
+ </s:div>
+
+ <s:div rendered="#{not empty currentDocument.tags}"
+ styleClass="documentTags undecoratedLink smallFont">
+ <s:div>
+ #{messages['lacewiki.label.docDisplay.Tags']}: 
+ <ui:repeat var="tag" value="#{currentDocument.tagsAsList}">
+ <h:outputLink value="#{wikiURLRenderer.renderTagURL(tag)}">
+ <h:outputText value="#{tag}"/>
+ </h:outputLink>
+ <h:outputText rendered="#{not wiki:isLastItemInList(currentDocument.tagsAsList, tag)}" value=" | "/>
+ </ui:repeat>
+ </s:div>
+ </s:div>
+
+ <s:div id="forumPostingControls" styleClass="forumPostingControls">
+
+ <h:panelGroup rendered="#{not replyHome.showForm and replyHome.isPersistAllowed(null,null)}">
+
+ <s:link tabindex="1" propagation="none"
+ action="#{replyHome.replyToDocument()}"
+ accesskey="#{messages['forum.button.Reply.accesskey']}"
+ styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.Reply']}"/>
+ </s:link>
+
+ <s:link tabindex="1" propagation="none"
+ action="#{replyHome.quoteDocument()}"
+ styleClass="buttonNonpersistent"
+ accesskey="#{messages['forum.button.Quote.accesskey']}">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.Quote']}"/>
+ </s:link>
+
+ </h:panelGroup>
+
+ </s:div>
+
+ <!-- The forumPostingDocumentWrapper <div> is closed here! -->
+ <h:outputText escape="false" value="</div>"/>
+
+ <s:div id="forumRepliesContainer">
+
+ <s:fragment rendered="#{currentDocument.enableComments}">
+
+ <ui:decorate template="/includes/commentsDisplay.xhtml">
+ <ui:param name="titleSingular" value="#{messages['forum.label.Reply']}"/>
+ <ui:param name="titlePlural" value="#{messages['forum.label.Replies']}"/>
+ <ui:define name="controls">
+
+ <h:panelGrid columns="2" styleClass="forumReplyControls"
+ columnClasses="forumReplyRating, forumReplyControl"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <s:fragment>
+
+ <s:fragment rendered="#{not replyHome.showForm
+ and c.rating == 0
+ and not currentUser.guest
+ and c.createdBy.id != currentUser.id
+ and currentDocument.createdBy.id == currentUser.id}">
+
+ <h:panelGrid columns="7" styleClass="commentRatingChooser"
+ columnClasses="label, star, star, star, star, star, star"
+ border="0" cellpadding="0" cellspacing="0">
+ <h:outputText styleClass="smallFont" value="#{messages['lacewiki.label.comment.RateThisPosting']}: "/>
+ <c:forEach begin="1" var="r" end="5">
+ <a:commandLink action="#{replyHome.rate(c.id, r)}"
+ reRender="comments, messageBoxContainer"
+ status="globalStatus">
+ <h:graphicImage styleClass="item#{c.id}-rate#{r}"
+ onmouseover="highlightStars('#{c.id}', '5', '#{r}')"
+ onmouseout="highlightStars('#{c.id}', '5', '0')"
+ value="#{imagePath}/star_grey.gif"
+ alt="*"
+ width="16" height="16"/>
+ </a:commandLink>
+ </c:forEach>
+ </h:panelGrid>
+ </s:fragment>
+
+ <s:fragment rendered="#{c.rating > 0}">
+ <h:panelGrid columns="#{c.rating + 1}" styleClass="commentRating"
+ columnClasses="label, star, star, star, star, star, star"
+ border="0" cellpadding="0" cellspacing="0">
+ <h:outputText styleClass="smallFont" value="#{messages['lacewiki.label.comment.Rating']}: "/>
+ <c:forEach begin="1" var="r" end="#{c.rating}">
+ <h:graphicImage value="#{imagePath}/star.gif"
+ width="16" height="16" alt="*"/>
+ </c:forEach>
+ </h:panelGrid>
+ </s:fragment>
+
+ </s:fragment>
+
+ <s:fragment>
+
+ <s:fragment rendered="#{not replyHome.showForm and replyHome.isPersistAllowed(null,null)}">
+
+ <s:link tabindex="102" propagation="none"
+ action="#{replyHome.replyTo()}"
+ styleClass="buttonNonpersistent">
+ <f:param name="parentCommentId" value="#{c.id}"/>
+ <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.commentsDisplay.ReplyTo']}"/>
+ </s:link>
+
+ <s:link tabindex="102" propagation="none"
+ action="#{replyHome.quote()}"
+ styleClass="buttonNonpersistent">
+ <f:param name="parentCommentId" value="#{c.id}"/>
+ <h:outputText styleClass="buttonLabel" value="#{messages['lacewiki.button.commentsDisplay.Quote']}"/>
+ </s:link>
+
+ </s:fragment>
+
+ <s:fragment rendered="#{s:hasPermission('Comment', 'delete', currentDocument) and not replyHome.showForm}">
+ <ui:decorate template="/includes/confirmationAction.xhtml">
+ <ui:param name="label" value="#{messages['lacewiki.button.commentsDisplay.RemoveComment']}"/>
+ <ui:param name="jsFunctionName" value="deleteReplyId#{c.id}"/>
+ <ui:param name="message" value="#{messages['lacewiki.label.AreYouSureYouWantToDelete']
+ .concat(' ')
+ .concat(messages['lacewiki.label.commentsDisplay.CommentThread'])
+ .concat(': \'')
+ .concat(c.subject)
+ .concat('\'?')}"/>
+ <ui:define name="jsFunction">
+ <a:jsFunction name="#{jsFunctionName}"
+ reRender="forumRepliesContainer, messageBoxContainer"
+ action="#{replyHome.remove(c.id)}"
+ oncomplete="onAjaxRequestComplete()"
+ status="globalStatus"/>
+ </ui:define>
+ </ui:decorate>
+ </s:fragment>
+
+ </s:fragment>
+
+ </h:panelGrid>
+
+ </ui:define>
+ </ui:decorate>
+
+ <ui:include src="replyForm.xhtml">
+ <ui:param name="home" value="#{replyHome}"/>
+ </ui:include>
+
+ </s:fragment>
+
+ </s:div>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumStickyPosting.xhtml (from rev 7883, trunk/examples/wiki/view/plugins/forumStickyPosting/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumStickyPosting.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumStickyPosting.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,18 @@
+<wiki:plugin id="forumStickyPostingPlugin"
+ 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">
+
+ <ui:decorate template="forumPostingHeader.xhtml">
+ <ui:define name="subjectIcon">
+ <h:graphicImage value="#{currentMacro.requestImagePath}/icon.posting_sticky.gif"
+ width="22" height="26"/>
+ </ui:define>
+ </ui:decorate>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumStickyPosting.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumTopPosters/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,83 @@
+<wiki:plugin
+ 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:cache key="#{currentMacro.cacheKey}"
+ region="#{currentMacro.getCacheRegion('TopPostersList')}">
+
+ <s:div styleClass="forumTopPosters box">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('ForumTopPosters', currentMacro).title}"/>
+ </s:div>
+
+ <div class="boxContent">
+
+ <h:dataTable value="#{forumQuery.getTopPosters(currentMacro)}" var="p"
+ rendered="#{not empty forumQuery.getTopPosters(currentMacro) and forumQuery.getTopPosters(currentMacro).size() > 0}"
+ styleClass="datatable forumTopPostersTable"
+ headerClass="alignCenter"
+ columnClasses="fifteenPercentColumn alignCenter indexColumn,
+ defaultColumn alignCenter nameColumn,
+ twentyPercentColumn alignCenter joinedOnColumn,
+ twentyPercentColumn alignCenter ratingPointsColumn"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.Position']}"/>
+ </f:facet>
+ <h:outputText value="#{forumQuery.getTopPosters(currentMacro).indexOf(p)+1}."/>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.User']}"/>
+ </f:facet>
+ <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{p}"/>
+ </ui:include>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.JoinedOn']}"/>
+ </f:facet>
+ <h:outputText value="#{p.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.RatingPoints']}"/>
+ </f:facet>
+ <h:outputText value="#{p.ratingPoints}"/>
+ </h:column>
+
+ </h:dataTable>
+
+ </div>
+
+ <s:div styleClass="forumTopPostersEmpty"
+ rendered="#{empty forumQuery.getTopPosters(currentMacro) or forumQuery.getTopPosters(currentMacro).size() == 0}">
+ <h:outputText value="#{messages['forum.topPosterslabel.NoPostersFound']}"/>
+ </s:div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</s:cache>
+
+</wiki:plugin>
+
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopics.xhtml (from rev 7883, trunk/examples/wiki/view/plugins/forumTopics/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopics.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopics.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,20 @@
+<wiki:plugin id="forumTopicsPlugin"
+ 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:s="http://jboss.com/products/seam/taglib">
+
+ <s:span id="forumTopicsPluginContainer">
+
+ <ui:include src="topicControls.xhtml"/>
+
+ <ui:include src="topicForm.xhtml"/>
+
+ <ui:include src="topicTable.xhtml"/>
+
+ </s:span>
+
+</wiki:plugin>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopics.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumList/lastTopicPost.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,28 @@
+<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>
+ <h:outputLink value="#{link}" tabindex="1">
+ <h:outputText value="#{wiki:truncateString(name, 15, '...')}"/>
+ <h:graphicImage styleClass="topicGotoIcon" value="#{currentMacro.requestImagePath}/icon.posting_goto.gif" width="18" height="9"/>
+ </h:outputLink>
+ </s:div>
+
+ <s:div>
+ <h:outputText value="#{createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ </s:div>
+
+ <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{createdBy}"/>
+ </ui:include>
+
+</s:fragment>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/replyForm.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumReplies/replyForm.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/replyForm.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/replyForm.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,141 @@
+<s:div id="replyFormContainer"
+ styleClass="replyFormContainer"
+ 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">
+
+<script type="text/javascript">
+ function scrollToCommentForm() {
+ window.scrollTo(0, jQuery('#forumRepliesPlugin\\:replyForm').offset().top)
+ jQuery("#forumRepliesPlugin\\:replyForm\\:replyTextArea").focus();
+ }
+</script>
+
+<s:fragment rendered="#{replyHome.showForm}">
+ <script type="text/javascript">jQuery(function () {scrollToCommentForm(); })</script>
+ <script type="text/javascript">startSessionTimeoutCheck();</script>
+</s:fragment>
+
+<s:fragment rendered="#{not replyHome.showForm}">
+ <script type="text/javascript">stopSessionTimeoutCheck();</script>
+</s:fragment>
+
+<s:fragment rendered="#{s:hasPermission('Node', 'create', currentDirectory) and replyHome.showForm}">
+
+ <div class="box">
+
+ <h:form id="replyForm">
+ <div class="form">
+
+ <div class="formHead bottomBorder">
+ <h:outputText value="#{messages['forum.label.NewReply']}"/>
+ </div>
+
+ <a:region>
+ <s:div rendered="#{replyHome.showForm}"
+ styleClass="formFields formBorder #{replyHome.instance.ownedByRegularUser ? '' : 'wideLabels'}">
+
+ <s:fragment rendered="#{not replyHome.instance.ownedByRegularUser}">
+ <a:region>
+ <s:decorate id="userNameDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['forum.label.replyForm.Name']}</ui:define>
+ <h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="100" required="true"
+ id="userName" value="#{replyHome.instance.fromUserName}">
+ <a:support status="globalStatus" event="onchange" reRender="userNameDecorate" oncomplete="onAjaxRequestComplete()"/>
+ </h:inputText>
+ </s:decorate>
+ </a:region>
+
+ <s:decorate id="userEmailDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['forum.label.replyForm.Email']}</ui:define>
+ <h:inputText tabindex="1" size="40" maxlength="255" required="false"
+ id="userEmail" value="#{replyHome.instance.fromUserEmail}">
+ </h:inputText>
+ </s:decorate>
+
+ <s:decorate id="userHomepageDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['forum.label.replyForm.Homepage']}</ui:define>
+ <h:inputText tabindex="1" size="40" maxlength="1000" required="false"
+ id="userHomepage" value="#{replyHome.instance.fromUserHomepage}">
+ </h:inputText>
+ </s:decorate>
+ </s:fragment>
+
+ <s:decorate id="subjectDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['forum.label.replyForm.Subject']}</ui:define>
+ <h:inputText styleClass="ajaxSupport" tabindex="1" size="40" maxlength="255" required="true"
+ id="subject" value="#{replyHome.instance.subject}">
+ <a:support status="globalStatus" event="onchange" reRender="subjectDecorate" oncomplete="onAjaxRequestComplete()"/>
+ </h:inputText>
+ </s:decorate>
+
+ <a:region>
+ <ui:include src="/includes/wikiTextEditor.xhtml">
+ <ui:param name="textEditorId" value="reply"/>
+ <ui:param name="textPreviewId" value="replyPreview"/>
+ <ui:param name="namingContainer" value="forumRepliesPlugin\\\\:replyForm"/>
+ <ui:param name="label" value="#{messages['forum.label.replyForm.Message']}"/>
+ <ui:param name="valueBinding" value="#{replyHome.instance.content}"/>
+ <ui:param name="valueMaxLength" value="32767"/>
+ <ui:param name="valueRequired" value="true"/>
+ <ui:param name="textEditorColumns" value="#{replyHome.instance.ownedByRegularUser ? '65' : '55'}"/>
+ <ui:param name="textEditorRows" value="20"/>
+ </ui:include>
+
+ <ui:include src="/includes/wikiTextPreview.xhtml">
+ <ui:param name="textPreviewId" value="replyPreview"/>
+ <ui:param name="valueBinding" value="#{replyHome.instance.content}"/>
+ <ui:param name="baseDocument" value="#{currentDocument}"/>
+ <ui:param name="baseDirectory" value="#{currentDocument.parent}"/>
+ </ui:include>
+ </a:region>
+
+ <s:decorate id="verifyCaptchaEntry" template="/includes/captchaEntry.xhtml">
+ <ui:param name="rendered" value="#{!identity.loggedIn}"/>
+ </s:decorate>
+
+ </s:div>
+
+ <s:div rendered="#{replyHome.showForm}"
+ styleClass="formControls #{replyHome.instance.ownedByRegularUser ? '' : 'wideLabels'}">
+ <div class="entry">
+ <div class="label"> </div>
+ <div class="input">
+
+ <a:commandLink id="post"
+ action="#{replyHome.persist}" tabindex="1"
+ reRender="documentDisplay"
+ status="globalStatus"
+ eventsQueue="ajaxEventQueue"
+ oncomplete="onAjaxRequestComplete()"
+ styleClass="button sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['forum.button.SaveNoKey']}"/>
+ </a:commandLink>
+
+ <a:commandLink action="#{replyHome.cancel}" tabindex="1"
+ reRender="documentDisplay"
+ immediate="true"
+ status="globalStatus"
+ eventsQueue="ajaxEventQueue"
+ oncomplete="onAjaxRequestComplete()"
+ styleClass="buttonNonpersistent sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['forum.button.CancelNoKey']}"/>
+ </a:commandLink>
+
+ </div>
+ </div>
+ </s:div>
+
+ </a:region>
+
+ </div>
+ </h:form>
+
+ </div>
+
+</s:fragment>
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/replyForm.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicControls.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumTopics/topicControls.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicControls.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicControls.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,57 @@
+<s:div id="topicControlsContainer"
+ styleClass="topicControlsContainer"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<s:fragment rendered="#{topicHome.showForm}">
+ <script type="text/javascript">startSessionTimeoutCheck();</script>
+</s:fragment>
+
+<s:fragment rendered="#{not topicHome.showForm}">
+
+ <script type="text/javascript">stopSessionTimeoutCheck();</script>
+
+ <s:div styleClass="forumsFeedLink undecoratedLink" rendered="#{not empty currentDirectory.feed}">
+ <h:outputLink value="#{wikiURLRenderer.renderFeedURL(currentDirectory.feed, null, null)}"
+ tabindex="1">
+ <h:graphicImage value="#{imagePath}/icon.atom.gif" width="18" height="18"/>
+ <h:outputText value="#{currentDocument.name} #{messages['forum.label.Feed']}"/>
+ </h:outputLink>
+ </s:div>
+
+ <h:panelGrid columns="2" styleClass="forumDescriptionTopicControls"
+ columnClasses="forumDescription, topicControls"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputText value="#{currentDirectory.description}"/>
+
+ <h:form>
+ <h:panelGroup>
+
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDirectory.parent)}"
+ accesskey="#{messages['forum.button.ForumList.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.ForumList']}"/>
+ </h:outputLink>
+
+ <s:fragment rendered="#{s:hasPermission('Node', 'create', currentDirectory)}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}?showTopicForm=true"
+ accesskey="#{messages['forum.button.NewTopic.accesskey']}"
+ tabindex="1" styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NewTopic']}"/>
+ </h:outputLink>
+ </s:fragment>
+
+ </h:panelGroup>
+ </h:form>
+
+ </h:panelGrid>
+
+</s:fragment>
+
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicControls.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicForm.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumTopics/topicForm.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicForm.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicForm.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,125 @@
+<s:div id="topicFormContainer"
+ styleClass="topicFormContainer"
+ 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">
+
+<s:fragment rendered="#{s:hasPermission('Node', 'create', currentDirectory) and topicHome.showForm}">
+
+ <div class="box">
+
+ <h:form id="topicForm">
+ <div class="form">
+
+ <div class="formHead">
+ <h:outputText value="#{messages['forum.label.NewTopic']}"/>
+ </div>
+
+ <a:region>
+ <s:div styleClass="formFields formBorder">
+
+ <s:decorate id="nameDecorate" template="/includes/formFieldDecorate.xhtml">
+ <ui:define name="label">#{messages['forum.label.Subject']}</ui:define>
+ <h:inputText id="topicName" tabindex="1" size="60" maxlength="255" required="true" value="#{topicHome.instance.name}"/>
+ </s:decorate>
+
+ <a:region>
+ <ui:include src="/includes/wikiTextEditor.xhtml">
+ <ui:param name="textEditorId" value="topic"/>
+ <ui:param name="textPreviewId" value="topicPreview"/>
+ <ui:param name="namingContainer" value="forumTopicsPlugin\\\\:topicForm"/>
+ <ui:param name="label" value="#{messages['forum.label.Message']}"/>
+ <ui:param name="valueBinding" value="#{topicHome.formContent}"/>
+ <ui:param name="valueMaxLength" value="32767"/>
+ <ui:param name="valueRequired" value="true"/>
+ <ui:param name="textEditorColumns" value="60"/>
+ <ui:param name="textEditorRows" value="20"/>
+ </ui:include>
+
+ <s:div styleClass="marginLeft">
+ <ui:include src="/includes/wikiTextPreview.xhtml">
+ <ui:param name="textPreviewId" value="topicPreview"/>
+ <ui:param name="valueBinding" value="#{topicHome.instance.content}"/>
+ <ui:param name="baseDocument" value="#{topicHome.instance}"/>
+ <ui:param name="baseDirectory" value="#{currentDirectory}"/>
+ </ui:include>
+ </s:div>
+ </a:region>
+
+ <s:fragment rendered="#{s:hasPermission('User', 'isAdmin', currentUser)}">
+ <s:div styleClass="entry">
+ <div class="label">
+ <div class="label"> </div>
+ </div>
+ <div class="input">
+ <h:selectBooleanCheckbox value="#{topicHome.sticky}" tabindex="1"/>
+ <h:outputText value="#{messages['forum.label.StickyPosting']}"/>
+ </div>
+ </s:div>
+
+ <s:div styleClass="entry">
+ <div class="label"> </div>
+ <div class="input">
+ <h:selectBooleanCheckbox value="#{topicHome.instance.enableCommentForm}" tabindex="1"/>
+ <h:outputText value="#{messages['forum.label.OpenTopicAllowReplies']}"/>
+ </div>
+ </s:div>
+ </s:fragment>
+
+ <s:div styleClass="entry" rendered="#{not currentUser.guest and not currentUser.admin}">
+ <div class="label"> </div>
+ <div class="input">
+ <h:selectBooleanCheckbox value="#{topicHome.notifyReplies}" tabindex="1"/>
+ <h:outputText value="#{messages['forum.label.NotifyMeOfReplies']}"/>
+ </div>
+ </s:div>
+
+ <ui:include src="/includes/tagEditor.xhtml">
+ <ui:param name="editor" value="#{topicHome.tagEditor}"/>
+ </ui:include>
+
+ <s:decorate id="verifyCaptchaEntry" template="/includes/captchaEntry.xhtml">
+ <ui:param name="rendered" value="#{!identity.loggedIn}"/>
+ </s:decorate>
+
+ </s:div>
+
+ <div class="formControls">
+ <div class="entry">
+ <div class="label"> </div>
+ <div class="input">
+
+ <a:commandLink id="save" action="#{topicHome.persist}"
+ eventsQueue="ajaxEventQueue"
+ reRender="forumTopicsPluginContainer, messageBoxContainer"
+ status="globalStatus"
+ tabindex="1"
+ styleClass="button saveButton sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['forum.button.SaveNoKey']}"/>
+ </a:commandLink>
+
+ <a:commandLink action="#{topicHome.cancel}"
+ immediate="true"
+ status="globalStatus"
+ eventsQueue="ajaxEventQueue"
+ tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
+ <h:outputText styleClass="buttonLabel" value="#{messages['forum.button.CancelNoKey']}"/>
+ </a:commandLink>
+
+ </div>
+ </div>
+ </div>
+
+ </a:region>
+
+ </div>
+ </h:form>
+
+ </div>
+
+</s:fragment>
+</s:div>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicForm.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumTopics/topicPager.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,51 @@
+<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">
+
+ <h:panelGrid columns="5" rendered="#{not empty forumQuery.topics}"
+ styleClass="topicPagerTable"
+ columnClasses="topicPagerColumn, topicPagerColumn, topicPagerTextColumn, topicPagerColumn, topicPagerColumn, "
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:outputLink rendered="#{forumQuery.pager.previousPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}">
+ <h:graphicImage value="#{imagePath}/page.first.gif" width="13" height="11"/>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!forumQuery.pager.previousPageAvailable}"/>
+
+ <h:outputLink rendered="#{forumQuery.pager.previousPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}/Page/#{forumQuery.pager.previousPage}">
+ <h:graphicImage value="#{imagePath}/page.previous.gif" width="13" height="11"/>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!forumQuery.pager.previousPageAvailable}"/>
+
+ <s:span>
+ <h:outputText value="#{messages['forum.label.Showing']}
+ #{forumQuery.pager.firstRecord} #{messages['forum.label.To']}
+ #{forumQuery.pager.lastRecord} #{messages['forum.label.Of']}
+ #{forumQuery.pager.numOfRecords} #{messages['forum.label.Topics']}"/>
+ </s:span>
+
+ <h:outputLink rendered="#{forumQuery.pager.nextPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}/Page/#{forumQuery.pager.nextPage}">
+ <h:graphicImage value="#{imagePath}/page.next.gif" width="13" height="11"/>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!forumQuery.pager.nextPageAvailable}"/>
+
+ <h:outputLink rendered="#{forumQuery.pager.nextPageAvailable}" target="_top"
+ value="#{wikiURLRenderer.renderURL(currentDocument)}/Page/#{forumQuery.pager.lastPage}">
+ <h:graphicImage value="#{imagePath}/page.last.gif" width="13" height="11"/>
+ </h:outputLink>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
+ rendered="#{!forumQuery.pager.nextPageAvailable}"/>
+
+ </h:panelGrid>
+
+</s:fragment>
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/forumTopics/topicTable.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,105 @@
+<s:div id="topicTableContainer"
+ styleClass="topicFormContainer"
+ 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">
+
+<s:cache rendered="#{not topicHome.showForm}"
+ enabled="#{not identity.loggedIn}"
+ region="#{currentMacro.getCacheRegion('TopicList')}"
+ key="#{currentMacro.getCacheKey(param.page)}">
+
+ <ui:include src="topicPager.xhtml"/>
+
+ <div class="box">
+
+ <h:dataTable id="topicTable"
+ var="t"
+ value="#{forumQuery.topics}"
+ rendered="#{not empty forumQuery.topics}"
+ styleClass="datatable topLeftBottomBorder topicTable"
+ headerClass="regularHeader rightBorder alignCenter smallFont"
+ columnClasses="onePercentColumn rightBorder alignCenter smallFont, defaultColumn rightBorder alignLeft wrapWhitespace,
+ onePercentColumn rightBorder alignCenter smallFont, fivePercentColumn rightBorder alignCenter smallFont,
+ tenPercentColumn rightBorder alignCenter smallFont"
+ rowClasses="rowOdd,rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <f:facet name="header"> </f:facet>
+ <h:graphicImage value="#{currentMacro.requestImagePath}/icon.#{t.iconName}.gif" width="22" height="26"/>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">Topic</f:facet>
+
+ <h:outputLink value="#{wikiURLRenderer.renderURL(t.topic)}" tabindex="1">
+ <h:outputText value="#{wiki:truncateString(t.topic.name, 60, '...')}"/>
+ </h:outputLink>
+
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">Replies</f:facet>
+ <h:outputText value="#{t.numOfReplies}" rendered="#{t.numOfReplies != 0}"/>
+ <h:outputText value="-" rendered="#{t.numOfReplies == 0}"/>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">Author</f:facet>
+
+ <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{t.topic.createdBy}"/>
+ </ui:include>
+
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">Last Post</f:facet>
+
+ <s:fragment rendered="#{not empty t.lastComment}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(t.lastComment)}" tabindex="1">
+ <h:outputText value="#{t.lastComment.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:graphicImage styleClass="topicGotoIcon" value="#{currentMacro.requestImagePath}/icon.posting_goto.gif" width="18" height="9"/>
+ </h:outputLink>
+
+ <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{t.lastComment.createdBy}"/>
+ </ui:include>
+
+ </s:fragment>
+
+ <s:fragment rendered="#{empty t.lastComment}">
+ <h:outputLink value="#{wikiURLRenderer.renderURL(t.topic)}" tabindex="1">
+ <h:outputText value="#{t.topic.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:graphicImage styleClass="topicGotoIcon" value="#{currentMacro.requestImagePath}/icon.posting_goto.gif" width="18" height="9"/>
+ </h:outputLink>
+
+ <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{t.topic.createdBy}"/>
+ </ui:include>
+
+ </s:fragment>
+ </h:column>
+
+ </h:dataTable>
+
+ </div>
+
+ <s:div rendered="#{empty forumQuery.topics}" styleClass="box">
+ No topics in this forum.
+ </s:div>
+
+ <ui:include src="topicPager.xhtml"/>
+
+</s:cache>
+
+</s:div>
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumList.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/forumList.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumList.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,47 @@
+.forumListControlsContainer {
+ text-align: right;
+ white-space: nowrap;
+ margin-bottom: 15px;
+}
+
+.forumListTableContainer {
+}
+
+.forumFormContainer {
+ margin-bottom: 20px;
+}
+
+.forumTitle {
+ font-weight: normal;
+ line-height: 160%;
+}
+
+.forumDescription {
+ white-space: normal;
+}
+
+.topicGotoIcon {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.forumsFeedLink {
+ margin: 10px;
+ float: right;
+ margin-top: -30px;
+}
+
+.forumsFeedLink img {
+ vertical-align: middle;
+ margin-right: 5px;
+}
+
+.forumFeedLink {
+
+}
+
+.forumFeedLink img {
+ margin-left: 8px;
+ margin-right: 8px;
+ margin-bottom: 2px;
+}
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumList.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumPosting.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/forumPosting.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumPosting.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,40 @@
+.forumPostingHeaderInfoControls {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.forumPostingHeaderInfo {
+ text-align: left;
+}
+
+.forumPostingHeaderControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingDocumentWrapper {
+ border-left: 1px solid #C3BBB6;
+ border-right: 1px solid #C3BBB6;
+ border-top: 1px solid #C3BBB6;
+ padding: 5px;
+}
+
+.forumPostingDocumentWrapper .subjectLink {
+ margin-left: 10px;
+ font-weight: normal;
+ line-height: 100%;
+}
+
+.forumPostingDocumentWrapper .subjectIcon {
+ vertical-align: text-top;
+}
+
+.noComments {
+ border-bottom: 1px solid #C3BBB6;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumPosting.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumReplies.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/forumReplies.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumReplies.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumReplies.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,16 @@
+.forumReplyControls {
+ width: 100%;
+}
+
+.forumReplyRating {
+ text-align: left;
+}
+
+.forumReplyStatus {
+ text-align: right;
+}
+
+.forumReplyControl {
+ text-align: right;
+ width: 200px;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumReplies.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumStickyPosting.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/forumStickyPosting.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumStickyPosting.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumStickyPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,40 @@
+.forumPostingHeaderInfoControls {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.forumPostingHeaderInfo {
+ text-align: left;
+}
+
+.forumPostingHeaderControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingDocumentWrapper {
+ border-left: 1px solid #C3BBB6;
+ border-right: 1px solid #C3BBB6;
+ border-top: 1px solid #C3BBB6;
+ padding: 5px;
+}
+
+.forumPostingDocumentWrapper .subjectLink {
+ margin-left: 10px;
+ font-weight: normal;
+ line-height: 100%;
+}
+
+.forumPostingDocumentWrapper .subjectIcon {
+ vertical-align: text-top;
+}
+
+.noComments {
+ border-bottom: 1px solid #C3BBB6;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumStickyPosting.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumTopics.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/forumTopics.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumTopics.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumTopics.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,60 @@
+.forumDescriptionTopicControls {
+ width: 100%;
+}
+
+.forumDescription {
+}
+
+.topicControls {
+ text-align: right;
+ white-space: nowrap;
+ padding-left: 10px;
+}
+
+.topicFormContainer {
+}
+
+.topicTableContainer {
+}
+
+.topicPager {
+ width: 100%;
+}
+
+.topicPagerTable {
+ width: 100%;
+ font-weight: bold;
+ padding: 0;
+ margin: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border: 0;
+ text-align: center;
+}
+
+.topicPagerColumn {
+ width: 10%;
+}
+.topicPagerTextColumn {
+ width: 60%;
+}
+
+.topicGotoIcon {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.forumsFeedLink {
+ margin: 10px;
+ float: right;
+ margin-top: -30px;
+}
+
+.forumsFeedLink img {
+ vertical-align: middle;
+ margin-right: 5px;
+}
+
+.forumDescription {
+ text-align: left;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/css/forumTopics.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.posting.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_goto.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.posting_goto.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_goto.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_locked.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.posting_locked.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_locked.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_locked_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.posting_locked_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_locked_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_sticky.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.posting_sticky.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_sticky.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_sticky_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.posting_sticky_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_sticky_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.posting_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/img/icon.posting_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumList.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/forumList.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumList.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,55 @@
+.forumListControlsContainer {
+ text-align: right;
+ white-space: nowrap;
+ margin-bottom: 15px;
+}
+
+.forumListTableContainer {
+}
+
+.forumListRow td {
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+.forumFormContainer {
+ margin-bottom: 20px;
+}
+
+.forumTitle {
+ font-weight: bold;
+}
+
+.forumDescription {
+ white-space: normal;
+}
+
+.topicGotoIcon {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.forumsFeedLink {
+ margin: 10px;
+ float: right;
+ margin-top: -35px;
+}
+
+.forumsFeedLink img {
+ vertical-align: middle;
+ margin-right: 5px;
+}
+
+.forumFeedLink {
+
+}
+
+.forumFeedLink img {
+ margin-left: 8px;
+ margin-right: 8px;
+ margin-bottom: 2px;
+}
+
+.userInfoPopupContainer {
+ text-align: left;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumPosting.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/forumPosting.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumPosting.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,37 @@
+.forumPostingHeaderInfoControls {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.forumPostingHeaderInfo {
+ text-align: left;
+}
+
+.forumPostingHeaderControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingDocumentWrapper {
+ padding: 5px;
+}
+
+.forumPostingDocumentWrapper .subjectLink {
+ margin-left: 10px;
+ font-weight: normal;
+ line-height: 100%;
+}
+
+.forumPostingDocumentWrapper .subjectIcon {
+ vertical-align: text-top;
+}
+
+.noComments {
+ border-bottom: 1px solid #C3BBB6;
+}
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumReplies.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/forumReplies.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumReplies.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumReplies.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,24 @@
+#forumRepliesPlugin\:forumRepliesContainer .commentsDisplay {
+ margin-top: 15px;
+}
+
+#forumRepliesPlugin\:forumRepliesContainer .commentsDisplay .boxShadowed {
+ padding-bottom: 15px;
+}
+
+.forumReplyControls {
+ width: 100%;
+}
+
+.forumReplyRating {
+ text-align: left;
+}
+
+.forumReplyStatus {
+ text-align: right;
+}
+
+.forumReplyControl {
+ text-align: right;
+ width: 200px;
+}
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumStickyPosting.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/forumStickyPosting.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumStickyPosting.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumStickyPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,37 @@
+.forumPostingHeaderInfoControls {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.forumPostingHeaderInfo {
+ text-align: left;
+}
+
+.forumPostingHeaderControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingDocumentWrapper {
+ padding: 5px;
+}
+
+.forumPostingDocumentWrapper .subjectLink {
+ margin-left: 10px;
+ font-weight: normal;
+ line-height: 100%;
+}
+
+.forumPostingDocumentWrapper .subjectIcon {
+ vertical-align: text-top;
+}
+
+.noComments {
+ border-bottom: 1px solid #C3BBB6;
+}
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumTopics.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/forumTopics.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumTopics.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/css/forumTopics.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,61 @@
+.forumDescriptionTopicControls {
+ width: 100%;
+}
+
+.forumDescription {
+}
+
+.topicControls {
+ text-align: right;
+ white-space: nowrap;
+ padding-left: 10px;
+}
+
+.topicFormContainer {
+}
+
+.topicTableContainer {
+}
+
+.topicPager {
+ width: 100%;
+}
+
+.topicPagerTable {
+ width: 100%;
+ font-weight: bold;
+ padding: 0;
+ margin: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border: 0;
+ text-align: center;
+}
+
+.topicPagerColumn {
+ width: 10%;
+}
+.topicPagerTextColumn {
+ width: 60%;
+}
+
+.topicGotoIcon {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.forumsFeedLink {
+ margin: 10px;
+ float: right;
+ margin-top: -35px;
+
+}
+
+.forumsFeedLink img {
+ vertical-align: middle;
+ margin-right: 5px;
+}
+
+.forumDescription {
+ text-align: left;
+}
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.posting.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_goto.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_goto.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_goto.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_locked.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_locked.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_locked.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_locked_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_locked_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_locked_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_sticky.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_sticky.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_sticky.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_sticky_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_sticky_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_sticky_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/img/icon.posting_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumList.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/forumList.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumList.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,48 @@
+.forumListControlsContainer {
+ text-align: right;
+ white-space: nowrap;
+ margin-bottom: 15px;
+}
+
+.forumListTableContainer {
+}
+
+.forumFormContainer {
+ margin-bottom: 20px;
+}
+
+.forumTitle {
+ font-weight: normal;
+ line-height: 180%;
+}
+
+.forumDescription {
+ white-space: normal;
+ line-height: 130%;
+}
+
+.topicGotoIcon {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.forumsFeedLink {
+ margin: 10px;
+ float: right;
+ margin-top: -40px;
+}
+
+.forumsFeedLink img {
+ vertical-align: middle;
+ margin-right: 5px;
+}
+
+.forumFeedLink {
+
+}
+
+.forumFeedLink img {
+ margin-left: 5px;
+ margin-bottom: 3px;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumList.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumPosting.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/forumPosting.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumPosting.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,33 @@
+.forumPostingHeaderInfoControls {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.forumPostingHeaderInfo {
+ text-align: left;
+ color:#576c74;
+ font-weight: bold;
+}
+
+.forumPostingHeaderControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingControls {
+ text-align: right;
+ white-space: nowrap;
+ margin-bottom: 10px;
+}
+
+.forumPostingDocumentWrapper {
+ border-left: 1px solid #d3d2d1;
+ border-right: 1px solid #d3d2d1;
+ border-top: 1px solid #d3d2d1;
+ padding: 5px;
+}
+
+.noComments {
+ border-bottom: 1px solid #C3BBB6;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumPosting.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumReplies.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/forumReplies.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumReplies.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumReplies.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,16 @@
+.forumReplyControls {
+ width: 100%;
+}
+
+.forumReplyRating {
+ text-align: left;
+}
+
+.forumReplyStatus {
+ text-align: right;
+}
+
+.forumReplyControl {
+ text-align: right;
+ width: 200px;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumReplies.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumStickyPosting.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/forumStickyPosting.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumStickyPosting.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumStickyPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,33 @@
+.forumPostingHeaderInfoControls {
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.forumPostingHeaderInfo {
+ text-align: left;
+ color:#576c74;
+ font-weight: bold;
+}
+
+.forumPostingHeaderControls {
+ text-align: right;
+ white-space: nowrap;
+}
+
+.forumPostingControls {
+ text-align: right;
+ white-space: nowrap;
+ margin-bottom: 10px;
+}
+
+.forumPostingDocumentWrapper {
+ border-left: 1px solid #d3d2d1;
+ border-right: 1px solid #d3d2d1;
+ border-top: 1px solid #d3d2d1;
+ padding: 5px;
+}
+
+.noComments {
+ border-bottom: 1px solid #C3BBB6;
+}
+
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumStickyPosting.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumTopics.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/forumTopics.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumTopics.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumTopics.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,60 @@
+.forumDescriptionTopicControls {
+ width: 100%;
+}
+
+.forumDescription {
+}
+
+.topicControls {
+ text-align: right;
+ white-space: nowrap;
+ padding-left: 10px;
+}
+
+.topicFormContainer {
+}
+
+.topicTableContainer {
+}
+
+.topicPager {
+ width: 100%;
+}
+
+.topicPagerTable {
+ width: 100%;
+ font-weight: bold;
+ padding: 0;
+ margin: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border: 0;
+ text-align: center;
+}
+
+.topicPagerColumn {
+ width: 10%;
+}
+.topicPagerTextColumn {
+ width: 60%;
+}
+
+.topicGotoIcon {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.forumsFeedLink {
+ margin: 10px;
+ float: right;
+ margin-top: -35px;
+}
+
+.forumsFeedLink img {
+ vertical-align: middle;
+ margin-right: 5px;
+}
+
+.forumDescription {
+ text-align: left;
+}
\ No newline at end of file
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/css/forumTopics.css
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_goto.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_goto.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_goto.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_locked.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_locked.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_locked.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_locked_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_locked_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_locked_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_sticky.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_sticky.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_sticky.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_sticky_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_sticky_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_sticky_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_unread.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_unread.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/img/icon.posting_unread.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.helloWorld;
+
+import org.jboss.seam.annotations.*;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @author Christian Bauer
+ */
+@Name("helloWorld")
+(a)Scope(ScopeType.PAGE)
+public class HelloWorld implements Serializable {
+
+ @Logger
+ Log log;
+
+ @In
+ Preferences preferences;
+
+ @In
+ Map<String,String> messages;
+
+ String greeting;
+
+ public String getHello(WikiPluginMacro pluginMacro) {
+ HelloWorldPreferences prefs = preferences.get(HelloWorldPreferences.class, pluginMacro);
+ return getGreeting() + " '" + prefs.getMessage() + "'";
+ }
+
+ public String getGreeting() {
+ if (greeting == null) return messages.get("hw.defaultMessage");
+ return greeting;
+ }
+
+ public void setGreeting(String greeting) {
+ this.greeting = greeting;
+ }
+
+ public void printAMessage() {
+ log.info("### This is just a log message");
+ }
+
+ @Observer("Macro.helloWorld.callback.viewBuild")
+ public void onViewBuild(WikiPluginMacro pluginMacro) {
+ log.info("### View build event triggered: " + pluginMacro);
+ }
+
+ @Observer("Macro.helloWorld.callback.beforeViewRender")
+ public void onBeforeViewRender(WikiPluginMacro pluginMacro) {
+ log.info("### Before render event triggered" + pluginMacro);
+ }
+
+ @Observer("Macro.helloWorld.callback.afterViewRender")
+ public void onAfterViewRender(WikiPluginMacro pluginMacro) {
+ log.info("### After render event triggered" + pluginMacro);
+ }
+
+}
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.plugin.xml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorld.plugin.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin key="hw"
+ xmlns="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/wiki/plugin
+ classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
+
+ <plugin-info version="1.0">
+ <application-version min="1.0" max="1.0"/>
+ <vendor name="Red Hat Inc." url="http://www.seamframework.org/"/>
+ </plugin-info>
+
+ <macro key="helloWorld" name="helloWorld">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true"/>
+ </macro>
+
+</plugin>
+
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorldPreferences.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorldPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/HelloWorldPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.helloWorld;
+
+import org.hibernate.validator.Length;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+
+/**
+ * @author Christian Bauer
+ */
+@Preferences(
+ name = "HelloWorld",
+ description = "#{messages['hw.preferences.Description']}",
+ mappedTo = "hw.helloWorld"
+)
+public class HelloWorldPreferences {
+
+ @PreferenceProperty(
+ description = "#{messages['hw.preferences.property.Message']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "AdaptiveTextInput"
+ )
+ @Length(min = 0, max = 255)
+ private String message;
+
+ public String getMessage() {
+ return message;
+ }
+}
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/i18n/messages_helloWorld_en.properties
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/i18n/messages_helloWorld_en.properties (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/i18n/messages_helloWorld_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,11 @@
+hw.label=Hello World
+hw.description=A minimal Hello World example
+hw.helloWorld.label=Hello World Macro
+hw.helloWorld.description=Shows a message and some example forms
+
+hw.preferences.description=Plugin: Hello World
+hw.preferences.property.message=Greeting message
+
+hw.defaultMessage=Hello World, the message is:
+hw.justAMessage=Hello World!
+hw.button.UpdateGreeting=Update Greeting
\ No newline at end of file
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/helloWorld.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/helloWorld.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/helloWorld.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,68 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <h:panelGrid columns="2" styleClass="justABox">
+
+ <h:outputText value="The backing bean says: "/>
+ <h:panelGrid id="helloWorldOutput" columns="2" styleClass="someBackground">
+ <h:graphicImage value="#{currentMacro.requestImagePath}/example.gif"/>
+ <s:span styleClass="justAMessage">
+ <h:outputText value="#{helloWorld.getHello(currentMacro)}"/>
+ </s:span>
+ </h:panelGrid>
+
+ <h:outputText value="Regular JSF form:"/>
+ <s:div id="theRegularForm">
+ <h:form>
+ <h:inputText value="#{helloWorld.greeting}" size="30"/>
+ <h:commandLink styleClass="buttonNonpersistent">
+ <h:outputText styleClass="buttonLabel" value="#{currentMacro.getMessage('button.UpdateGreeting')}"/>
+ </h:commandLink>
+ </h:form>
+ </s:div>
+
+ <h:outputText value="AJAX form with partial re-render:"/>
+ <s:div id="theFirstAjaxForm">
+ <h:form>
+ <h:inputText value="#{helloWorld.greeting}" size="30"/>
+ <a:commandLink styleClass="buttonNonpersistent"
+ reRender="helloWorldOutput, theRegularForm, theFirstAjaxForm, theSecondAjaxForm"
+ status="globalStatus">
+ <h:outputText styleClass="buttonLabel" value="#{currentMacro.getMessage('button.UpdateGreeting')}"/>
+ </a:commandLink>
+ </h:form>
+ </s:div>
+
+ <h:outputText value="AJAX form with automatic re-render:"/>
+ <s:div id="theSecondAjaxForm">
+ <h:form>
+ <h:inputText value="#{helloWorld.greeting}" size="30">
+ <a:support action="#{helloWorld.printAMessage()}"
+ event="onkeyup"
+ requestDelay="3000"
+ ignoreDupResponses="true"
+ ajaxSingle="true"
+ eventsQueue="ajaxEventQueue"
+ reRender="helloWorldOutput, theRegularForm, theFirstAjaxForm"
+ status="globalStatus"/>
+ </h:inputText>
+ </h:form>
+ </s:div>
+
+ <h:outputText value="Message in preferences: "/>
+ <h:outputText value="#{preferences.get('HelloWorld', currentMacro).message}"/>
+
+ <h:outputText value="The other template says: "/>
+ <ui:include src="justAnotherTemplate.xhtml"/>
+
+ </h:panelGrid>
+
+ <wiki:loadStyle src="#{currentMacro.requestCSSPath}/anotherOne.css"/>
+
+</wiki:plugin>
\ No newline at end of file
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/justAnotherTemplate.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/justAnotherTemplate.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/templates/justAnotherTemplate.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,9 @@
+<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:s="http://jboss.com/products/seam/taglib">
+
+ <h:outputText value="#{currentMacro.getMessage('justAMessage')}"/>
+
+</s:fragment>
\ No newline at end of file
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/anotherOne.css
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/anotherOne.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/anotherOne.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,3 @@
+.someBackground {
+ background-color: lightgreen;
+}
\ No newline at end of file
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/helloWorld.css
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/helloWorld.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/css/helloWorld.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,9 @@
+.justABox {
+ background: #fff url(#{currentMacro.requestImagePath}/background.gif) 0 0 repeat-x;
+ border: 1px solid green;
+ margin: 20px;
+}
+
+.justAMessage {
+ color: green;
+}
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/img/background.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/th.bg.inverse.gif)
===================================================================
(Binary files differ)
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/img/example.gif
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/helloWorld/themes/default/img/example.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira (from rev 8123, trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList)
Added: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/Jira.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/Jira.plugin.xml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/Jira.plugin.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin key="jira"
+ xmlns="http://jboss.com/products/seam/wiki/plugin"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/wiki/plugin
+ classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
+
+ <plugin-info version="1.0">
+ <application-version min="1.0" max="1.0"/>
+ <vendor name="Red Hat Inc." url="http://www.seamframework.org/"/>
+ </plugin-info>
+
+ <macro key="issueList" name="jiraIssueList">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true"/>
+ </macro>
+
+</plugin>
+
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/JiraIssueList.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueList.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/JiraIssueList.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -4,18 +4,20 @@
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
-package org.jboss.seam.wiki.plugin.jiraIssueList;
+package org.jboss.seam.wiki.plugin.jira;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.ScopeType;
+import org.jboss.seam.wiki.connectors.jira.JiraDAO;
import org.jboss.seam.wiki.connectors.jira.JiraIssue;
-import org.jboss.seam.wiki.connectors.jira.JiraDAO;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.preferences.Preferences;
+import java.io.Serializable;
+import java.util.Collections;
import java.util.List;
-import java.io.Serializable;
/**
* @author Christian Bauer
@@ -24,32 +26,32 @@
@Scope(ScopeType.PAGE)
public class JiraIssueList implements Serializable {
- @In("#{preferences.get('JiraIssueList', currentMacro)}")
- JiraIssueListPreferences prefs;
+ public static final String MACRO_ATTR_ISSUELIST = "jiraIssueList";
@In
JiraDAO jiraDAO;
- private List<JiraIssue> issues;
+ public List<JiraIssue> getIssues(WikiPluginMacro macro) {
+ List<JiraIssue> issueList = (List<JiraIssue>)macro.getAttributes().get(MACRO_ATTR_ISSUELIST);
+ if (issueList == null) {
- public List<JiraIssue> getIssues() {
- if (issues == null) loadIssues();
- return issues;
- }
+ JiraIssueListPreferences prefs = Preferences.instance().get(JiraIssueListPreferences.class, macro);
- @Observer(value = "Macro.render.jiraIssueList", create = false)
- public void loadIssues() {
+ if (prefs.getUrl() != null && prefs.getUrl().length() > 0
+ && prefs.getFilterId() != null && prefs.getFilterId().length() > 0) {
- if (prefs.getUrl() != null && prefs.getUrl().length() > 0
- && prefs.getFilterId() != null && prefs.getFilterId().length() > 0) {
+ Integer maxResults = Integer.MAX_VALUE;
+ if (prefs.getNumberOfIssues() != null) {
+ maxResults = prefs.getNumberOfIssues().intValue();
+ }
- Integer maxResults = Integer.MAX_VALUE;
- if (prefs.getNumberOfIssues() != null) {
- maxResults = prefs.getNumberOfIssues().intValue();
+ issueList = jiraDAO.getJiraIssues(prefs.getUrl(), prefs.getUsername(), prefs.getPassword(), prefs.getFilterId(), maxResults);
+ macro.getAttributes().put(MACRO_ATTR_ISSUELIST, issueList);
+ } else {
+ macro.getAttributes().put(MACRO_ATTR_ISSUELIST, Collections.EMPTY_LIST);
}
-
- issues = jiraDAO.getJiraIssues(prefs.getUrl(), prefs.getUsername(), prefs.getPassword(), prefs.getFilterId(), maxResults);
}
-
+ return (List<JiraIssue>)macro.getAttributes().get(MACRO_ATTR_ISSUELIST);
}
+
}
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/JiraIssueListPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/jiraIssueList/JiraIssueListPreferences.java 2008-05-07 12:21:20 UTC (rev 8123)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/JiraIssueListPreferences.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -4,7 +4,7 @@
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
-package org.jboss.seam.wiki.plugin.jiraIssueList;
+package org.jboss.seam.wiki.plugin.jira;
import org.jboss.seam.wiki.preferences.annotations.Preferences;
import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
@@ -18,11 +18,15 @@
/**
* @author Christian Bauer
*/
-@Preferences(name = "JiraIssueList", description = "#{messages['jiraIssueList.preferences.Name']}")
+@Preferences(
+ name = "JiraIssueList",
+ description = "#{messages['jira.issueList.preferences.description']}",
+ mappedTo = "jira.issueList"
+)
public class JiraIssueListPreferences implements Serializable {
@PreferenceProperty(
- description = "#{messages['jiraIssueList.preferences.Title']}",
+ description = "#{messages['jira.issueList.preferences.property.title']}",
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
editorIncludeName = "AdaptiveTextInput"
)
@@ -31,7 +35,7 @@
private String title;
@PreferenceProperty(
- description = "#{messages['jiraIssueList.preferences.Url']}",
+ description = "#{messages['jira.issueList.preferences.property.url']}",
visibility = {PreferenceVisibility.INSTANCE},
editorIncludeName = "AdaptiveTextInput"
)
@@ -39,7 +43,7 @@
private String url;
@PreferenceProperty(
- description = "#{messages['jiraIssueList.preferences.Username']}",
+ description = "#{messages['jira.issueList.preferences.property.username']}",
visibility = {PreferenceVisibility.INSTANCE},
editorIncludeName = "AdaptiveTextInput"
)
@@ -47,7 +51,7 @@
private String username;
@PreferenceProperty(
- description = "#{messages['jiraIssueList.preferences.FilterId']}",
+ description = "#{messages['jira.issueList.preferences.property.filterId']}",
visibility = {PreferenceVisibility.INSTANCE},
editorIncludeName = "AdaptiveTextInput"
)
@@ -55,7 +59,7 @@
private String password;
@PreferenceProperty(
- description = "#{messages['jiraIssueList.preferences.Password']}",
+ description = "#{messages['jira.issueList.preferences.property.password']}",
visibility = {PreferenceVisibility.INSTANCE},
editorIncludeName = "AdaptiveTextInput"
)
@@ -63,7 +67,7 @@
private String filterId;
@PreferenceProperty(
- description = "#{messages['jiraIssueList.preferences.NumberOfIssues']}",
+ description = "#{messages['jira.issueList.preferences.property.numberOfIssues']}",
visibility = {PreferenceVisibility.INSTANCE},
editorIncludeName = "NumberRange"
)
@@ -72,7 +76,7 @@
private Long numberOfIssues;
@PreferenceProperty(
- description = "#{messages['jiraIssueList.preferences.TruncateSummary']}",
+ description = "#{messages['jira.issueList.preferences.property.truncateSummary']}",
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
editorIncludeName = "NumberRange"
)
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/i18n/messages_jiraIssueList_en.properties (from rev 8123, trunk/examples/wiki/src/etc/i18n/messages_jiraIssueList_en.properties)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/i18n/messages_jiraIssueList_en.properties (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/i18n/messages_jiraIssueList_en.properties 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,16 @@
+jira.label=JIRA
+jira.description=Remote access to a JIRA issue tracking system
+
+jira.issueList.label=JIRA Issue List
+jira.issueList.description=Display a list of (filtered) JIRA issues
+
+jira.issueList.preferences.description=Plugin: JIRA Issue List
+jira.issueList.preferences.property.title=Title of isse list box
+jira.issueList.preferences.property.url=URL of JIRA website
+jira.issueList.preferences.property.username=JIRA XML-RPC remote username
+jira.issueList.preferences.property.password=JIRA XML-RPC remote password
+jira.issueList.preferences.property.filterId=ID of JIRA filter for remote request
+jira.issueList.preferences.property.numberOfIssues=Number of issues shown in list
+jira.issueList.preferences.property.truncateSummary=Truncate summary after characters
+
+jira.issueList.label.NoIssuesFound=No issues found.
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml (from rev 8123, trunk/examples/wiki/view/plugins/jiraIssueList/plugin.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,63 @@
+<wiki:plugin
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ 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="jiraIssueList box">
+
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('JiraIssueList', currentMacro).title}"/>
+ </s:div>
+
+ <div class="boxContent">
+
+ <h:dataTable value="#{jiraIssueList.getIssues(currentMacro)}" var="i"
+ rendered="#{not empty jiraIssueList.getIssues(currentMacro) and
+ jiraIssueList.getIssues(currentMacro).size() > 0}"
+ styleClass="datatable jiraIssueListTable"
+ columnClasses="onePercentColumn alignCenter priorityColumn,
+ defaultColumn alignLeft summaryColumn wrapWhitespace"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <h:graphicImage value="#{imagePath}/icon.priority.#{i.priorityIcon}.gif" width="18" height="18"/>
+ </h:column>
+
+ <h:column>
+
+ <s:div styleClass="jiraIssueComponents smallFont">
+ <ui:repeat var="comp" value="#{i.componentNames}">
+ <h:outputText value="#{comp}"/>
+ <h:outputText rendered="#{i.componentNames.indexOf(comp) < i.componentNames.size()-1}"
+ value=",  "/>
+ </ui:repeat>
+ <h:outputText value=" " rendered="#{empty i.componentNames}"/>
+ </s:div>
+
+ <h:outputLink value="#{preferences.get('JiraIssueList', currentMacro).url}/browse/#{i.key}">
+ <h:outputText
+ value="(#{i.key})  #{wiki:truncateString(i.summary, preferences.get('JiraIssueList', currentMacro).truncateSummary, '...')}"/>
+ </h:outputLink>
+
+ </h:column>
+
+ </h:dataTable>
+
+ </div>
+
+ <s:div styleClass="jiraIssueListEmpty"
+ rendered="#{empty jiraIssueList.getIssues(currentMacro) or
+ jiraIssueList.getIssues(currentMacro).size() == 0}">
+ <h:outputText value="#{messages['jira.issueList.label.NoIssuesFound']}"/>
+ </s:div>
+
+ <div class="boxFooter"/>
+
+ </s:div>
+
+</wiki:plugin>
\ No newline at end of file
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/css/jiraIssueList.css (from rev 8123, trunk/examples/wiki/view/themes/default/css/jiraIssueList.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/css/jiraIssueList.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/css/jiraIssueList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,17 @@
+.jiraIssueList {}
+
+.jiraIssueListTable {}
+
+.jiraIssueListTable .priorityColumn {}
+
+.jiraIssueListTable .summaryColumn {}
+
+.jiraIssueListTable .jiraIssueComponents {
+ text-align: right;
+}
+
+.jiraIssueListEmpty {
+ padding: 5px;
+}
+
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.blocker.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.priority.blocker.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.blocker.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.critical.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.priority.critical.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.critical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.major.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.priority.major.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.major.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.minor.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.priority.minor.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.minor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.optional.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.priority.optional.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.optional.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.trivial.gif (from rev 8123, trunk/examples/wiki/view/themes/default/img/icon.priority.trivial.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/default/img/icon.priority.trivial.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/css/jiraIssueList.css (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/css/jiraIssueList.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/css/jiraIssueList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,17 @@
+.jiraIssueList {}
+
+.jiraIssueListTable {}
+
+.jiraIssueListTable .priorityColumn {}
+
+.jiraIssueListTable .summaryColumn {}
+
+.jiraIssueListTable .jiraIssueComponents {
+ text-align: right;
+}
+
+.jiraIssueListEmpty {
+ padding: 5px;
+}
+
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.blocker.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.blocker.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.blocker.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.critical.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.critical.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.critical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.major.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.major.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.major.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.minor.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.minor.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.minor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.optional.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.optional.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.optional.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.trivial.gif (from rev 8123, trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.trivial.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/inrelationto/img/icon.priority.trivial.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/css/jiraIssueList.css (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/css/jiraIssueList.css (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/css/jiraIssueList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,19 @@
+.jiraIssueList {}
+
+.jiraIssueListTable {}
+
+.jiraIssueListTable .priorityColumn {}
+
+.jiraIssueListTable .summaryColumn {}
+
+.jiraIssueListTable .jiraIssueComponents {
+ text-align: right;
+}
+
+.jiraIssueListEmpty {
+ border-left: 1px solid #d3d2d1;
+ border-right: 1px solid #d3d2d1;
+ padding: 5px;
+}
+
+
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.blocker.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.blocker.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.blocker.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.critical.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.critical.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.critical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.major.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.major.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.major.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.minor.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.minor.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.minor.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.optional.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.optional.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.optional.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.trivial.gif (from rev 8123, trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.trivial.gif)
===================================================================
(Binary files differ)
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/themes/sfwkorg/img/icon.priority.trivial.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/WikiBaseData.dbunit.xml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -283,13 +283,12 @@
<WIKI_FILE
NODE_ID="9" FILE_REVISION="0"/>
<WIKI_DOCUMENT
- NODE_ID="9" CONTENT="Testdocument Four

[<=jiraIssueList[url=http://jira.jboss.com/jira][usernam... Users Forum]]
"
+ NODE_ID="9" CONTENT="Testdocument Four

[<=helloWorld[message=Foo]]

[<=jiraIssueList... Users Forum]]
"
HEADER="[NULL]" FOOTER="[NULL]"
- HEADER_MACROS="[NULL]" CONTENT_MACROS="jiraIssueList forumTopPosters" FOOTER_MACROS="[NULL]"
+ HEADER_MACROS="[NULL]" CONTENT_MACROS="helloWorld jiraIssueList forumTopPosters" FOOTER_MACROS="[NULL]"
NAME_AS_TITLE="true" ENABLE_COMMENTS="true" ENABLE_COMMENT_FORM="true" ENABLE_COMMENTS_ON_FEEDS="true"/>
-
<WIKI_NODE
NODE_ID="10" OBJ_VERSION="0" RATING="0" PARENT_NODE_ID="6"
AREA_NR="3" NAME="One.Comment11967298211870" WIKINAME="OneComment11967298211870"
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/EditMacros.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/EditMacros.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/EditMacros.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -9,7 +9,7 @@
import org.dbunit.operation.DatabaseOperation;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.wiki.core.action.DocumentHome;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
import org.testng.annotations.Test;
@@ -47,7 +47,7 @@
assert docHome.getInstance().getFooterMacros().size() == 2;
boolean macroFound = false;
- for (WikiMacro wikiMacro : docHome.getInstance().getContentMacros()) {
+ for (WikiTextMacro wikiMacro : docHome.getInstance().getContentMacros()) {
if (wikiMacro.getName().equals("lastModifiedDocuments")) {
assert wikiMacro.getParams().size()==2;
assert wikiMacro.getParams().get("documentTitleLength").equals("60");
@@ -91,11 +91,11 @@
assert docHome.getInstance().getFooterMacros().size() == 2;
// Check WikiMacro.equals() as well
- WikiMacro macro = new WikiMacro("contentMacro");
+ WikiTextMacro macro = new WikiTextMacro("contentMacro");
macro.setPosition(0);
boolean macroFound = false;
- for (WikiMacro wikiMacro : docHome.getInstance().getContentMacros()) {
+ for (WikiTextMacro wikiMacro : docHome.getInstance().getContentMacros()) {
if (wikiMacro.equals(macro)) {
assert wikiMacro.getParams().size()==1;
assert wikiMacro.getParams().get("param").equals("value");
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/model/DocumentMacroTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/model/DocumentMacroTests.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/model/DocumentMacroTests.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -10,12 +10,12 @@
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
import org.testng.annotations.Test;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
* @author Christian Bauer
@@ -53,7 +53,7 @@
assert doc.getHeader().indexOf("foo") == doc.getHeader().length()-3;
doc.removeHeaderMacros("testMacro1");
- WikiMacro replacement = new WikiMacro("testMacro3");
+ WikiTextMacro replacement = new WikiTextMacro("testMacro3");
replacement.getParams().put("p1", "value1");
replacement.getParams().put("p2", "value2");
doc.addHeaderMacro(replacement);
@@ -130,10 +130,10 @@
WikiDocumentDefaults defaults = new WikiDocumentDefaults() {
@Override
- public List<WikiMacro> getContentMacros() {
- return new ArrayList<WikiMacro>() {{
- add(new WikiMacro(0, "contentMacro1"));
- add(new WikiMacro(1, "contentMacro2"));
+ public List<WikiTextMacro> getContentMacros() {
+ return new ArrayList<WikiTextMacro>() {{
+ add(new WikiTextMacro("contentMacro1", 0));
+ add(new WikiTextMacro("contentMacro2", 1));
}};
}
@Override
@@ -141,10 +141,10 @@
return "foo";
}
@Override
- public List<WikiMacro> getHeaderMacros() {
- return new ArrayList<WikiMacro>() {{
- add(new WikiMacro(0, "headerMacro1"));
- add(new WikiMacro(1, "headerMacro2"));
+ public List<WikiTextMacro> getHeaderMacros() {
+ return new ArrayList<WikiTextMacro>() {{
+ add(new WikiTextMacro("headerMacro1", 0));
+ add(new WikiTextMacro("headerMacro2", 1));
}};
}
@Override
@@ -152,10 +152,10 @@
return "bar";
}
@Override
- public List<WikiMacro> getFooterMacros() {
- return new ArrayList<WikiMacro>() {{
- add(new WikiMacro(0, "footerMacro1"));
- add(new WikiMacro(1, "footerMacro2"));
+ public List<WikiTextMacro> getFooterMacros() {
+ return new ArrayList<WikiTextMacro>() {{
+ add(new WikiTextMacro("footerMacro1", 0));
+ add(new WikiTextMacro("footerMacro2", 1));
}};
}
@Override
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/plugin/TopicHomeTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/plugin/TopicHomeTests.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/plugin/TopicHomeTests.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -38,6 +38,7 @@
WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
WikiDirectory forumDir = nodeDAO.findWikiDirectory(102l);
Contexts.getPageContext().set("currentDirectory", forumDir);
+ Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
@@ -56,6 +57,7 @@
WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
WikiDirectory forumDir = nodeDAO.findWikiDirectory(102l);
Contexts.getPageContext().set("currentDirectory", forumDir);
+ Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
@@ -103,6 +105,7 @@
WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
WikiDirectory forumDir = nodeDAO.findWikiDirectory(102l);
Contexts.getPageContext().set("currentDirectory", forumDir);
+ Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
@@ -121,6 +124,7 @@
WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
WikiDirectory forumDir = nodeDAO.findWikiDirectory(102l);
Contexts.getPageContext().set("currentDirectory", forumDir);
+ Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
@@ -167,6 +171,7 @@
WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
WikiDirectory forumDir = nodeDAO.findWikiDirectory(102l);
Contexts.getPageContext().set("currentDirectory", forumDir);
+ Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
@@ -185,6 +190,7 @@
WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
WikiDirectory forumDir = nodeDAO.findWikiDirectory(102l);
Contexts.getPageContext().set("currentDirectory", forumDir);
+ Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/InstancePreferencesTests.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -7,16 +7,16 @@
package org.jboss.seam.wiki.test.preferences;
import org.dbunit.operation.DatabaseOperation;
+import org.jboss.seam.core.Conversation;
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.wiki.core.engine.WikiTextParser;
+import org.jboss.seam.wiki.core.model.WikiTextMacro;
+import org.jboss.seam.wiki.core.plugin.WikiPluginMacro;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
import org.jboss.seam.wiki.core.renderer.NullWikiTextRenderer;
-import org.jboss.seam.wiki.core.engine.WikiMacro;
-import org.jboss.seam.wiki.core.ui.UIWikiFormattedText;
+import org.jboss.seam.wiki.plugin.basic.LastModifiedDocumentsPreferences;
import org.jboss.seam.wiki.preferences.Preferences;
import org.jboss.seam.wiki.test.util.DBUnitSeamTest;
-import org.jboss.seam.wiki.plugin.lastmodified.LastModifiedDocumentsPreferences;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.contexts.Contexts;
import org.testng.annotations.Test;
/**
@@ -46,12 +46,13 @@
WikiTextParser parser = new WikiTextParser(docHome.getInstance().getContent(), true, false);
parser.setRenderer(new NullWikiTextRenderer() {
- public String renderMacro(WikiMacro macro) {
- Contexts.getEventContext().set(UIWikiFormattedText.CURRENT_MACRO_EVENT_VARIABLE, macro);
+ @Override
+ public String renderMacro(WikiTextMacro macro) {
if (macro.getName().equals("lastModifiedDocuments")) {
+ WikiPluginMacro pluginMacro = PluginRegistry.instance().createWikiPluginMacro(macro);
LastModifiedDocumentsPreferences lmdPrefs =
- Preferences.getInstance(LastModifiedDocumentsPreferences.class, "currentMacro");
+ Preferences.instance().get(LastModifiedDocumentsPreferences.class, pluginMacro);
assert lmdPrefs.getDocumentTitleLength().equals(60l);
}
@@ -106,12 +107,13 @@
WikiTextParser parser = new WikiTextParser(docHome.getInstance().getContent(), true, false);
parser.setRenderer(new NullWikiTextRenderer() {
- public String renderMacro(WikiMacro macro) {
- Contexts.getEventContext().set(UIWikiFormattedText.CURRENT_MACRO_EVENT_VARIABLE, macro);
+ @Override
+ public String renderMacro(WikiTextMacro macro) {
if (macro.getName().equals("lastModifiedDocuments")) {
+ WikiPluginMacro pluginMacro = PluginRegistry.instance().createWikiPluginMacro(macro);
LastModifiedDocumentsPreferences lmdPrefs =
- Preferences.getInstance(LastModifiedDocumentsPreferences.class, "currentMacro");
+ Preferences.instance().get(LastModifiedDocumentsPreferences.class, pluginMacro);
assert lmdPrefs.getDocumentTitleLength().equals(66l);
}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/SystemPreferencesTests.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -38,7 +38,7 @@
}
protected void renderResponse() throws Exception {
- WikiPreferences wikiPrefs = Preferences.getInstance(WikiPreferences.class);
+ WikiPreferences wikiPrefs = Preferences.instance().get(WikiPreferences.class);
assert wikiPrefs.getShowDocumentCreatorHistory();
assert wikiPrefs.getShowTags();
assert wikiPrefs.getDefaultDocumentId().equals(6l);
@@ -101,7 +101,7 @@
}
protected void renderResponse() throws Exception {
- WikiPreferences wikiPrefs = Preferences.getInstance(WikiPreferences.class);
+ WikiPreferences wikiPrefs = Preferences.instance().get(WikiPreferences.class);
assert wikiPrefs.getPermlinkSuffix().equals(".newsuffix");
}
Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/preferences/UserPreferencesTests.java 2008-05-10 02:37:42 UTC (rev 8148)
@@ -88,7 +88,7 @@
}
protected void renderResponse() throws Exception {
- DocumentEditorPreferences docEditorPrefs = Preferences.getInstance(DocumentEditorPreferences.class);
+ DocumentEditorPreferences docEditorPrefs = Preferences.instance().get(DocumentEditorPreferences.class);
assert !docEditorPrefs.getMinorRevisionEnabled();
}
@@ -105,7 +105,7 @@
}
protected void renderResponse() throws Exception {
- DocumentEditorPreferences docEditorPrefs = Preferences.getInstance(DocumentEditorPreferences.class);
+ DocumentEditorPreferences docEditorPrefs = Preferences.instance().get(DocumentEditorPreferences.class);
assert docEditorPrefs.getMinorRevisionEnabled();
}
Modified: trunk/examples/wiki/view/adminHome_d.xhtml
===================================================================
--- trunk/examples/wiki/view/adminHome_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/adminHome_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -75,6 +75,10 @@
accesskey="#{messages['lacewiki.button.adminHome.RolesPermissions.accesskey']}">
<h:outputText escape="false" value="#{messages['lacewiki.button.adminHome.RolesPermissions']}"/>
</a></li>
+ <li id="pluginsTab"><a href="#plugins"
+ accesskey="#{messages['lacewiki.button.adminHome.Plugins.accesskey']}">
+ <h:outputText escape="false" value="#{messages['lacewiki.button.adminHome.Plugins']}"/>
+ </a></li>
<li id="linkProtocolsTab"><a href="#linkProtocols"
accesskey="#{messages['lacewiki.button.adminHome.LinkProtocols.accesskey']}">
<h:outputText escape="false" value="#{messages['lacewiki.button.adminHome.LinkProtocols']}"/>
@@ -155,6 +159,10 @@
Not Implemented
</div>
+ <div id="plugins">
+ <ui:include src="includes/admin/pluginEditor.xhtml"/>
+ </div>
+
<div id="linkProtocols">
<s:div id="linkProtocolsRegion" styleClass="formFields" style="padding: 20px;">
<a:region>
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -91,7 +91,7 @@
<h:outputLink value="#{wikiURLRenderer.renderFeedURL(directoryBrowser.instance.feed, null, null)}"
styleClass="linkNavigation" rendered="#{not empty directoryBrowser.instance.feed}">
- <h:graphicImage styleClass="feedIcon" value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
+ <h:graphicImage styleClass="feedIcon" value="#{imagePath}/icon.atom.gif" width="18" height="18"/>
<h:outputText value="#{messages['lacewiki.button.DirectoryFeed']}"/>
</h:outputLink>
@@ -135,7 +135,7 @@
status="globalStatus"
reRender="control, directoryBrowser, messageBoxContainer"
rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
- <h:graphicImage styleClass="icon" value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
+ <h:graphicImage styleClass="icon" value="#{imagePath}/icon.dirup.gif" width="18" height="20"/>
<h:outputText styleClass="text" value=".."/>
</a:commandLink>
</s:div>
@@ -171,7 +171,7 @@
rendered="#{node.isInstance('WikiUpload')}"/>
</s:fragment>
<s:fragment rendered="#{clipboard.isCut(node.id)}">
- <h:graphicImage value="#{themePath}/img/icon.cut.gif" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/icon.cut.gif" width="18" height="20"/>
</s:fragment>
</h:column>
@@ -182,13 +182,13 @@
status="globalStatus"
reRender="control, directoryBrowser, messageBoxContainer"
rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
- <h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/icon.dirup.gif" width="18" height="20"/>
</a:commandLink>
</f:facet>
<s:fragment rendered="#{node.isInstance('WikiDirectory')}">
<ui:decorate template="includes/directoryBrowserIconMenu.xhtml">
- <ui:param name="icon" value="#{themePath}/img/#{wikiDirectoryIconHandler.getIconName(node)}"/>
+ <ui:param name="icon" value="#{wikiDirectoryIconHandler.getIconName(node)}"/>
<ui:define name="menu">
<ul class="contextMenuItems">
<li>
@@ -222,7 +222,7 @@
<s:fragment rendered="#{node.isInstance('WikiDocument')}">
<ui:decorate template="includes/directoryBrowserIconMenu.xhtml">
- <ui:param name="icon" value="#{themePath}/img/#{wikiDocumentIconHandler.getIconName(node)}"/>
+ <ui:param name="icon" value="#{wikiDocumentIconHandler.getIconName(node)}"/>
<ui:define name="menu">
<ul class="contextMenuItems">
<li>
@@ -271,7 +271,7 @@
<s:fragment rendered="#{node.isInstance('WikiUpload')}">
<ui:decorate template="includes/directoryBrowserIconMenu.xhtml">
- <ui:param name="icon" value="#{themePath}/img/#{wikiUploadIconHandler.getIconName(node)}"/>
+ <ui:param name="icon" value="#{wikiUploadIconHandler.getIconName(node)}"/>
<ui:define name="menu">
<ul class="contextMenuItems">
<li>
Modified: trunk/examples/wiki/view/dirDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/dirDisplay_m.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -97,7 +97,7 @@
rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read', directoryBrowser.instance.parent)}">
<f:param name="directoryId" value="#{directoryBrowser.instance.parent.id}"/>
<h:panelGrid columns="2">
- <h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/icon.dirup.gif" width="18" height="20"/>
<h:outputText value=".."/>
</h:panelGrid>
</s:link>
@@ -122,19 +122,19 @@
<s:link view="/dirDisplay_#{skin}.xhtml" tabindex="1" accesskey="." propagation="none"
rendered="#{!empty directoryBrowser.instance.parent and s:hasPermission('Node','read',directoryBrowser.instance.parent)}">
<f:param name="directoryId" value="#{directoryBrowser.instance.parent.id}"/>
- <h:graphicImage value="#{themePath}/img/icon.dirup.gif" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/icon.dirup.gif" width="18" height="20"/>
</s:link>
</f:facet>
- <h:graphicImage value="#{themePath}/img/#{wikiDirectoryIconHandler.getIconName(node)}"
+ <h:graphicImage value="#{imagePath}/#{wikiDirectoryIconHandler.getIconName(node)}"
width="18" height="20"
rendered="#{node.isInstance('WikiDirectory')}"/>
- <h:graphicImage value="#{themePath}/img/#{wikiDocumentIconHandler.getIconName(node)}"
+ <h:graphicImage value="#{imagePath}/#{wikiDocumentIconHandler.getIconName(node)}"
width="18" height="20"
rendered="#{node.isInstance('WikiDocument')}"/>
- <h:graphicImage value="#{themePath}/img/#{wikiUploadIconHandler.getIconName(node)}"
+ <h:graphicImage value="#{imagePath}/#{wikiUploadIconHandler.getIconName(node)}"
width="18" height="20"
rendered="#{node.isInstance('WikiUpload')}"/>
</h:column>
Modified: trunk/examples/wiki/view/dirEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirEdit_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/dirEdit_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -148,7 +148,7 @@
<h:column>
<a:outputPanel>
- <h:graphicImage value="#{themePath}/img/icon.dir.gif" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/icon.dir.gif" width="18" height="20"/>
</a:outputPanel>
</h:column>
@@ -175,7 +175,7 @@
oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger" tabindex="1"
reRender="menuEditor">
- <h:graphicImage value="#{themePath}/img/up.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/up.gif" width="18" height="18"/>
</a:commandLink>
</h:column>
<h:column>
@@ -185,7 +185,7 @@
oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger" tabindex="1"
reRender="menuEditor">
- <h:graphicImage value="#{themePath}/img/down.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/down.gif" width="18" height="18"/>
</a:commandLink>
</h:column>
Modified: trunk/examples/wiki/view/docDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/docDisplay_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -106,7 +106,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHome.instance}"
currentAreaNumber="#{documentHome.instance.areaNumber}"
- enablePlugins="true"/>
+ enableMacroRendering="true"/>
<s:div rendered="#{documentHome.instance.nameAsTitle}">
<h1 class="documentTitle">
@@ -123,7 +123,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHome.instance}"
currentAreaNumber="#{documentHome.instance.areaNumber}"
- enablePlugins="#{not documentHome.instance.macroPresent('disableContentMacros')}"/>
+ enableMacroRendering="#{not documentHome.instance.macroPresent('disableContentMacros')}"/>
<wiki:formattedText value="#{documentHome.instance.footer}"
linkStyleClass="regularLink"
@@ -132,7 +132,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHome.instance}"
currentAreaNumber="#{documentHome.instance.areaNumber}"
- enablePlugins="true"/>
+ enableMacroRendering="true"/>
</c:if>
</s:div>
Modified: trunk/examples/wiki/view/docDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_m.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/docDisplay_m.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -114,7 +114,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHome.instance}"
currentAreaNumber="#{documentHome.instance.areaNumber}"
- enablePlugins="true"/>
+ enableMacroRendering="true"/>
<s:div rendered="#{documentHome.instance.nameAsTitle}">
<h:outputLink value="#{wikiURLRenderer.renderURL(currentDocument)}">
@@ -129,7 +129,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHome.instance}"
currentAreaNumber="#{documentHome.instance.areaNumber}"
- enablePlugins="#{not documentHome.instance.macroPresent('disableContentMacros')}"/>
+ enableMacroRendering="#{not documentHome.instance.macroPresent('disableContentMacros')}"/>
<wiki:formattedText value="#{documentHome.instance.footer}"
linkStyleClass="regularLink"
@@ -138,7 +138,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHome.instance}"
currentAreaNumber="#{documentHome.instance.areaNumber}"
- enablePlugins="true"/>
+ enableMacroRendering="true"/>
</c:if>
</s:div>
@@ -156,9 +156,9 @@
<h:panelGrid columns="3">
<s:span><a name="attachment#{uiComponent['attachmentTable'].rowIndex + 1}"/></s:span>
<h:outputText value="# #{uiComponent['attachmentTable'].rowIndex + 1}"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes[link.file.contentType].displayIcon}"
+ <h:graphicImage value="#{imagePath}/#{uploadTypes[link.file.contentType].displayIcon}"
rendered="#{not empty uploadTypes[link.file.contentType]}" width="18" height="20"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes['generic'].displayIcon}"
+ <h:graphicImage value="#{imagePath}/#{uploadTypes['generic'].displayIcon}"
rendered="#{empty uploadTypes[link.file.contentType]}" width="18" height="20"/>
</h:panelGrid>
</h:column>
@@ -261,7 +261,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:div>
<s:div rendered="#{not c.useWikiText and currentDocument.name != c.subject}" style="margin-top:15px;">
<h:outputText value="#{wiki:escapeHTML(c.content, true)}" escape="false"/>
@@ -282,7 +282,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:div>
<h:form>
Modified: trunk/examples/wiki/view/docEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docEdit_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/docEdit_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -386,7 +386,8 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHome.instance}"
currentAreaNumber="#{documentHome.parentNode.areaNumber}"
- enablePlugins="true"/>
+ enableTransientMacros="true"
+ enableMacroRendering="true"/>
</s:div>
</s:div>
Modified: trunk/examples/wiki/view/docHistory_d.xhtml
===================================================================
--- trunk/examples/wiki/view/docHistory_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/docHistory_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -175,7 +175,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHistory.currentFile}"
currentAreaNumber="#{documentHistory.currentFile.parent.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:div>
</s:div>
</s:div>
Modified: trunk/examples/wiki/view/docHistory_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docHistory_m.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/docHistory_m.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -88,7 +88,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{documentHistory.currentFile}"
currentAreaNumber="#{documentHistory.currentFile.parent.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:div>
</s:div>
</s:div>
Added: trunk/examples/wiki/view/includes/admin/pluginDetailsMacroPluginModule.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/admin/pluginDetailsMacroPluginModule.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/admin/pluginDetailsMacroPluginModule.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,53 @@
+<s:fragment rendered="#{module.class.simpleName == 'MacroPluginModule'}"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:wiki="http://jboss.com/products/seam/wiki"
+ xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.macro.Name']}:"/></div>
+ <div class="output">
+ <h:outputText value="#{module.name}"/>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.macro.Skins']}:"/></div>
+ <div class="output">
+ <ui:repeat var="skin" value="#{module.skins}">
+ <h:outputText value="#{skin}  "/>
+ </ui:repeat>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.macro.ApplicableToArea']}:"/></div>
+ <div class="output">
+ <ui:repeat var="applicableArea" value="#{module.applicableTo}">
+ <h:outputText value="#{applicableArea.name()}  "/>
+ </ui:repeat>
+ </div>
+ </div>
+ <s:fragment rendered="#{not empty module.renderOptions}">
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.macro.RenderOptions']}:"/></div>
+ <div class="output">
+ <ui:repeat var="renderOption" value="#{module.renderOptions}">
+ <h:outputText value="#{renderOption.name()}  "/>
+ </ui:repeat>
+ </div>
+ </div>
+ </s:fragment>
+ <s:fragment rendered="#{not empty module.renderDependencies}">
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.macro.RenderDependencies']}:"/></div>
+ <div class="output">
+ <ui:repeat var="renderDependency" value="#{module.renderDependencies}">
+ <h:outputText value="#{renderDependency.type.name()}: #{renderDependency.onMacro}  "/>
+ </ui:repeat>
+ </div>
+ </div>
+ </s:fragment>
+
+</s:fragment>
\ No newline at end of file
Added: trunk/examples/wiki/view/includes/admin/pluginEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/admin/pluginEditor.xhtml (rev 0)
+++ trunk/examples/wiki/view/includes/admin/pluginEditor.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -0,0 +1,127 @@
+<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:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+<a:region>
+<h:panelGrid id="pluginDisplay" columns="2" columnClasses="formListGridColumn fifteenPercentColumn, formListGridColumn">
+
+ <s:div rendered="#{empty adminHome.installedPlugins}">
+ <h:outputText value="#{messages['lacewiki.label.adminHome.plugins.NoPluginsInstalled']}"/>
+ </s:div>
+
+ <h:dataTable id="installedPluginList"
+ var="plugin" value="#{adminHome.installedPlugins}"
+ rendered="#{adminHome.installedPlugins.size>0}"
+ styleClass="datatable formListTable"
+ headerClass="regularHeader smallFont minorPadding"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['lacewiki.label.adminHome.plugins.InstalledPlugins']}"/>
+ </f:facet>
+ <s:div styleClass="#{plugin == adminHome.selectedInstalledPlugin ? 'formListSelectedItem' : 'formListItem'}">
+ <a:commandLink reRender="pluginDisplay" action="#{adminHome.selectInstalledPlugin(plugin)}"
+ status="globalStatus" oncomplete="onAjaxRequestComplete()" tabindex="1">
+ <h:outputText value="#{plugin.label}"/>
+ </a:commandLink>
+ </s:div>
+ </h:column>
+
+ </h:dataTable>
+
+ <s:div rendered="#{empty adminHome.selectedInstalledPlugin}">
+ <h:outputText value="#{messages['lacewiki.label.adminHome.plugins.PleaseSelectInstalledPlugin']}"/>
+ </s:div>
+
+ <s:div id="pluginDetailsDisplay" rendered="#{not empty adminHome.selectedInstalledPlugin}">
+
+ <s:div id="pluginInfoDisplay" styleClass="formFields">
+
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.PluginName']}:"/></div>
+ <div class="output">
+ <h:outputText value="#{adminHome.selectedInstalledPlugin.label}"/>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.Description']}:"/></div>
+ <div class="output">
+ <h:outputText value="#{adminHome.selectedInstalledPlugin.pluginInfo.description}"/>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.Version']}:"/></div>
+ <div class="output">
+ <h:outputText value="#{adminHome.selectedInstalledPlugin.pluginInfo.version}"/>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.Vendor']}:"/></div>
+ <div class="output undecoratedLink">
+ <h:outputLink value="#{adminHome.selectedInstalledPlugin.pluginInfo.vendor.url}">
+ <h:outputText value="#{adminHome.selectedInstalledPlugin.pluginInfo.vendor.name}"/>
+ </h:outputLink>
+ </div>
+ </div>
+
+ </s:div>
+
+ <rich:simpleTogglePanel switchType="client" opened="false"
+ label="#{messages['lacewiki.label.adminHome.plugins.ModuleDetails']},
+ #{adminHome.selectedInstalledPlugin.modules.size()}
+ #{messages['lacewiki.label.adminHome.plugins.Modules']}">
+ <h:dataTable var="module" value="#{adminHome.selectedInstalledPlugin.modules}"
+ rendered="#{not empty adminHome.selectedInstalledPlugin.modules}"
+ styleClass="datatable leftBorder bottomBorder"
+ headerClass="regularHeader alignCenter rightBorder smallFont"
+ columnClasses="tenPercentColumn rightBorder alignCenter, defaultColumn rightBorder alignLeft"
+ rowClasses="rowOdd,rowEven"
+ cellpadding="0" cellspacing="0" border="0">
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['lacewiki.label.adminHome.plugins.ModuleType']}"/>
+ </f:facet>
+ <h:outputText value="#{module.moduleTypeLabel}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['lacewiki.label.adminHome.plugins.Module']}"/>
+ </f:facet>
+
+ <s:div styleClass="minorPadding">
+ <h:outputText value="#{module.label} (#{module.description})"/>
+ </s:div>
+ <s:fragment rendered="#{not empty module.fragmentCacheRegionsAsList}">
+ <div class="entry">
+ <div class="label"><h:outputText value="#{messages['lacewiki.label.adminHome.plugins.FragmentCacheRegions']}:"/></div>
+ <div class="output">
+ <ui:repeat var="cacheRegion" value="#{module.fragmentCacheRegionsAsList}">
+ <h:outputText value="#{cacheRegion}  "/>
+ </ui:repeat>
+ </div>
+ </div>
+ </s:fragment>
+
+ <ui:include src="pluginDetailsMacroPluginModule.xhtml"/>
+
+ </h:column>
+
+ </h:dataTable>
+ </rich:simpleTogglePanel>
+
+ </s:div>
+
+
+</h:panelGrid>
+</a:region>
+
+</s:fragment>
\ No newline at end of file
Modified: trunk/examples/wiki/view/includes/attachmentDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/attachmentDisplay.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/attachmentDisplay.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -21,10 +21,10 @@
<s:span><a name="attachment#{uiComponent['attachmentTable'].rowIndex + 1}"/></s:span>
<h:outputText value="# #{uiComponent['attachmentTable'].rowIndex + 1}"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes[link.file.contentType].displayIcon}"
+ <h:graphicImage value="#{imagePath}/#{uploadTypes[link.file.contentType].displayIcon}"
rendered="#{not empty uploadTypes[link.file.contentType]}" width="18" height="20"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes['generic'].displayIcon}"
+ <h:graphicImage value="#{imagePath}/#{uploadTypes['generic'].displayIcon}"
rendered="#{empty uploadTypes[link.file.contentType]}" width="18" height="20"/>
</h:panelGrid>
</h:column>
Modified: trunk/examples/wiki/view/includes/breadcrumb.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/breadcrumb.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/breadcrumb.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -7,6 +7,10 @@
xmlns:wiki="http://jboss.com/products/seam/wiki"
xmlns:s="http://jboss.com/products/seam/taglib">
+ <s:cache enabled="#{breadcrumbFactory.cacheEnabled}"
+ region="#{breadcrumbFactory.cacheRegion}"
+ key="#{breadcrumbFactory.cacheKey}">
+
<h:panelGroup styleClass="breadcrumbPanel">
<h:outputLink value="#{wikiURLRenderer.renderURL(wikiRoot)}" styleClass="itemLink breadcrumbRoot">
@@ -41,4 +45,6 @@
</ui:repeat>
</h:panelGroup>
+ </s:cache>
+
</s:div>
\ No newline at end of file
Modified: trunk/examples/wiki/view/includes/captchaEntry.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/captchaEntry.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/captchaEntry.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -10,7 +10,7 @@
<s:div styleClass="errorMessage" rendered="#{invalid}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:graphicImage value="#{themePath}/img/attention.gif"
+ <h:graphicImage value="#{imagePath}/attention.gif"
width="18" height="18"
styleClass="attentionImage"/>
<s:span styleClass="attentionMessage"> <s:message/></s:span>
Modified: trunk/examples/wiki/view/includes/commentForm.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentForm.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/commentForm.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -96,7 +96,6 @@
<ui:include src="wikiTextPreview.xhtml">
<ui:param name="textPreviewId" value="commentPreview"/>
<ui:param name="valueBinding" value="#{commentHome.instance.content}"/>
- <ui:param name="enablePlugins" value="false"/>
<ui:param name="baseDocument" value="#{currentDocument}"/>
<ui:param name="baseDirectory" value="#{currentDocument.parent}"/>
</ui:include>
Modified: trunk/examples/wiki/view/includes/commentsDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -104,7 +104,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:div>
<s:div styleClass="commentText" rendered="#{not c.useWikiText and currentDocument.name != c.subject}" style="margin-top:15px;">
<h:outputText value="#{wiki:escapeHTML(c.content, true)}" escape="false"/>
@@ -125,7 +125,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:div>
<div class="commentControls">
Modified: trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/directoryBrowserControl.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -116,7 +116,7 @@
<s:fragment>
<h:panelGroup
rendered="#{directoryBrowser.instance.id == trashArea.id and s:hasPermission('Trash', 'empty', directoryBrowser.instance)}">
- <h:graphicImage value="#{themePath}/img/icon.trash.gif"
+ <h:graphicImage value="#{imagePath}/icon.trash.gif"
width="18" height="20" style="vertical-align:middle;"/>
<a:commandLink action="#{directoryBrowser.emptyTrash()}"
status="globalStatus"
Modified: trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/directoryBrowserIconMenu.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -7,8 +7,8 @@
<h:outputLink value="javascript://no-op" tabindex="1"
onmouseover="jQuery(this).children('.dirItemIcon').attr('src','#{themePath}/img/menu_down.gif').toggleClass('mouseOver');
jQuery(this).parent('.contextMenu').menu(); jQuery(this).children('.contextMenuItems').show();"
- onmouseout="jQuery(this).children('.dirItemIcon').attr('src','#{icon}').toggleClass('mouseOver')">
- <h:graphicImage value="#{icon}" styleClass="dirItemIcon"/>
+ onmouseout="jQuery(this).children('.dirItemIcon').attr('src','#{themePath}/img/#{icon}').toggleClass('mouseOver')">
+ <h:graphicImage value="#{imagePath}/#{icon}" styleClass="dirItemIcon"/>
</h:outputLink>
<ui:insert name="menu"/>
Modified: trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/directoryBrowserPath.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -19,13 +19,13 @@
reRender="#{renderOnSelect}"
rendered="#{not directoryBrowserSettings.treeVisible}"
status="globalStatus">
- <h:graphicImage value="#{themePath}/img/menu_right.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/menu_right.gif" width="18" height="18"/>
</a:commandLink>
<a:commandLink action="#{directoryBrowser.hideTree}" tabindex="1"
reRender="#{renderOnSelect}"
rendered="#{directoryBrowserSettings.treeVisible}"
status="globalStatus">
- <h:graphicImage value="#{themePath}/img/menu_left.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/menu_left.gif" width="18" height="18"/>
</a:commandLink>
</s:fragment>
Modified: trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/directoryBrowserTree.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -27,10 +27,10 @@
<rich:treeNode>
<f:facet name="icon">
- <h:graphicImage value="#{themePath}/img/icon.dir.gif" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/icon.dir.gif" width="18" height="20"/>
</f:facet>
<f:facet name="iconLeaf">
- <h:graphicImage value="#{themePath}/img/icon.dir.gif" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/icon.dir.gif" width="18" height="20"/>
</f:facet>
<s:div styleClass="directoryTreeLabel">
Modified: trunk/examples/wiki/view/includes/formFieldDecorate.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/formFieldDecorate.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/formFieldDecorate.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -21,7 +21,7 @@
<s:div styleClass="errorMessage" rendered="#{invalid}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:graphicImage value="#{themePath}/img/attention.gif"
+ <h:graphicImage value="#{imagePath}/attention.gif"
width="18" height="18"
styleClass="attentionImage"/>
<s:span styleClass="attentionMessage"> <s:message/></s:span>
Modified: trunk/examples/wiki/view/includes/helpPopup.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/helpPopup.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/helpPopup.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -46,7 +46,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{help.selectedHelpDoc}"
currentAreaNumber="#{help.selectedHelpDoc.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</c:if>
</ui:define>
Modified: trunk/examples/wiki/view/includes/mainMenu.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/mainMenu.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/mainMenu.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -11,12 +11,15 @@
<div class="mainMenuHeader"><ui:insert name="mainMenuHeader"> </ui:insert></div>
- <ui:include src="mainMenuItem.xhtml">
- <ui:param name="node" value="#{menu.root}"/>
- </ui:include>
+ <s:cache region="#{menu.cacheRegion}" key="#{menu.cacheKey}">
+ <ui:include src="mainMenuItem.xhtml">
+ <ui:param name="node" value="#{menu.root}"/>
+ </ui:include>
+ </s:cache>
<div class="mainMenuFooter"><ui:insert name="mainMenuFooter"> </ui:insert></div>
</div></s:div>
+
</div>
Modified: trunk/examples/wiki/view/includes/ownerSelector.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/ownerSelector.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/ownerSelector.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -76,17 +76,17 @@
<a:commandLink action="#{userSearch.firstPage()}" rendered="#{userSearch.previousPageAvailable}" tabindex="20"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
reRender="dialogOwnerSelectionContent" styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.first.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.previousPageAvailable}"/>
<a:commandLink action="#{userSearch.previousPage()}" rendered="#{userSearch.previousPageAvailable}" tabindex="20"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
reRender="dialogOwnerSelectionContent" styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.previous.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.previousPageAvailable}"/>
<h:outputText value="#{messages['lacewiki.label.userList.Found']} #{userSearch.rowCount} #{messages['lacewiki.label.userList.Members']}"/>
@@ -94,17 +94,17 @@
<a:commandLink action="#{userSearch.nextPage()}" rendered="#{userSearch.nextPageAvailable}" tabindex="20"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
reRender="dialogOwnerSelectionContent" styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.next.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.nextPageAvailable}"/>
<a:commandLink action="#{userSearch.lastPage()}" rendered="#{userSearch.nextPageAvailable}" tabindex="20"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
reRender="dialogOwnerSelectionContent" styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.last.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.nextPageAvailable}"/>
</h:panelGrid>
@@ -129,9 +129,9 @@
<a:commandLink action="#{userSearch.sortBy('username')}" tabindex="20" reRender="dialogOwnerSelectionContent"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'username'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'username'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.Username']}"/>
</a:commandLink>
@@ -145,9 +145,9 @@
<a:commandLink action="#{userSearch.sortBy('firstname')}" tabindex="20" reRender="dialogOwnerSelectionContent"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'firstname'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'firstname'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.FirstName']}"/>
</a:commandLink>
@@ -160,9 +160,9 @@
<a:commandLink action="#{userSearch.sortBy('lastname')}" tabindex="20" reRender="dialogOwnerSelectionContent"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'lastname'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'lastname'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.LastName']}"/>
</a:commandLink>
@@ -175,9 +175,9 @@
<a:commandLink action="#{userSearch.sortBy('email')}" tabindex="20" reRender="dialogOwnerSelectionContent"
oncomplete="jQuery('#dialogOwnerSelection').jqmAddClose('.closeDialog'); onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'email'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'email'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.Email']}"/>
</a:commandLink>
Modified: trunk/examples/wiki/view/includes/pager.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/pager.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/pager.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -18,15 +18,15 @@
rendered="#{pager.previousPageAvailable and not useAjax}">
<f:param name="page" value="0"/>
<f:param name="pageSize" value="#{pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.first.gif" width="13" height="11"/>
</s:link>
<a:commandLink action="#{pager.setFirstPage}" tabindex="1"
rendered="#{pager.previousPageAvailable and useAjax}"
status="globalStatus"
reRender="#{renderOnSelect}">
- <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.first.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!pager.previousPageAvailable}"/>
</s:fragment>
@@ -35,15 +35,15 @@
rendered="#{pager.previousPageAvailable and not useAjax}">
<f:param name="page" value="#{pager.previousPage}"/>
<f:param name="pageSize" value="#{pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.previous.gif" width="13" height="11"/>
</s:link>
<a:commandLink action="#{pager.setPreviousPage}" tabindex="1"
rendered="#{pager.previousPageAvailable and useAjax}"
status="globalStatus"
reRender="#{renderOnSelect}">
- <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.previous.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!pager.previousPageAvailable}"/>
</s:fragment>
@@ -59,15 +59,15 @@
rendered="#{pager.nextPageAvailable and not useAjax}">
<f:param name="page" value="#{pager.nextPage}"/>
<f:param name="pageSize" value="#{pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.next.gif" width="13" height="11"/>
</s:link>
<a:commandLink action="#{pager.setNextPage}" tabindex="1"
rendered="#{pager.nextPageAvailable and useAjax}"
status="globalStatus"
reRender="#{renderOnSelect}">
- <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.next.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!pager.nextPageAvailable}"/>
</s:fragment>
@@ -76,15 +76,15 @@
rendered="#{pager.nextPageAvailable and not useAjax}">
<f:param name="page" value="#{pager.lastPage}"/>
<f:param name="pageSize" value="#{pager.pageSize}"/>
- <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.last.gif" width="13" height="11"/>
</s:link>
<a:commandLink action="#{pager.setLastPage}" tabindex="1"
rendered="#{pager.nextPageAvailable and useAjax}"
status="globalStatus"
reRender="#{renderOnSelect}">
- <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.last.gif" width="13" height="11"/>
</a:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!pager.nextPageAvailable}"/>
</s:fragment>
Modified: trunk/examples/wiki/view/includes/pluginPreferencesForm.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/pluginPreferencesForm.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/pluginPreferencesForm.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -64,7 +64,7 @@
</h:inputText>
<s:selectDate for="dt" dateFormat="dd. MMM yyyy, HH:mm">
<h:graphicImage style="vertical-align:bottom;margin-bottom:2px;"
- value="#{themePath}/img/icon.calendar.gif" width="16"
+ value="#{imagePath}/icon.calendar.gif" width="16"
height="16"/>
</s:selectDate>
</s:div>
Modified: trunk/examples/wiki/view/includes/preferences/editor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/preferences/editor.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/preferences/editor.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -41,7 +41,7 @@
</h:inputText>
<s:selectDate for="dt" dateFormat="dd. MMM yyyy, HH:mm">
<h:graphicImage style="vertical-align:bottom;margin-bottom:2px;"
- value="#{themePath}/img/icon.calendar.gif"
+ value="#{imagePath}/icon.calendar.gif"
width="16" height="16"/>
</s:selectDate>
</s:div>
Modified: trunk/examples/wiki/view/includes/sortableHeader.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/sortableHeader.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/sortableHeader.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -10,9 +10,9 @@
<a:commandLink action="#{sortAction.sortBy(sortProperty)}" tabindex="1"
status="globalStatus"
reRender="#{renderOnSelect}">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" styleClass="sortIndicator"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" styleClass="sortIndicator"
rendered="#{!sortStatus.orderDescending and sortStatus.orderByProperty.toString() == sortProperty}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" styleClass="sortIndicator"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" styleClass="sortIndicator"
rendered="#{sortStatus.orderDescending and sortStatus.orderByProperty.toString() == sortProperty}"/>
<h:outputText value="#{label}"/>
</a:commandLink>
Modified: trunk/examples/wiki/view/includes/userInfo.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfo.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/userInfo.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -39,7 +39,7 @@
currentAreaNumber="#{wikiStart.areaNumber}"
internalTargetFrame="_top"
externalTargetFrame="_top"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:span>
<s:div rendered="#{!empty user.profile.website}" styleClass="userInfoEntry">
Modified: trunk/examples/wiki/view/includes/wikiTextEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiTextEditor.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/wikiTextEditor.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -44,7 +44,7 @@
<s:div styleClass="errorMessage" rendered="#{wiki:hasMessage(namingContainer, wiki:concat(textEditorId, 'TextArea'))}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0">
- <h:graphicImage value="#{themePath}/img/attention.gif"
+ <h:graphicImage value="#{imagePath}/attention.gif"
width="18" height="18"
styleClass="attentionImage"/>
<s:span styleClass="attentionMessage"> <span id="#{textEditorId}MessageText"><h:message for="#{textEditorId}TextArea"/></span></s:span>
Modified: trunk/examples/wiki/view/includes/wikiTextPreview.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiTextPreview.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/wikiTextPreview.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -15,7 +15,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFilet="#{baseDocument}"
currentAreaNumber="#{baseDirectory.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
</s:div>
</s:div>
Modified: trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/includes/wikiUploadImageEditor.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -22,17 +22,17 @@
<a:commandLink status="globalStatus" id="zoomOut" tabindex="2" action="#{editor.zoomPreviewOut}"
reRender="imagePreview, messageBoxContainer" oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/minus.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/minus.gif" width="18" height="18"/>
</a:commandLink>
<a:commandLink status="globalStatus" id="actualSize" tabindex="2" action="#{editor.zoomActualSize}"
reRender="imagePreview, messageBoxContainer" oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/equals.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/equals.gif" width="18" height="18"/>
</a:commandLink>
<a:commandLink status="globalStatus" id="zoomIn" tabindex="2" action="#{editor.zoomPreviewIn}"
reRender="imagePreview, messageBoxContainer" oncomplete="onAjaxRequestComplete()"
styleClass="sessionEventTrigger">
- <h:graphicImage value="#{themePath}/img/plus.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/plus.gif" width="18" height="18"/>
</a:commandLink>
</a:region>
</h:panelGroup>
Modified: trunk/examples/wiki/view/search_d.xhtml
===================================================================
--- trunk/examples/wiki/view/search_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/search_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -147,16 +147,16 @@
<h:commandLink action="#{wikiSearch.firstPage()}" styleClass="sessionEventTrigger"
rendered="#{wikiSearch.previousPageAvailable}" tabindex="7">
- <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.first.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!wikiSearch.previousPageAvailable}"/>
<h:commandLink action="#{wikiSearch.previousPage()}" styleClass="sessionEventTrigger"
rendered="#{wikiSearch.previousPageAvailable}" tabindex="7">
- <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.previous.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!wikiSearch.previousPageAvailable}"/>
<h:outputText value="#{wikiSearch.firstRow} #{messages['lacewiki.label.search.To']}
@@ -165,16 +165,16 @@
<h:commandLink action="#{wikiSearch.nextPage()}" styleClass="sessionEventTrigger"
rendered="#{wikiSearch.nextPageAvailable}" tabindex="7">
- <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.next.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!wikiSearch.nextPageAvailable}"/>
<h:commandLink action="#{wikiSearch.lastPage()}" styleClass="sessionEventTrigger"
rendered="#{wikiSearch.nextPageAvailable}" tabindex="7">
- <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.last.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!wikiSearch.nextPageAvailable}"/>
</h:panelGrid>
@@ -193,7 +193,7 @@
<h:column>
<h:panelGrid columns="2">
- <h:graphicImage value="#{themePath}/img/#{hit.icon}" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/#{hit.icon}" width="18" height="20"/>
<h:outputLink value="#{hit.link}" tabindex="1"><h:outputText escape="false" value="#{hit.title}"/></h:outputLink>
</h:panelGrid>
<h:outputText styleClass="smallFont" escape="false" value="#{hit.fragment}"/>
Modified: trunk/examples/wiki/view/search_m.xhtml
===================================================================
--- trunk/examples/wiki/view/search_m.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/search_m.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -62,7 +62,7 @@
<h:column>
<h:panelGrid columns="2">
- <h:graphicImage value="#{themePath}/img/#{hit.icon}" width="18" height="20"/>
+ <h:graphicImage value="#{imagePath}/#{hit.icon}" width="18" height="20"/>
<h:outputLink value="#{hit.link}" tabindex="1"><h:outputText escape="false" value="#{hit.title}"/></h:outputLink>
</h:panelGrid>
<h:outputText escape="false" value="#{hit.fragment}"/>
Modified: trunk/examples/wiki/view/tagDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -33,13 +33,13 @@
<h:outputText value="#{messages['lacewiki.label.tagDisplay.Tag']}: #{tagQuery.tag}"/>
</f:facet>
- <h:graphicImage value="#{themePath}/img/icon.doc.gif"
+ <h:graphicImage value="#{imagePath}/icon.doc.gif"
width="18" height="20" style="vertical-align:middle;margin-right: 5px;"
rendered="#{file.isInstance('WikiDocument')}"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes[file.contentType].displayIcon}"
+ <h:graphicImage value="#{imagePath}/#{uploadTypes[file.contentType].displayIcon}"
width="18" height="20" style="vertical-align:middle;margin-right: 5px;"
rendered="#{file.isInstance('WikiUpload') and !empty uploadTypes[file.contentType]}"/>
- <h:graphicImage value="#{themePath}/img/#{uploadTypes['generic'].displayIcon}"
+ <h:graphicImage value="#{imagePath}/#{uploadTypes['generic'].displayIcon}"
width="18" height="20" style="vertical-align:middle;margin-right: 5px;"
rendered="#{file.isInstance('WikiUpload') and empty uploadTypes[file.contentType]}"/>
@@ -71,7 +71,7 @@
<h:outputText value="#{messages['lacewiki.label.tagDisplay.InDirectory']}"/>
</f:facet>
<s:fragment rendered="#{s:hasPermission('Node','read',file.parent)}">
- <h:graphicImage value="#{themePath}/img/icon.dir.gif"
+ <h:graphicImage value="#{imagePath}/icon.dir.gif"
width="18" height="20" style="vertical-align: middle; margin-right: 5px;"/>
<h:outputLink value="#{wikiURLRenderer.renderURL(file.parent)}" tabindex="1">
<h:outputText value="#{wiki:truncateString(file.parent.name, 20, '...')}"/>
Deleted: trunk/examples/wiki/view/themes/default/css/blogArchive.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/blogArchive.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/blogArchive.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,9 +0,0 @@
-.blogArchiveSelector {
- text-align: center;
-}
-.blogArchiveCombo {
- border: 0;
- margin: 10px;
- color: #000;
- font-weight: normal;
-}
Deleted: trunk/examples/wiki/view/themes/default/css/blogDirectory.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/blogDirectory.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/blogDirectory.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,84 +0,0 @@
-.blogEntryHeader {
-}
-
-.blogEntryHeader .title {
- text-align: left;
- line-height: 200%;
- font-size: 115%;
-}
-
-.blogEntryHeader .dateAuthor {
- text-align: right;
- white-space: nowrap;
- font-weight: normal;
- line-height: 100%;
-}
-
-.blogEntryContent {
- padding-left: 15px;
- padding-right: 15px;
- line-height: 150%;
- text-align: justify;
-}
-
-.blogEntryContent .wikiHeadline1 a,
-.blogEntryContent .wikiHeadline2 a,
-.blogEntryContent .wikiHeadline3 a,
-.blogEntryContent .wikiHeadline4 a {
- color: black;
-}
-
-.blogEntryFooter {
-}
-
-.blogEntryFooterTable {}
-
-.blogEntryCommentCount,
-.blogEntryCommentLink,
-.blogEntryAttachmentsLink,
-.blogEntryPermLink,
-.blogEntryWikiLink {
- padding-right: 25px;
- text-align:left;
-}
-.blogEntryCommentCountText,
-.blogEntryCommentLinkText,
-.blogEntryAttachmentsLinkText,
-.blogEntryPermLinkText,
-.blogEntryWikiLinkText {
- color: #962325;
-}
-.blogEntryCommentCountText:hover,
-.blogEntryCommentLinkText:hover,
-.blogEntryAttachmentsLinkText:hover,
-.blogEntryPermLinkText:hover,
-.blogEntryWikiLinkText:hover {
- color: #962325;
-}
-
-.blogEntrySeparator {
- height: 25px;
-}
-
-.blogPagerTable {
- width: 100%;
- font-weight: bold;
- padding: 0;
- margin: 0;
- margin-top: 10px;
- margin-bottom: 10px;
- border: 0;
- text-align: center;
-}
-
-.blogPagerColumn {
- width: 10%;
-}
-.blogPagerTextColumn {
- width: 60%;
-}
-
-.documentTags {
- margin-left: 10px;
- margin-right: 10px;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/default/css/blogRecentEntries.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/blogRecentEntries.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/blogRecentEntries.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,7 +0,0 @@
-.blogRecentEntriesDay {
- font-weight: bold;
-}
-
-.blogRecentEntriesItem {
- padding-left: 10px;
-}
Deleted: trunk/examples/wiki/view/themes/default/css/dirMenu.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/dirMenu.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/dirMenu.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,59 +0,0 @@
-.dirMenu .level1 {
-}
-
-.dirMenu .level1Body {
- background-color: white;
-}
-
-.dirMenu .level1Marker {
- display: none;
-}
-
-.dirMenu .level1Link {
- color: #962325;
- font-size: 95%;
- text-decoration: none;
-}
-
-.dirMenu .level1Link:hover {color: #666}
-
-.dirMenu .level1Children {
- background-color: white;
-}
-
-.dirMenu .level2 {
-}
-
-.dirMenu .level2Marker {
- padding-left: 2px;
- padding-right: 2px;
- font-size: 80%;
- color: #962325;
-}
-
-.dirMenu .level2Link {
- font-size: 80%;
- color: #962325;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.dirMenu .level2Link:hover {color: #666}
-
-.dirMenu .level3 {}
-
-.dirMenu .level3Marker {
- padding-left: 2px;
- padding-right: 2px;
- font-size: 80%;
- color: #962325;
-}
-
-.dirMenu .level3Link {
- font-size: 80%;
- color: #962325;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.dirMenu .level3Link:hover {color: #666}
Deleted: trunk/examples/wiki/view/themes/default/css/dirToc.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/dirToc.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/dirToc.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,20 +0,0 @@
-.dirToc {
-}
-
-.tocDirectoryLabel {
- font-weight: bold;
-}
-
-.tocDirectoryLabel {
- cursor: pointer;
-}
-
-.tocDocumentLabel {
- margin-left: 5px;
- cursor: pointer;
-}
-
-.rich-tree-node-highlighted .tocDirectoryLabel,
-.rich-tree-node-highlighted .tocDocumentLabel {
- color: black;
-}
Deleted: trunk/examples/wiki/view/themes/default/css/docPager.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/docPager.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/docPager.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,22 +0,0 @@
-.docPager {
- width: 100%;
- background: #f5f5f5;
-}
-
-.docPagerPrevious {
- text-align: left;
-}
-
-.docPagerNext {
- text-align: right;
-}
-
-.docPagerButton {
- vertical-align: text-bottom;
-}
-
-.docPagerLabel {
- margin-left: 10px;
- margin-right: 10px;
-}
-
Deleted: trunk/examples/wiki/view/themes/default/css/faqBrowser.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/faqBrowser.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/faqBrowser.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,72 +0,0 @@
-.faqControlsContainer {
- margin-bottom: 10px;
-}
-
-.faqBrowserPanel {
- border: 1px solid #C3BBB6;
- background: white url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
- padding: 2px;
- padding-left: 5px;
- padding-right: 5px;
- line-height: 250%;
-}
-
-.faqBrowserPanel .categoryLabel {
- padding-left: 5px;
- white-space:nowrap;
-}
-
-.faqBrowserPanel .categoryMenu {
- padding-left: 10px;
- padding-right: 10px;
- white-space:nowrap;
-}
-
-.faqBrowserPanel .questionsControl {
- white-space:nowrap;
-}
-
-.faqBrowserPanel .categoryLink {
- padding-left: 10px;
- padding-right: 10px;
- white-space:nowrap;
-}
-
-.faqQuestionPanel {
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
- border-bottom: 1px solid #C3BBB6;
- background: white url(#{themePathGetRequest}/img/th.bg.inverse.gif) 0 0 repeat-x;
-}
-
-.faqQuestionPanel .header {
- white-space:nowrap;
- width: 100%;
-}
-
-.faqQuestionPanel .header .categoryDescription {
- padding-left: 10px;
- line-height: 250%;
- font-weight: bold;
-}
-
-.faqQuestionPanel .header .newQuestionButton {
- text-align:right;
-}
-
-.faqQuestionPanel .noQuestions {
- padding-left: 10px;
- line-height: 250%;
-}
-
-.faqQuestionList {
- width: 100%;
-}
-
-.faqQuestionList .rowOdd {
- background-color: #fff;
-}
-
-.faqQuestionList .rowEven {
- background-color: #eae8e5;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/default/css/feedAggregator.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/feedAggregator.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/feedAggregator.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,22 +0,0 @@
-.feedAggregatorTitle {
- margin-left: auto;
-}
-
-.feedEntryColumn {
- padding: 10px;
-}
-
-.feedEntryTitle {
- font-weight: bold;
- padding-top: 15px;
- padding-bottom: 15px;
-}
-
-.feedEntryInfo {
- text-align: right;
-}
-
-.feedEntryBody {
- line-height: 150%;
- text-align:justify;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/default/css/feedTeasers.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/feedTeasers.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/feedTeasers.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,28 +0,0 @@
-.teaserColumn {
- padding: 10px;
-}
-
-.teaserTitle {
- margin-bottom: 5px;
- font-weight: bold;
-}
-
-.teaserAuthorDate {
- text-align: right;
-}
-
-.teaserAuthor {
-}
-
-.teaserAuthorLink {
- color: #962325;
- text-decoration: none;
-}
-
-.teaserDate {
-}
-
-.teaserBody {
- line-height: 150%;
- text-align:justify;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/default/css/forumList.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/forumList.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/forumList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,47 +0,0 @@
-.forumListControlsContainer {
- text-align: right;
- white-space: nowrap;
- margin-bottom: 15px;
-}
-
-.forumListTableContainer {
-}
-
-.forumFormContainer {
- margin-bottom: 20px;
-}
-
-.forumTitle {
- font-weight: normal;
- line-height: 160%;
-}
-
-.forumDescription {
- white-space: normal;
-}
-
-.topicGotoIcon {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.forumsFeedLink {
- margin: 10px;
- float: right;
- margin-top: -30px;
-}
-
-.forumsFeedLink img {
- vertical-align: middle;
- margin-right: 5px;
-}
-
-.forumFeedLink {
-
-}
-
-.forumFeedLink img {
- margin-left: 8px;
- margin-right: 8px;
- margin-bottom: 2px;
-}
Deleted: trunk/examples/wiki/view/themes/default/css/forumPosting.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/forumPosting.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/forumPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,40 +0,0 @@
-.forumPostingHeaderInfoControls {
- width: 100%;
- margin-bottom: 10px;
-}
-
-.forumPostingHeaderInfo {
- text-align: left;
-}
-
-.forumPostingHeaderControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingDocumentWrapper {
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
- border-top: 1px solid #C3BBB6;
- padding: 5px;
-}
-
-.forumPostingDocumentWrapper .subjectLink {
- margin-left: 10px;
- font-weight: normal;
- line-height: 100%;
-}
-
-.forumPostingDocumentWrapper .subjectIcon {
- vertical-align: text-top;
-}
-
-.noComments {
- border-bottom: 1px solid #C3BBB6;
-}
-
Deleted: trunk/examples/wiki/view/themes/default/css/forumReplies.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/forumReplies.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/forumReplies.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,16 +0,0 @@
-.forumReplyControls {
- width: 100%;
-}
-
-.forumReplyRating {
- text-align: left;
-}
-
-.forumReplyStatus {
- text-align: right;
-}
-
-.forumReplyControl {
- text-align: right;
- width: 200px;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/default/css/forumStickyPosting.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/forumStickyPosting.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/forumStickyPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,40 +0,0 @@
-.forumPostingHeaderInfoControls {
- width: 100%;
- margin-bottom: 10px;
-}
-
-.forumPostingHeaderInfo {
- text-align: left;
-}
-
-.forumPostingHeaderControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingDocumentWrapper {
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
- border-top: 1px solid #C3BBB6;
- padding: 5px;
-}
-
-.forumPostingDocumentWrapper .subjectLink {
- margin-left: 10px;
- font-weight: normal;
- line-height: 100%;
-}
-
-.forumPostingDocumentWrapper .subjectIcon {
- vertical-align: text-top;
-}
-
-.noComments {
- border-bottom: 1px solid #C3BBB6;
-}
-
Deleted: trunk/examples/wiki/view/themes/default/css/forumTopics.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/forumTopics.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/forumTopics.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,60 +0,0 @@
-.forumDescriptionTopicControls {
- width: 100%;
-}
-
-.forumDescription {
-}
-
-.topicControls {
- text-align: right;
- white-space: nowrap;
- padding-left: 10px;
-}
-
-.topicFormContainer {
-}
-
-.topicTableContainer {
-}
-
-.topicPager {
- width: 100%;
-}
-
-.topicPagerTable {
- width: 100%;
- font-weight: bold;
- padding: 0;
- margin: 0;
- margin-top: 10px;
- margin-bottom: 10px;
- border: 0;
- text-align: center;
-}
-
-.topicPagerColumn {
- width: 10%;
-}
-.topicPagerTextColumn {
- width: 60%;
-}
-
-.topicGotoIcon {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.forumsFeedLink {
- margin: 10px;
- float: right;
- margin-top: -30px;
-}
-
-.forumsFeedLink img {
- vertical-align: middle;
- margin-right: 5px;
-}
-
-.forumDescription {
- text-align: left;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/default/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/jiraIssueList.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/jiraIssueList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,17 +0,0 @@
-.jiraIssueList {}
-
-.jiraIssueListTable {}
-
-.jiraIssueListTable .priorityColumn {}
-
-.jiraIssueListTable .summaryColumn {}
-
-.jiraIssueListTable .jiraIssueComponents {
- text-align: right;
-}
-
-.jiraIssueListEmpty {
- padding: 5px;
-}
-
-
Deleted: trunk/examples/wiki/view/themes/default/css/lastModifiedDocuments.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/lastModifiedDocuments.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/lastModifiedDocuments.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,17 +0,0 @@
-.lastModifiedDocuments {}
-
-.lastModifiedLink {
-}
-
-.lastModifiedColumn {
- padding-bottom: 5px;
-}
-
-.lastModifiedAuthorDate {
- text-align: right;
-}
-
-.lastModifiedLink:link {color: #962325}
-.lastModifiedLink:visited {color: #962325}
-.lastModifiedLink:hover {color: #000}
-.lastModifiedLink:active {color: #aaa}
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1577,7 +1577,7 @@
}
-/* Trees
+/* Trees (undo the Richfaces default damage)
----------------------------------------------- */
.rich-tree-node {
@@ -1604,3 +1604,28 @@
padding-top: 2px;
cursor: pointer;
}
+
+
+/* Toggle Panels (undo the Richfaces default damage)
+----------------------------------------------- */
+
+.rich-stglpanel {
+ border-style: none;
+ font-size: 100%;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+.rich-stglpanel-header {
+ background: #ede8db url(../img/th.bg.gif ) 0 0 repeat-x;
+ border: 1px solid #C3BBB6;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 85%;
+}
+
+.rich-stglpanel-body {
+ border-style: none;
+ background: #fff;
+ padding: 0;
+ font-size: 100%;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
Deleted: trunk/examples/wiki/view/themes/default/img/icon.posting.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.posting_goto.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.posting_locked.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.posting_locked_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.posting_sticky.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.posting_sticky_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.posting_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.priority.blocker.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.priority.critical.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.priority.major.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.priority.minor.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.priority.optional.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/default/img/icon.priority.trivial.gif
===================================================================
(Binary files differ)
Modified: trunk/examples/wiki/view/themes/default/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/m/template.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/m/template.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -30,7 +30,7 @@
<s:div rendered="#{!empty facesMessages.currentGlobalMessages}">
<ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" columnClasses="messageBoxCell">
- <h:graphicImage value="#{themePath}/img/info.gif"
+ <h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
<h:outputText styleClass="infoMessage" value="#{message.summary}"/>
Modified: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -28,7 +28,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -35,7 +35,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -30,7 +30,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/default/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/template.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/default/template.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -20,8 +20,8 @@
<link href="#{themePath}/css/mainMenu.css" rel="stylesheet" type="text/css"/>
<ui:insert name="includeHeaders"/>
- <script type="text/javascript" src="#{basePath}/seam/resource/remoting/resource/remote.js"></script>
- <script type="text/javascript" src="#{basePath}/seam/resource/remoting/interface.js?httpSessionChecker"></script>
+ <script type="text/javascript" src="#{contextPath}/seam/resource/remoting/resource/remote.js"></script>
+ <script type="text/javascript" src="#{contextPath}/seam/resource/remoting/interface.js?httpSessionChecker"></script>
<script type="text/javascript" src="#{themePath}/js/jquery.js"></script>
<script type="text/javascript" src="#{themePath}/js/interface.js"></script>
<script type="text/javascript" src="#{themePath}/js/jqModal.js"></script>
@@ -258,7 +258,7 @@
<ui:define name="mainMenuFooter">
<s:div styleClass="feeds" rendered="#{preferences.get('Wiki').showSiteFeedInMenu}">
<h:outputLink value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
- <h:graphicImage value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/icon.atom.gif" width="18" height="18"/>
<span class="feedText">#{messages['lacewiki.button.SiteFeed']}</span>
</h:outputLink>
</s:div>
@@ -285,7 +285,7 @@
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
rendered="#{message.severity.ordinal == 0}">
- <h:graphicImage value="#{themePath}/img/info.gif"
+ <h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
<h:outputText styleClass="infoMessage" value="#{message.summary}"/>
@@ -293,7 +293,7 @@
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
rendered="#{message.severity.ordinal > 0}">
- <h:graphicImage value="#{themePath}/img/attention.gif"
+ <h:graphicImage value="#{imagePath}/attention.gif"
rendered="#{message.severity.ordinal > 0}"
width="18" height="18"
styleClass="attentionImage"/>
@@ -341,12 +341,12 @@
<a:status id="globalStatus" forceId="true">
<f:facet name="start">
<s:div styleClass="statusStart">
- <h:graphicImage value="#{themePath}/img/statusindicator.gif" width="20" height="25"/>
+ <h:graphicImage value="#{imagePath}/statusindicator.gif" width="20" height="25"/>
</s:div>
</f:facet>
<f:facet name="stop">
<s:div styleClass="statusStop">
- <h:graphicImage value="#{themePath}/img/blank.gif" width="20" height="25"/>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="20" height="25"/>
</s:div>
</f:facet>
</a:status>
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/blogArchive.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/blogArchive.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/blogArchive.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,10 +0,0 @@
-.blogArchiveSelector {
- text-align: center;
-}
-.blogArchiveCombo {
- border: 0;
- color: #000;
- font-size: 91%;
- font-weight: normal;
- font-family: "Lucida Sans", Arial, Helvetica, sans-serif;
-}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/blogDirectory.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/blogDirectory.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/blogDirectory.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,102 +0,0 @@
-#blogDirectoryPlugin\:blogEntries .boxheader {
- padding-bottom: 0;
-}
-
-#blogDirectoryPlugin\:blogEntries .boxContent {
- padding-top: 0;
- padding-bottom: 0;
-}
-
-#blogDirectoryPlugin\:blogEntries .boxContent .wikiPara:first-child {
- padding-top: 5px;
- margin-top: 0;
-}
-
-.blogEntryHeader .title {
- text-align: left;
- line-height: 200%;
- font-size: 120%;
-}
-
-.blogEntryHeader .dateAuthor {
- text-align: right;
- white-space: nowrap;
- font-weight: normal;
- line-height: 100%;
-}
-
-.blogEntryContent {
- padding-left: 15px;
- padding-right: 15px;
- line-height: 150%;
- text-align: justify;
-}
-
-.blogEntryContent .documentTags {
- padding-top: 5px;
- padding-bottom: 5px;
- padding-left: 0;
- padding-right: 0;
- margin: 0;
- font-size: 85%;
-}
-
-.blogEntryContent .wikiHeadline1 a,
-.blogEntryContent .wikiHeadline2 a,
-.blogEntryContent .wikiHeadline3 a,
-.blogEntryContent .wikiHeadline4 a {
- color: black;
-}
-
-.blogEntryFooter {
- font-size: 85%;
-}
-
-.blogEntryFooterTable {
- margin-right: auto;
-}
-
-.blogEntryCommentCount,
-.blogEntryCommentLink,
-.blogEntryAttachmentsLink,
-.blogEntryPermLink,
-.blogEntryWikiLink {
- padding-right: 25px;
- text-align:left;
-}
-.blogEntryCommentCountText,
-.blogEntryCommentLinkText,
-.blogEntryAttachmentsLinkText,
-.blogEntryPermLinkText,
-.blogEntryWikiLinkText {
- color: #d75525;
-}
-.blogEntryCommentCountText:hover,
-.blogEntryCommentLinkText:hover,
-.blogEntryAttachmentsLinkText:hover,
-.blogEntryPermLinkText:hover,
-.blogEntryWikiLinkText:hover {
- color: #666;
-}
-
-.blogEntrySeparator {
- height: 25px;
-}
-
-.blogPagerTable {
- width: 100%;
- font-weight: bold;
- padding: 0;
- margin: 0;
- margin-top: 10px;
- margin-bottom: 10px;
- border: 0;
- text-align: center;
-}
-
-.blogPagerColumn {
- width: 10%;
-}
-.blogPagerTextColumn {
- width: 60%;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/blogRecentEntries.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/blogRecentEntries.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/blogRecentEntries.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,7 +0,0 @@
-.blogRecentEntriesDay {
- font-weight: bold;
-}
-
-.blogRecentEntriesItem {
- padding-left: 10px;
-}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/dirMenu.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/dirMenu.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/dirMenu.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,59 +0,0 @@
-.dirMenu .level1 {
-}
-
-.dirMenu .level1Body {
- background-color: white;
-}
-
-.dirMenu .level1Marker {
- display: none;
-}
-
-.dirMenu .level1Link {
- color: #d75525;
- font-size: 95%;
- text-decoration: none;
-}
-
-.dirMenu .level1Link:hover {color: #666}
-
-.dirMenu .level1Children {
- background-color: white;
-}
-
-.dirMenu .level2 {
-}
-
-.dirMenu .level2Marker {
- color: #d75525;
- padding-left: 2px;
- padding-right: 2px;
- font-size: 80%;
-}
-
-.dirMenu .level2Link {
- color: #d75525;
- font-size: 80%;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.dirMenu .level2Link:hover {color: #666}
-
-.dirMenu .level3 {}
-
-.dirMenu .level3Marker {
- color: #d75525;
- padding-left: 2px;
- padding-right: 2px;
- font-size: 80%;
-}
-
-.dirMenu .level3Link {
- color: #d75525;
- font-size: 80%;
- text-decoration: none;
- white-space: nowrap;
-}
-
-.dirMenu .level3Link:hover {color: #666}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/dirToc.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,20 +0,0 @@
-.dirToc {
-}
-
-.tocDirectoryLabel {
- font-weight: bold;
-}
-
-.tocDirectoryLabel {
- cursor: pointer;
-}
-
-.tocDocumentLabel {
- margin-left: 5px;
- cursor: pointer;
-}
-
-.rich-tree-node-highlighted .tocDirectoryLabel,
-.rich-tree-node-highlighted .tocDocumentLabel {
- color: black;
-}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/docPager.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/docPager.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/docPager.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,22 +0,0 @@
-.docPager {
- width: 100%;
- background: #f5f5f5;
-}
-
-.docPagerPrevious {
- text-align: left;
-}
-
-.docPagerNext {
- text-align: right;
-}
-
-.docPagerButton {
- vertical-align: text-bottom;
-}
-
-.docPagerLabel {
- margin-left: 10px;
- margin-right: 10px;
-}
-
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/faqBrowser.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/faqBrowser.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/faqBrowser.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,78 +0,0 @@
-#faqBrowserPlugin\:faqQuestionForm {
- border: 1px solid #C3BBB6;
-}
-
-#faqBrowserPlugin\:faqQuestionForm .form {
- margin:0;
-}
-
-.faqControlsContainer {
- margin-bottom: 10px;
-}
-
-.faqBrowserPanel {
- border: 1px solid #C3BBB6;
- background: #d6d5c8 url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
- padding: 2px;
- padding-left: 5px;
- padding-right: 5px;
-}
-
-.faqBrowserPanel .categoryLabel {
- padding-left: 5px;
- white-space:nowrap;
-}
-
-.faqBrowserPanel .categoryMenu {
- padding-left: 10px;
- padding-right: 10px;
- white-space:nowrap;
-}
-
-.faqBrowserPanel .questionsControl {
- white-space:nowrap;
-}
-
-.faqBrowserPanel .categoryLink {
- padding-left: 10px;
- padding-right: 10px;
- white-space:nowrap;
-}
-
-.faqQuestionPanel {
- border-left: 1px solid #C3BBB6;
- border-right: 1px solid #C3BBB6;
- border-bottom: 1px solid #C3BBB6;
- background: white url(#{themePathGetRequest}/img/th.bg.inverse.gif) 0 0 repeat-x;
-}
-
-.faqQuestionPanel .header {
- white-space:nowrap;
- width: 100%;
-}
-
-.faqQuestionPanel .header .categoryDescription {
- padding-left: 10px;
- line-height: 250%;
- font-weight: bold;
-}
-
-.faqQuestionPanel .header .newQuestionButton {
- text-align:right;
-}
-
-.faqQuestionPanel .noQuestions {
- padding-left: 10px;
- line-height: 250%;
-}
-
-.faqQuestionList {
-}
-
-.faqQuestionList .rowOdd {
- background-color: #fff;
-}
-
-.faqQuestionList .rowEven {
- background-color: #eae8e5;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/feedAggregator.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/feedAggregator.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/feedAggregator.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,22 +0,0 @@
-.feedAggregatorTitle {
- margin-left: auto;
-}
-
-.feedEntryColumn {
- padding: 10px;
-}
-
-.feedEntryTitle {
- font-weight: bold;
- padding-top: 15px;
- padding-bottom: 15px;
-}
-
-.feedEntryInfo {
- text-align: right;
-}
-
-.feedEntryBody {
- line-height: 150%;
- text-align:justify;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/feedTeasers.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/feedTeasers.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/feedTeasers.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,28 +0,0 @@
-.teaserColumn {
- padding: 10px;
-}
-
-.teaserTitle {
- margin-bottom: 5px;
- font-weight: bold;
-}
-
-.teaserAuthorDate {
- text-align: right;
-}
-
-.teaserAuthor {
-}
-
-.teaserAuthorLink {
- color: #d75525;
- text-decoration: none;
-}
-
-.teaserDate {
-}
-
-.teaserBody {
- line-height: 150%;
- text-align:justify;
-}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/forumList.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/forumList.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/forumList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,55 +0,0 @@
-.forumListControlsContainer {
- text-align: right;
- white-space: nowrap;
- margin-bottom: 15px;
-}
-
-.forumListTableContainer {
-}
-
-.forumListRow td {
- padding-top: 10px;
- padding-bottom: 10px;
-}
-
-.forumFormContainer {
- margin-bottom: 20px;
-}
-
-.forumTitle {
- font-weight: bold;
-}
-
-.forumDescription {
- white-space: normal;
-}
-
-.topicGotoIcon {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.forumsFeedLink {
- margin: 10px;
- float: right;
- margin-top: -35px;
-}
-
-.forumsFeedLink img {
- vertical-align: middle;
- margin-right: 5px;
-}
-
-.forumFeedLink {
-
-}
-
-.forumFeedLink img {
- margin-left: 8px;
- margin-right: 8px;
- margin-bottom: 2px;
-}
-
-.userInfoPopupContainer {
- text-align: left;
-}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/forumPosting.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/forumPosting.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/forumPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,37 +0,0 @@
-.forumPostingHeaderInfoControls {
- width: 100%;
- margin-bottom: 10px;
-}
-
-.forumPostingHeaderInfo {
- text-align: left;
-}
-
-.forumPostingHeaderControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingDocumentWrapper {
- padding: 5px;
-}
-
-.forumPostingDocumentWrapper .subjectLink {
- margin-left: 10px;
- font-weight: normal;
- line-height: 100%;
-}
-
-.forumPostingDocumentWrapper .subjectIcon {
- vertical-align: text-top;
-}
-
-.noComments {
- border-bottom: 1px solid #C3BBB6;
-}
-
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/forumReplies.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/forumReplies.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/forumReplies.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,24 +0,0 @@
-#forumRepliesPlugin\:forumRepliesContainer .commentsDisplay {
- margin-top: 15px;
-}
-
-#forumRepliesPlugin\:forumRepliesContainer .commentsDisplay .boxShadowed {
- padding-bottom: 15px;
-}
-
-.forumReplyControls {
- width: 100%;
-}
-
-.forumReplyRating {
- text-align: left;
-}
-
-.forumReplyStatus {
- text-align: right;
-}
-
-.forumReplyControl {
- text-align: right;
- width: 200px;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/forumStickyPosting.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/forumStickyPosting.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/forumStickyPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,37 +0,0 @@
-.forumPostingHeaderInfoControls {
- width: 100%;
- margin-bottom: 10px;
-}
-
-.forumPostingHeaderInfo {
- text-align: left;
-}
-
-.forumPostingHeaderControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingDocumentWrapper {
- padding: 5px;
-}
-
-.forumPostingDocumentWrapper .subjectLink {
- margin-left: 10px;
- font-weight: normal;
- line-height: 100%;
-}
-
-.forumPostingDocumentWrapper .subjectIcon {
- vertical-align: text-top;
-}
-
-.noComments {
- border-bottom: 1px solid #C3BBB6;
-}
-
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/forumTopics.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/forumTopics.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/forumTopics.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,61 +0,0 @@
-.forumDescriptionTopicControls {
- width: 100%;
-}
-
-.forumDescription {
-}
-
-.topicControls {
- text-align: right;
- white-space: nowrap;
- padding-left: 10px;
-}
-
-.topicFormContainer {
-}
-
-.topicTableContainer {
-}
-
-.topicPager {
- width: 100%;
-}
-
-.topicPagerTable {
- width: 100%;
- font-weight: bold;
- padding: 0;
- margin: 0;
- margin-top: 10px;
- margin-bottom: 10px;
- border: 0;
- text-align: center;
-}
-
-.topicPagerColumn {
- width: 10%;
-}
-.topicPagerTextColumn {
- width: 60%;
-}
-
-.topicGotoIcon {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.forumsFeedLink {
- margin: 10px;
- float: right;
- margin-top: -35px;
-
-}
-
-.forumsFeedLink img {
- vertical-align: middle;
- margin-right: 5px;
-}
-
-.forumDescription {
- text-align: left;
-}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/jiraIssueList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,17 +0,0 @@
-.jiraIssueList {}
-
-.jiraIssueListTable {}
-
-.jiraIssueListTable .priorityColumn {}
-
-.jiraIssueListTable .summaryColumn {}
-
-.jiraIssueListTable .jiraIssueComponents {
- text-align: right;
-}
-
-.jiraIssueListEmpty {
- padding: 5px;
-}
-
-
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/lastModifiedDocuments.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/lastModifiedDocuments.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/lastModifiedDocuments.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,17 +0,0 @@
-.lastModifiedDocuments {}
-
-.lastModifiedLink {
-}
-
-.lastModifiedColumn {
- padding-bottom: 5px;
-}
-
-.lastModifiedAuthorDate {
- text-align: right;
-}
-
-.lastModifiedLink:link {color: #d75525}
-.lastModifiedLink:visited {color: #d75525}
-.lastModifiedLink:hover {color: #000}
-.lastModifiedLink:active {color: #aaa}
Deleted: trunk/examples/wiki/view/themes/inrelationto/css/userProfile.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/userProfile.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/css/userProfile.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,43 +0,0 @@
-.userProfilePortrait {
- margin-left: 10px;
- margin-right: 10px;
- margin-top: 3px;
- margin-bottom: 5px;
- float: left;
-}
-
-.userProfilePortraitImage {
- border: 1px solid #87786e;
-}
-
-.userProfileBio{
- font-size: 75%;
- margin-right: 10px;
- margin-left: 10px;
- color: #000;
- text-align: justify;
- line-height: 130%;
-}
-
-.userProfileEntry {
- clear: both;
- margin-bottom: 5px;
- margin-left: 10px;
- margin-right: 10px;
- font-size: 75%;
- color: #000;
- line-height: 140%;
-}
-
-.userProfileEntryLabel {
- font-weight: bold;
-}
-
-.userProfileEntryText {
-}
-
-.userProfileEntryLink {
- color: #d75525;
-}
-
-.userProfileEntryLink:hover {color: #666}
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.posting.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_goto.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_locked.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_locked_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_sticky.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_sticky_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.posting_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.blocker.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.critical.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.major.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.minor.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.optional.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/inrelationto/img/icon.priority.trivial.gif
===================================================================
(Binary files differ)
Modified: trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/m/template.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -31,7 +31,7 @@
<s:div rendered="#{!empty facesMessages.currentGlobalMessages}">
<ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" columnClasses="messageBoxCell">
- <h:graphicImage value="#{themePath}/img/info.gif"
+ <h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
<h:outputText styleClass="infoMessage" value="#{message.summary}"/>
Modified: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -28,7 +28,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -35,7 +35,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -30,7 +30,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/inrelationto/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/inrelationto/template.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -17,8 +17,8 @@
<ui:insert name="includeHeaders"/>
- <script type="text/javascript" src="#{basePath}/seam/resource/remoting/resource/remote.js"></script>
- <script type="text/javascript" src="#{basePath}/seam/resource/remoting/interface.js?httpSessionChecker"></script>
+ <script type="text/javascript" src="#{contextPath}/seam/resource/remoting/resource/remote.js"></script>
+ <script type="text/javascript" src="#{contextPath}/seam/resource/remoting/interface.js?httpSessionChecker"></script>
<script type="text/javascript" src="#{themePath}/js/jquery.js"></script>
<script type="text/javascript" src="#{themePath}/js/jqueryPlugins.js"></script>
<script type="text/javascript" src="#{themePath}/js/lacewiki.js"></script>
@@ -225,7 +225,7 @@
<s:div id="headerTopTwo">
<s:div styleClass="sitename">
<h:outputLink value="#{preferences.get('Wiki').baseUrl}" styleClass="sitenameLink">
- <h:graphicImage value="#{themePath}/img/inrelationto.gif" width="214" height="25"/>
+ <h:graphicImage value="#{imagePath}/inrelationto.gif" width="214" height="25"/>
</h:outputLink>
</s:div>
<ui:include src="../../includes/userControl.xhtml"/>
@@ -268,7 +268,7 @@
<ui:define name="mainMenuHeader">
<s:div styleClass="feeds" rendered="#{preferences.get('Wiki').showSiteFeedInMenu}">
<h:outputLink value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
- <h:graphicImage value="#{themePath}/img/icon.atom.gif" width="18" height="18"/>
+ <h:graphicImage value="#{imagePath}/icon.atom.gif" width="18" height="18"/>
<span class="feedText">#{messages['lacewiki.button.SiteFeed']}</span>
</h:outputLink>
</s:div>
@@ -289,7 +289,7 @@
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
rendered="#{message.severity.ordinal == 0}">
- <h:graphicImage value="#{themePath}/img/info.gif"
+ <h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="messageBoxImage infoImage"/>
<h:outputText styleClass="infoMessage" value="#{message.summary}"/>
@@ -297,7 +297,7 @@
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
rendered="#{message.severity.ordinal > 0}">
- <h:graphicImage value="#{themePath}/img/attention.gif"
+ <h:graphicImage value="#{imagePath}/attention.gif"
rendered="#{message.severity.ordinal > 0}"
width="18" height="18"
styleClass="messageBoxImage attentionImage"/>
@@ -342,12 +342,12 @@
<a:status id="globalStatus" forceId="true">
<f:facet name="start">
<s:div styleClass="statusStart">
- <h:graphicImage value="#{themePath}/img/statusindicator.gif" width="20" height="25"/>
+ <h:graphicImage value="#{imagePath}/statusindicator.gif" width="20" height="25"/>
</s:div>
</f:facet>
<f:facet name="stop">
<s:div styleClass="statusStop">
- <h:graphicImage value="#{themePath}/img/blank.gif" width="20" height="25"/>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="20" height="25"/>
</s:div>
</f:facet>
</a:status>
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/blogArchive.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,18 +0,0 @@
-.blogArchiveSelector {
- text-align: center;
-}
-.blogArchiveCombo {
- border: 0;
- color: #000;
- font-weight: normal;
-}
-
-.blogArchiveFooter {
- background: #ede8db url(#{themePath}/img/th.bg.gif) 0 0 repeat-x;
- padding-top: 5px;
- padding-bottom: 10px;
- padding-left: 15px;
- padding-right: 15px;
- font-weight: normal;
- color: #962325;
-}
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/blogDirectory.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,89 +0,0 @@
-
-.blogEntryHeader {
-}
-
-.blogEntryHeader .title {
- text-align: left;
- line-height: 200%;
- font-size: 115%;
-}
-
-.blogEntryHeader .dateAuthor {
- text-align: right;
- white-space: nowrap;
- font-weight: normal;
- line-height: 100%;
-}
-
-.blogEntryContent {
- padding-left: 15px;
- padding-right: 15px;
- line-height: 150%;
- text-align: justify;
-}
-
-.blogEntryContent .wikiPara {
- margin-top: 0;
-}
-
-.blogEntryContent .wikiHeadline1 a,
-.blogEntryContent .wikiHeadline2 a,
-.blogEntryContent .wikiHeadline3 a,
-.blogEntryContent .wikiHeadline4 a {
- color: black;
-}
-
-.blogEntryFooter {
-}
-
-.blogEntryFooterTable {
-}
-
-.blogEntryCommentCount,
-.blogEntryCommentLink,
-.blogEntryAttachmentsLink,
-.blogEntryPermLink,
-.blogEntryWikiLink {
- padding-right: 25px;
- text-align:left;
-}
-.blogEntryCommentCountText,
-.blogEntryCommentLinkText,
-.blogEntryAttachmentsLinkText,
-.blogEntryPermLinkText,
-.blogEntryWikiLinkText {
- color: #576c74;
-}
-.blogEntryCommentCountText:hover,
-.blogEntryCommentLinkText:hover,
-.blogEntryAttachmentsLinkText:hover,
-.blogEntryPermLinkText:hover,
-.blogEntryWikiLinkText:hover {
- color: #000;
-}
-
-.blogEntrySeparator {
- height: 25px;
-}
-
-.blogPagerTable {
- width: 100%;
- font-weight: bold;
- padding: 0;
- margin: 0;
- margin-top: 10px;
- margin-bottom: 10px;
- border: 0;
- text-align: center;
-}
-
-.blogPagerColumn {
- width: 10%;
-}
-.blogPagerTextColumn {
- width: 60%;
-}
-
-.documentTags {
- margin-top: 10px;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/blogRecentEntries.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/blogRecentEntries.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/blogRecentEntries.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,12 +0,0 @@
-.blogRecentEntriesDay {
- font-weight: bold;
-}
-
-.blogRecentEntriesItem {
- padding-left: 10px;
- padding-top: 2px;
- padding-bottom: 2px;
-}
-
-.blogRecentEntriesItemLink {
-}
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/dirMenu.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/dirMenu.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/dirMenu.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,42 +0,0 @@
-.dirMenu .level1 {
-}
-
-.dirMenu .level1Body {
- background-color: white;
-}
-
-.dirMenu .level1Marker {
- display: none;
-}
-
-.dirMenu .level1Link {
-}
-
-
-.dirMenu .level1Children {
- background-color: white;
-}
-
-.dirMenu .level2 {
-}
-
-.dirMenu .level2Marker {
- padding-left: 2px;
- padding-right: 2px;
-}
-
-.dirMenu .level2Link {
- white-space: nowrap;
-}
-
-.dirMenu .level3 {}
-
-.dirMenu .level3Marker {
- padding-left: 2px;
- padding-right: 2px;
-}
-
-.dirMenu .level3Link {
- white-space: nowrap;
-}
-
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/dirToc.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,21 +0,0 @@
-.dirToc {
-}
-
-.tocDirectoryPanel {
- margin-top: 5px;
-}
-
-.tocDirectoryLabel {
- font-weight: bold;
- cursor: pointer;
-}
-
-.tocDocumentLabel {
- margin-left: 5px;
- cursor: pointer;
-}
-
-.rich-tree-node-highlighted .tocDirectoryLabel,
-.rich-tree-node-highlighted .tocDocumentLabel {
- color: black;
-}
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/docPager.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/docPager.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/docPager.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,22 +0,0 @@
-.docPager {
- width: 100%;
- background: #f5f5f5;
-}
-
-.docPagerPrevious {
- text-align: left;
-}
-
-.docPagerNext {
- text-align: right;
-}
-
-.docPagerButton {
- vertical-align: text-bottom;
-}
-
-.docPagerLabel {
- margin-left: 10px;
- margin-right: 10px;
-}
-
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/faqBrowser.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,73 +0,0 @@
-.faqControlsContainer {
- margin-bottom: 10px;
-}
-
-.faqBrowserPanel {
- border: 1px solid #d3d2d1;
- background: #ede8db url(#{themePathGetRequest}/img/th.bg.gif) 0 0 repeat-x;
- padding-left: 5px;
- padding-right: 5px;
- padding-top: 5px;
- line-height: 250%;
-}
-
-.faqBrowserPanel .categoryLabel {
- padding-left: 5px;
- white-space:nowrap;
-}
-
-.faqBrowserPanel .categoryMenu {
- padding-left: 10px;
- padding-right: 10px;
- white-space:nowrap;
-}
-
-.faqBrowserPanel .questionsControl {
- white-space:nowrap;
-}
-
-.faqBrowserPanel .categoryLink {
- padding-left: 10px;
- padding-right: 10px;
- white-space:nowrap;
-}
-
-.faqQuestionPanel {
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
- border-bottom: 1px solid #d3d2d1;
- background: white url(#{themePathGetRequest}/img/th.bg.inverse.gif) 0 0 repeat-x;
-}
-
-.faqQuestionPanel .header {
- white-space:nowrap;
- width: 100%;
-}
-
-.faqQuestionPanel .header .categoryDescription {
- padding-left: 10px;
- line-height: 250%;
- font-weight: bold;
-}
-
-.faqQuestionPanel .header .newQuestionButton {
- text-align:right;
-}
-
-.faqQuestionPanel .noQuestions {
- padding-left: 10px;
- line-height: 250%;
-}
-
-.faqQuestionList {
- border-right: 1px solid #d3d2d1;
- width: 100%;
-}
-
-.faqQuestionList .rowOdd {
- background-color: #fff;
-}
-
-.faqQuestionList .rowEven {
- background-color: #f5f5f5;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/feedAggregator.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,20 +0,0 @@
-.feedAggregatorTitle {
- margin-left:auto;
-}
-
-.feedEntryColumn {
- padding: 10px;
-}
-
-.feedEntryTitle {
- margin-bottom: 5px;
- font-weight: bold;
-}
-
-.feedEntryInfo {
- text-align: right;
-}
-
-.feedEntryBody {
- line-height: 130%;
-}
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/feedTeasers.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/feedTeasers.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/feedTeasers.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,22 +0,0 @@
-.teaserColumn {
- padding: 10px;
-}
-
-.teaserTitle {
- margin-bottom: 5px;
- font-weight: bold;
-}
-
-.teaserAuthorDate {
- text-align: right;
-}
-
-.teaserAuthor {
-}
-
-.teaserDate {
-}
-
-.teaserBody {
- line-height: 130%;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/forumList.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/forumList.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/forumList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,48 +0,0 @@
-.forumListControlsContainer {
- text-align: right;
- white-space: nowrap;
- margin-bottom: 15px;
-}
-
-.forumListTableContainer {
-}
-
-.forumFormContainer {
- margin-bottom: 20px;
-}
-
-.forumTitle {
- font-weight: normal;
- line-height: 180%;
-}
-
-.forumDescription {
- white-space: normal;
- line-height: 130%;
-}
-
-.topicGotoIcon {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.forumsFeedLink {
- margin: 10px;
- float: right;
- margin-top: -40px;
-}
-
-.forumsFeedLink img {
- vertical-align: middle;
- margin-right: 5px;
-}
-
-.forumFeedLink {
-
-}
-
-.forumFeedLink img {
- margin-left: 5px;
- margin-bottom: 3px;
-}
-
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/forumPosting.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/forumPosting.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/forumPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,33 +0,0 @@
-.forumPostingHeaderInfoControls {
- width: 100%;
- margin-bottom: 10px;
-}
-
-.forumPostingHeaderInfo {
- text-align: left;
- color:#576c74;
- font-weight: bold;
-}
-
-.forumPostingHeaderControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingControls {
- text-align: right;
- white-space: nowrap;
- margin-bottom: 10px;
-}
-
-.forumPostingDocumentWrapper {
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
- border-top: 1px solid #d3d2d1;
- padding: 5px;
-}
-
-.noComments {
- border-bottom: 1px solid #C3BBB6;
-}
-
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/forumReplies.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/forumReplies.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/forumReplies.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,16 +0,0 @@
-.forumReplyControls {
- width: 100%;
-}
-
-.forumReplyRating {
- text-align: left;
-}
-
-.forumReplyStatus {
- text-align: right;
-}
-
-.forumReplyControl {
- text-align: right;
- width: 200px;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/forumStickyPosting.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/forumStickyPosting.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/forumStickyPosting.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,33 +0,0 @@
-.forumPostingHeaderInfoControls {
- width: 100%;
- margin-bottom: 10px;
-}
-
-.forumPostingHeaderInfo {
- text-align: left;
- color:#576c74;
- font-weight: bold;
-}
-
-.forumPostingHeaderControls {
- text-align: right;
- white-space: nowrap;
-}
-
-.forumPostingControls {
- text-align: right;
- white-space: nowrap;
- margin-bottom: 10px;
-}
-
-.forumPostingDocumentWrapper {
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
- border-top: 1px solid #d3d2d1;
- padding: 5px;
-}
-
-.noComments {
- border-bottom: 1px solid #C3BBB6;
-}
-
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/forumTopics.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/forumTopics.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/forumTopics.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,60 +0,0 @@
-.forumDescriptionTopicControls {
- width: 100%;
-}
-
-.forumDescription {
-}
-
-.topicControls {
- text-align: right;
- white-space: nowrap;
- padding-left: 10px;
-}
-
-.topicFormContainer {
-}
-
-.topicTableContainer {
-}
-
-.topicPager {
- width: 100%;
-}
-
-.topicPagerTable {
- width: 100%;
- font-weight: bold;
- padding: 0;
- margin: 0;
- margin-top: 10px;
- margin-bottom: 10px;
- border: 0;
- text-align: center;
-}
-
-.topicPagerColumn {
- width: 10%;
-}
-.topicPagerTextColumn {
- width: 60%;
-}
-
-.topicGotoIcon {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.forumsFeedLink {
- margin: 10px;
- float: right;
- margin-top: -35px;
-}
-
-.forumsFeedLink img {
- vertical-align: middle;
- margin-right: 5px;
-}
-
-.forumDescription {
- text-align: left;
-}
\ No newline at end of file
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/jiraIssueList.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,19 +0,0 @@
-.jiraIssueList {}
-
-.jiraIssueListTable {}
-
-.jiraIssueListTable .priorityColumn {}
-
-.jiraIssueListTable .summaryColumn {}
-
-.jiraIssueListTable .jiraIssueComponents {
- text-align: right;
-}
-
-.jiraIssueListEmpty {
- border-left: 1px solid #d3d2d1;
- border-right: 1px solid #d3d2d1;
- padding: 5px;
-}
-
-
Deleted: trunk/examples/wiki/view/themes/sfwkorg/css/lastModifiedDocuments.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/lastModifiedDocuments.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/lastModifiedDocuments.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1,17 +0,0 @@
-.lastModifiedDocuments {}
-
-.lastModifiedLink {
-}
-
-.lastModifiedColumn {
- padding-bottom: 5px;
-}
-
-.lastModifiedAuthorDate {
- text-align: right;
-}
-
-.lastModifiedLink:link {color: #576c74}
-.lastModifiedLink:visited {color: #576c74}
-.lastModifiedLink:hover {color: #000}
-.lastModifiedLink:active {color: #000}
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-05-10 02:37:42 UTC (rev 8148)
@@ -1530,7 +1530,7 @@
}
-/* Trees
+/* Trees (undo the Richfaces default damage)
----------------------------------------------- */
.rich-tree-node {
@@ -1557,6 +1557,31 @@
}
+/* Toggle Panels (undo the Richfaces default damage)
+----------------------------------------------- */
+
+.rich-stglpanel {
+ border-style: none;
+ font-size: 100%;
+ font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
+}
+
+.rich-stglpanel-header {
+ background: #ede8db url(../img/th.bg.gif ) 0 0 repeat-x;
+ border: 1px solid #d3d2d1;
+ font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
+ font-size: 85%;
+}
+
+.rich-stglpanel-body {
+ border-style: none;
+ background: #fff;
+ padding: 0;
+ font-size: 100%;
+ font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
+}
+
+
/* User Control
----------------------------------------------- */
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_goto.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_locked.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_locked_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_sticky.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_sticky_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.posting_unread.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.blocker.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.critical.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.major.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.minor.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.optional.gif
===================================================================
(Binary files differ)
Deleted: trunk/examples/wiki/view/themes/sfwkorg/img/icon.priority.trivial.gif
===================================================================
(Binary files differ)
Modified: trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/m/template.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -26,7 +26,7 @@
<s:div rendered="#{!empty facesMessages.currentGlobalMessages}">
<ui:repeat var="message" value="#{facesMessages.currentGlobalMessages}">
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" columnClasses="messageBoxCell">
- <h:graphicImage value="#{themePath}/img/info.gif"
+ <h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="infoImage"/>
<h:outputText styleClass="infoMessage" value="#{message.summary}"/>
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -28,7 +28,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -34,7 +34,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -30,7 +30,7 @@
thumbnailLinkStyleClass="regularLink"
linkBaseFile="#{currentDocument}"
currentAreaNumber="#{currentDocument.areaNumber}"
- enablePlugins="false"/>
+ enableMacroRendering="false"/>
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
Modified: trunk/examples/wiki/view/themes/sfwkorg/template.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/themes/sfwkorg/template.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -18,8 +18,8 @@
<ui:insert name="includeHeaders"/>
- <script type="text/javascript" src="#{basePath}/seam/resource/remoting/resource/remote.js"></script>
- <script type="text/javascript" src="#{basePath}/seam/resource/remoting/interface.js?httpSessionChecker"></script>
+ <script type="text/javascript" src="#{contextPath}/seam/resource/remoting/resource/remote.js"></script>
+ <script type="text/javascript" src="#{contextPath}/seam/resource/remoting/interface.js?httpSessionChecker"></script>
<script type="text/javascript" src="#{themePath}/js/jquery.js"></script>
<script type="text/javascript" src="#{themePath}/js/jqueryPlugins.js"></script>
<script type="text/javascript" src="#{themePath}/js/lacewiki.js"></script>
@@ -227,7 +227,7 @@
<div>
<h:outputLink value="#{preferences.get('Wiki').baseUrl}">
- <h:graphicImage value="#{themePath}/img/blank.gif" width="210" height="98"/>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="210" height="98"/>
</h:outputLink>
</div>
@@ -245,7 +245,7 @@
<h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" styleClass="feeds"
rendered="#{preferences.get('Wiki').showSiteFeedInMenu}">
<h:outputLink styleClass="feedLink" value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
- <h:graphicImage styleClass="feedIcon" value="#{themePath}/img/icon.atom.onbrown.gif" width="18" height="18"/>
+ <h:graphicImage styleClass="feedIcon" value="#{imagePath}/icon.atom.onbrown.gif" width="18" height="18"/>
</h:outputLink>
<h:outputLink styleClass="feedLink" value="#{wikiURLRenderer.renderFeedURL(wikiRoot.feed, null, null)}">
<span class="feedText">#{messages['lacewiki.button.SiteFeed']}</span>
@@ -320,7 +320,7 @@
</p>
<div style="text-align:center;">
<h:outputLink value="http://www.seamframework.org/Community/GetASeamIcon">
- <h:graphicImage value="#{themePath}/img/runningon_seamlogo_beige.gif"
+ <h:graphicImage value="#{imagePath}/runningon_seamlogo_beige.gif"
width="200" height="50"/>
</h:outputLink>
</div>
@@ -331,7 +331,7 @@
<!-- Main Content area -->
<div id="rightColumn">
- <h:graphicImage value="#{themePath}/img/blank.gif" width="1" height="1"/>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="1" height="1"/>
<ui:include src="../../includes/breadcrumb.xhtml"/>
<!-- Status messages -->
@@ -341,7 +341,7 @@
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
rendered="#{message.severity.ordinal == 0}">
- <h:graphicImage value="#{themePath}/img/info.gif"
+ <h:graphicImage value="#{imagePath}/info.gif"
width="18" height="18"
styleClass="messageBoxImage infoImage"/>
<h:outputText styleClass="infoMessage" value="#{message.summary}"/>
@@ -349,7 +349,7 @@
<h:panelGrid styleClass="messageBoxTable" columns="2" cellpadding="0" cellspacing="0" border="0"
rendered="#{message.severity.ordinal > 0}">
- <h:graphicImage value="#{themePath}/img/attention.gif"
+ <h:graphicImage value="#{imagePath}/attention.gif"
rendered="#{message.severity.ordinal > 0}"
width="18" height="18"
styleClass="messageBoxImage attentionImage"/>
@@ -393,12 +393,12 @@
<a:status id="globalStatus" forceId="true">
<f:facet name="start">
<s:div styleClass="statusStart">
- <h:graphicImage value="#{themePath}/img/statusindicator.gif" width="20" height="25"/>
+ <h:graphicImage value="#{imagePath}/statusindicator.gif" width="20" height="25"/>
</s:div>
</f:facet>
<f:facet name="stop">
<s:div styleClass="statusStop">
- <h:graphicImage value="#{themePath}/img/blank.gif" width="20" height="25"/>
+ <h:graphicImage value="#{imagePath}/blank.gif" width="20" height="25"/>
</s:div>
</f:facet>
</a:status>
Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
+++ trunk/examples/wiki/view/userList_d.xhtml 2008-05-10 02:37:42 UTC (rev 8148)
@@ -100,29 +100,29 @@
rendered="#{userSearch.rowCount > 0}">
<h:commandLink action="#{userSearch.firstPage()}" rendered="#{userSearch.previousPageAvailable}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/page.first.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.first.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.previousPageAvailable}"/>
<h:commandLink action="#{userSearch.previousPage()}" rendered="#{userSearch.previousPageAvailable}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/page.previous.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.previous.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.previousPageAvailable}"/>
<h:outputText value="#{messages['lacewiki.label.userList.Found']} #{userSearch.rowCount} #{messages['lacewiki.label.userList.Members']}"/>
<h:commandLink action="#{userSearch.nextPage()}" rendered="#{userSearch.nextPageAvailable}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/page.next.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.next.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.nextPageAvailable}"/>
<h:commandLink action="#{userSearch.lastPage()}" rendered="#{userSearch.nextPageAvailable}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/page.last.gif" width="13" height="11"/>
+ <h:graphicImage value="#{imagePath}/page.last.gif" width="13" height="11"/>
</h:commandLink>
- <h:graphicImage value="#{themePath}/img/blank.gif" width="13" height="11"
+ <h:graphicImage value="#{imagePath}/blank.gif" width="13" height="11"
rendered="#{!userSearch.nextPageAvailable}"/>
</h:panelGrid>
@@ -145,9 +145,9 @@
<h:column>
<f:facet name="header">
<h:commandLink action="#{userSearch.sortBy('username')}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'username'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'username'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.Username']}"/>
</h:commandLink>
@@ -181,9 +181,9 @@
<h:column>
<f:facet name="header">
<h:commandLink action="#{userSearch.sortBy('firstname')}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'firstname'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'firstname'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.FirstName']}"/>
</h:commandLink>
@@ -194,9 +194,9 @@
<h:column>
<f:facet name="header">
<h:commandLink action="#{userSearch.sortBy('lastname')}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'lastname'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'lastname'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.LastName']}"/>
</h:commandLink>
@@ -207,9 +207,9 @@
<h:column rendered="#{wiki:showEmailAddress()}">
<f:facet name="header">
<h:commandLink action="#{userSearch.sortBy('email')}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'email'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'email'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.Email']}"/>
</h:commandLink>
@@ -220,9 +220,9 @@
<h:column>
<f:facet name="header">
<h:commandLink action="#{userSearch.sortBy('createdOn')}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'createdOn'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'createdOn'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.JoinedOn']}"/>
</h:commandLink>
@@ -235,9 +235,9 @@
<h:column>
<f:facet name="header">
<h:commandLink action="#{userSearch.sortBy('lastLoginOn')}" tabindex="1">
- <h:graphicImage value="#{themePath}/img/sortindicator.up.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.up.gif" width="8" height="8"
rendered="#{!userSearch.orderDescending and userSearch.orderByProperty == 'lastLoginOn'}"/>
- <h:graphicImage value="#{themePath}/img/sortindicator.down.gif" width="8" height="8"
+ <h:graphicImage value="#{imagePath}/sortindicator.down.gif" width="8" height="8"
rendered="#{userSearch.orderDescending and userSearch.orderByProperty == 'lastLoginOn'}"/>
<h:outputText value="#{messages['lacewiki.label.userList.LastLoginOn']}"/>
</h:commandLink>
16 years, 6 months
Seam SVN: r8147 - trunk/examples/seambay/view.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-05-09 20:02:13 -0400 (Fri, 09 May 2008)
New Revision: 8147
Modified:
trunk/examples/seambay/view/test.xhtml
Log:
JBSEAM-2957
Modified: trunk/examples/seambay/view/test.xhtml
===================================================================
--- trunk/examples/seambay/view/test.xhtml 2008-05-09 16:41:14 UTC (rev 8146)
+++ trunk/examples/seambay/view/test.xhtml 2008-05-10 00:02:13 UTC (rev 8147)
@@ -30,7 +30,7 @@
<div>
Endpoint:
- <input id="endpoint" type="text" value="/AuctionServiceService/AuctionService" style="width:400px"/>
+ <input id="endpoint" type="text" value="/jboss-seam-bay-jboss-seam-bay/AuctionService" style="width:400px"/>
</div>
<div>
16 years, 6 months
Seam SVN: r8146 - trunk/src/main/org/jboss/seam and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-09 12:41:14 -0400 (Fri, 09 May 2008)
New Revision: 8146
Modified:
branches/Seam_2_0/src/main/org/jboss/seam/ScopeType.java
trunk/src/main/org/jboss/seam/ScopeType.java
Log:
JBSEAM-2976
Modified: branches/Seam_2_0/src/main/org/jboss/seam/ScopeType.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/ScopeType.java 2008-05-09 16:31:27 UTC (rev 8145)
+++ branches/Seam_2_0/src/main/org/jboss/seam/ScopeType.java 2008-05-09 16:41:14 UTC (rev 8146)
@@ -17,7 +17,7 @@
public enum ScopeType
{
/**
- * The stateless psuedo-context.
+ * The stateless pseudo-context.
*/
STATELESS,
/**
@@ -101,7 +101,7 @@
switch (this)
{
case STATELESS:
- throw new UnsupportedOperationException("Stateless psuedo-scope does not have a Context object");
+ throw new UnsupportedOperationException("Stateless pseudo-scope does not have a Context object");
case METHOD:
if ( !Contexts.isMethodContextActive() )
{
Modified: trunk/src/main/org/jboss/seam/ScopeType.java
===================================================================
--- trunk/src/main/org/jboss/seam/ScopeType.java 2008-05-09 16:31:27 UTC (rev 8145)
+++ trunk/src/main/org/jboss/seam/ScopeType.java 2008-05-09 16:41:14 UTC (rev 8146)
@@ -17,7 +17,7 @@
public enum ScopeType
{
/**
- * The stateless psuedo-context.
+ * The stateless pseudo-context.
*/
STATELESS,
/**
@@ -101,7 +101,7 @@
switch (this)
{
case STATELESS:
- throw new UnsupportedOperationException("Stateless psuedo-scope does not have a Context object");
+ throw new UnsupportedOperationException("Stateless pseudo-scope does not have a Context object");
case METHOD:
if ( !Contexts.isMethodContextActive() )
{
16 years, 6 months
Seam SVN: r8145 - in trunk: ui/src/main/config/component and 1 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-09 12:31:27 -0400 (Fri, 09 May 2008)
New Revision: 8145
Modified:
trunk/build/root.pom.xml
trunk/ui/src/main/config/component/atomicBooleanConverter.xml
trunk/ui/src/main/config/component/atomicIntegerConverter.xml
trunk/ui/src/main/config/component/atomicLongConverter.xml
trunk/ui/src/main/config/component/convertDateTime.xml
trunk/ui/src/main/config/component/convertEntity.xml
trunk/ui/src/main/config/component/convertEnum.xml
trunk/ui/src/main/config/component/modelValidator.xml
trunk/ui/src/main/java/org/jboss/seam/ui/util/cdk/UIComponentTagBase.java
Log:
Upgrade to RF 3.2.1.CR3 (snapshot for CDK)
Modified: trunk/build/root.pom.xml
===================================================================
--- trunk/build/root.pom.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/build/root.pom.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -15,12 +15,12 @@
<name>JBoss Repository</name>
<url>http://repository.jboss.org/maven2</url>
</pluginRepository>
- <!-- <pluginRepository>
+ <pluginRepository>
<snapshots />
<id>snapshots.jboss.org</id>
<name>JBoss Snapshot Repository</name>
<url>http://snapshots.jboss.org/maven2</url>
- </pluginRepository>-->
+ </pluginRepository>
</pluginRepositories>
<repositories>
<repository>
@@ -38,7 +38,7 @@
<!-- Externalize some version numbers here -->
<properties>
- <version.richfaces>3.1.4.GA</version.richfaces>
+ <version.richfaces>3.2.1.CR3</version.richfaces>
<version.wicket>1.3.3</version.wicket>
<version.drools>4.0.4</version.drools>
</properties>
@@ -1080,7 +1080,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>${version.richfaces}</version>
+ <version>3.2.1-SNAPSHOT</version>
</plugin>
<!-- Packaging -->
Modified: trunk/ui/src/main/config/component/atomicBooleanConverter.xml
===================================================================
--- trunk/ui/src/main/config/component/atomicBooleanConverter.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/config/component/atomicBooleanConverter.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -2,7 +2,7 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <name>org.jboss.seam.ui.AtomicBooleanConverter</name>
+ <id>org.jboss.seam.ui.AtomicBooleanConverter</id>
<classname>org.jboss.seam.ui.converter.AtomicBooleanConverter</classname>
<description>
<![CDATA[Converter for java.util.concurrent.atomic.AtomicBoolean]]>
Modified: trunk/ui/src/main/config/component/atomicIntegerConverter.xml
===================================================================
--- trunk/ui/src/main/config/component/atomicIntegerConverter.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/config/component/atomicIntegerConverter.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -2,7 +2,7 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <name>org.jboss.seam.ui.AtomicIntegerConverter</name>
+ <id>org.jboss.seam.ui.AtomicIntegerConverter</id>
<classname>org.jboss.seam.ui.converter.AtomicIntegerConverter</classname>
<description>
<![CDATA[Converter for java.util.concurrent.atomic.AtomicInteger]]>
Modified: trunk/ui/src/main/config/component/atomicLongConverter.xml
===================================================================
--- trunk/ui/src/main/config/component/atomicLongConverter.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/config/component/atomicLongConverter.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -2,7 +2,7 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <name>org.jboss.seam.ui.AtomicLongConverter</name>
+ <id>org.jboss.seam.ui.AtomicLongConverter</id>
<classname>org.jboss.seam.ui.converter.AtomicLongConverter</classname>
<description>
<![CDATA[Converter for java.util.concurrent.atomic.AtomicLong]]>
Modified: trunk/ui/src/main/config/component/convertDateTime.xml
===================================================================
--- trunk/ui/src/main/config/component/convertDateTime.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/config/component/convertDateTime.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -2,7 +2,7 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <name>org.jboss.seam.ui.DateTimeConverter</name>
+ <id>org.jboss.seam.ui.DateTimeConverter</id>
<classname>org.jboss.seam.ui.converter.DateTimeConverter</classname>
<description>
<![CDATA[Perform date or time conversions in the Seam timezone.]]>
Modified: trunk/ui/src/main/config/component/convertEntity.xml
===================================================================
--- trunk/ui/src/main/config/component/convertEntity.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/config/component/convertEntity.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -2,7 +2,7 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false" >
- <name>org.jboss.seam.ui.EntityConverter</name>
+ <id>org.jboss.seam.ui.EntityConverter</id>
<classname>org.jboss.seam.ui.EntityConverter</classname>
<description>
<![CDATA[Convert an entity.]]>
Modified: trunk/ui/src/main/config/component/convertEnum.xml
===================================================================
--- trunk/ui/src/main/config/component/convertEnum.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/config/component/convertEnum.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -2,7 +2,7 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <name>org.jboss.seam.ui.EnumConverter</name>
+ <id>org.jboss.seam.ui.EnumConverter</id>
<classname>org.jboss.seam.ui.converter.EnumConverter</classname>
<description>
<![CDATA[Convert an enum.]]>
Modified: trunk/ui/src/main/config/component/modelValidator.xml
===================================================================
--- trunk/ui/src/main/config/component/modelValidator.xml 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/config/component/modelValidator.xml 2008-05-09 16:31:27 UTC (rev 8145)
@@ -2,7 +2,7 @@
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<validator generate="false">
- <name>org.jboss.seam.ui.ModelValidator</name>
+ <id>org.jboss.seam.ui.ModelValidator</id>
<classname>org.jboss.seam.ui.validator.ModelValidator</classname>
<description>
<![CDATA[Validate the JSF component against the model]]>
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/util/cdk/UIComponentTagBase.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/util/cdk/UIComponentTagBase.java 2008-05-09 14:04:54 UTC (rev 8144)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/util/cdk/UIComponentTagBase.java 2008-05-09 16:31:27 UTC (rev 8145)
@@ -1,365 +1,166 @@
/**
- * License Agreement.
- *
- * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
*/
-
package org.jboss.seam.ui.util.cdk;
-import javax.faces.component.ActionSource;
-import javax.faces.component.EditableValueHolder;
+import javax.el.ExpressionFactory;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIGraphic;
import javax.faces.component.UIParameter;
import javax.faces.component.UISelectBoolean;
import javax.faces.component.ValueHolder;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-import javax.faces.el.MethodBinding;
-import javax.faces.el.ValueBinding;
import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
-import javax.faces.webapp.UIComponentTag;
-/**
- * Base class with utility functions for all JSF tags. Get from apache MyFaces
- * @author asmirnov(a)exadel.com (latest modification by $Author$)
- * @version $Revision$ $Date$
- *
- */
+import org.richfaces.webapp.taglib.UIComponentELTagBase;
+
@Deprecated
-public abstract class UIComponentTagBase extends UIComponentTag {
+public abstract class UIComponentTagBase extends UIComponentELTagBase {
- //Special UIComponent attributes (ValueHolder, ConvertibleValueHolder)
- private String _value;
- private String _converter;
- //attributes id, rendered and binding are handled by UIComponentTag
+ protected ExpressionFactory getExpressionFactory() {
+ return getFacesContext().getApplication().getExpressionFactory();
+ }
- /**
- * @param converter The converter to set.
- */
- public void setConverter(String converter) {
- _converter = converter;
+ protected void setProperty(UIComponent component, String propName, ValueExpression valueExpression) {
+ if (valueExpression != null) {
+ if (valueExpression.isLiteralText()) {
+ component.getAttributes().put(propName,valueExpression.getValue(getELContext()));
+ } else {
+ component.setValueExpression(propName, valueExpression);
+ }
+ }
}
+
+ protected void setProperty(UIComponent component, Class<?> type,
+ String propName, String value) {
+ if (value != null) {
+ ValueExpression valueExpression = getExpressionFactory()
+ .createValueExpression(getELContext(), value, type);
+ setProperty(component, propName, valueExpression);
+ }
+ }
- /**
- * @param value The value to set.
- */
- public void setValue(String value) {
- _value = value;
+ protected void setIntegerProperty(UIComponent component, String propName,
+ ValueExpression value) {
+ setProperty(component, propName, value);
}
- @Override
- public void release() {
- super.release();
+ protected void setLongProperty(UIComponent component, String propName,
+ ValueExpression value) {
+ setProperty(component, propName, value);
+ }
- _value=null;
- _converter=null;
- }
+ protected void setFloatProperty(UIComponent component, String propName,
+ ValueExpression value) {
+ setProperty(component, propName, value);
+ }
- @Override
- protected void setProperties(UIComponent component)
- {
- super.setProperties(component);
+ protected void setDoubleProperty(UIComponent component, String propName,
+ ValueExpression value) {
+ setProperty(component, propName, value);
+ }
+ protected void setStringProperty(UIComponent component, String propName,
+ ValueExpression value) {
+ setProperty(component, propName, value);
+ }
- //rendererType already handled by UIComponentTag
+ protected void setBooleanProperty(UIComponent component, String propName,
+ ValueExpression value) {
+ setProperty(component, propName, value);
+ }
- setValueProperty(component, _value);
- setConverterProperty(component, _converter);
- }
+ protected void setIntegerProperty(UIComponent component, String propName,
+ String value) {
+ setProperty(component, Integer.class, propName, value);
+ }
+ protected void setLongProperty(UIComponent component, String propName,
+ String value) {
+ setProperty(component, Long.class, propName, value);
+ }
- private static final Class[] VALIDATOR_ARGS = {FacesContext.class,
- UIComponent.class,
- Object.class};
- private static final Class[] ACTION_LISTENER_ARGS = {ActionEvent.class};
- private static final Class[] VALUE_LISTENER_ARGS = {ValueChangeEvent.class};
+ protected void setFloatProperty(UIComponent component, String propName,
+ String value) {
+ setProperty(component, Float.class, propName, value);
+ }
- protected void setCharterProperty(UIComponent component, String propName, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
- else
- {
- //FIXME: should use converter maybe?
- component.getAttributes().put(propName, new Character(value.charAt(0)));
- }
- }
- }
- protected void setIntegerProperty(UIComponent component, String propName, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
- else
- {
- //FIXME: should use converter maybe?
- component.getAttributes().put(propName, Integer.valueOf(value));
- }
- }
- }
+ protected void setDoubleProperty(UIComponent component, String propName,
+ String value) {
+ setProperty(component, Double.class, propName, value);
+ }
- protected void setLongProperty(UIComponent component, String propName, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
- else
- {
- //FIXME: should use converter maybe?
- component.getAttributes().put(propName, Long.valueOf(value));
- }
- }
- }
+ protected void setStringProperty(UIComponent component, String propName,
+ String value) {
+ setProperty(component, String.class, propName, value);
+ }
- protected void setFloatProperty(UIComponent component, String propName, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
- else
- {
- //FIXME: should use converter maybe?
- component.getAttributes().put(propName, Float.valueOf(value));
- }
- }
- }
- protected void setDoubleProperty(UIComponent component, String propName, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
- else
- {
- //FIXME: should use converter maybe?
- component.getAttributes().put(propName, Double.valueOf(value));
- }
- }
- }
-
- protected void setStringProperty(UIComponent component, String propName, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
- else
- {
- //TODO: Warning if component has no such property (with reflection)
- component.getAttributes().put(propName, value);
- }
- }
- }
+ protected void setBooleanProperty(UIComponent component, String propName,
+ String value) {
+ setProperty(component, Boolean.class, propName, value);
+ }
+ protected void setValueProperty(UIComponent component, String value) {
+ if (value != null) {
+ ValueExpression expression = getExpressionFactory()
+ .createValueExpression(getELContext(), value, Object.class);
- protected void setBooleanProperty(UIComponent component, String propName, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
- else
- {
- //TODO: More sophisticated way to convert boolean value (yes/no, 1/0, on/off, etc.)
- component.getAttributes().put(propName, Boolean.valueOf(value));
- }
- }
- }
+ setValueProperty(component, expression);
+ }
+ }
+ protected void setValueProperty(UIComponent component, ValueExpression expression) {
+ if (expression != null) {
+ String value = expression.getExpressionString();
+ if (!expression.isLiteralText()) {
+ component.setValueExpression("value", expression);
+ } else if (component instanceof UICommand) {
+ ((UICommand) component).setValue(value);
+ } else if (component instanceof UIParameter) {
+ ((UIParameter) component).setValue(value);
+ } else if (component instanceof UISelectBoolean) {
+ ((UISelectBoolean) component).setValue(Boolean.valueOf(value));
+ } else if (component instanceof UIGraphic) {
+ ((UIGraphic) component).setValue(value);
+ }
+ // Since many input components are ValueHolders the special
+ // components
+ // must come first, ValueHolder is the last resort.
+ else if (component instanceof ValueHolder) {
+ ((ValueHolder) component).setValue(value);
+ } else {
+ component.getAttributes().put("value", value);
+ }
+ }
+ }
- protected void setValueProperty(UIComponent component, String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding("value", vb);
- }
- else if (component instanceof UICommand)
- {
- ((UICommand)component).setValue(value);
- }
- else if (component instanceof UIParameter)
- {
- ((UIParameter)component).setValue(value);
- }
- else if (component instanceof UISelectBoolean)
- {
- ((UISelectBoolean)component).setValue(Boolean.valueOf(value));
- }
- else if (component instanceof UIGraphic)
- {
- ((UIGraphic)component).setValue(value);
- }
- //Since many input components are ValueHolders the special components
- //must come first, ValueHolder is the last resort.
- else if (component instanceof ValueHolder)
- {
- ((ValueHolder)component).setValue(value);
- }
- else
- {
- component.getAttributes().put("value", value);
- }
+ public boolean isValueReference(String s) {
+ return !getExpressionFactory().createValueExpression(s, Object.class).isLiteralText();
+ }
+
+ protected void setActionProperty(UIComponent component, String action) {
+ if (action != null) {
+ MethodExpression expression =
+ getExpressionFactory().createMethodExpression(getELContext(), action, String.class, new Class[] {});
+ setActionProperty(component, expression);
}
}
- protected void setConverterProperty(UIComponent component, String value)
- {
- if (value != null)
- {
- if (component instanceof ValueHolder)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding("converter", vb);
- }
- else
- {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- Converter converter = facesContext.getApplication().createConverter(value);
- ((ValueHolder)component).setConverter(converter);
- }
- }
-
+ protected void setActionListenerProperty(UIComponent component, String actionListener){
+ if (actionListener != null) {
+ MethodExpression expression =
+ getExpressionFactory().createMethodExpression(getELContext(), actionListener, String.class, new Class[] {ActionEvent.class});
+ setActionListenerProperty(component, expression);
}
}
- protected void setValidatorProperty(UIComponent component, String validator)
- {
- if (validator != null)
- {
- if (!(component instanceof EditableValueHolder))
- {
- throw new IllegalArgumentException();
- }
- if (isValueReference(validator))
- {
- MethodBinding mb = getFacesContext().getApplication().createMethodBinding(validator,
- VALIDATOR_ARGS);
- ((EditableValueHolder)component).setValidator(mb);
- }
-
+ protected void setValueChangedListenerProperty(UIComponent component, String valueChangedListener) {
+ if (valueChangedListener != null) {
+ MethodExpression expression =
+ getExpressionFactory().createMethodExpression(getELContext(), valueChangedListener, String.class, new Class[] {ValueChangeEvent.class});
+ setValueChangeListenerProperty(component, expression);
}
}
- protected void setActionProperty(UIComponent component, String action)
- {
- if (action != null)
- {
- if (!(component instanceof ActionSource))
- {
- throw new IllegalArgumentException();
- }
- MethodBinding mb;
- if (isValueReference(action))
- {
- mb = getFacesContext().getApplication().createMethodBinding(action, null);
- }
- else
- {
- mb = new SimpleActionMethodBinding(action);
- }
- ((ActionSource)component).setAction(mb);
- }
- }
-
- protected void setActionListenerProperty(UIComponent component, String actionListener)
- {
- if (actionListener != null)
- {
- if (!(component instanceof ActionSource))
- {
- throw new IllegalArgumentException();
- }
- if (isValueReference(actionListener))
- {
- MethodBinding mb = getFacesContext().getApplication().createMethodBinding(actionListener,
- ACTION_LISTENER_ARGS);
- ((ActionSource)component).setActionListener(mb);
- }
-
- }
- }
-
- protected void setValueChangedListenerProperty(UIComponent component, String valueChangedListener)
- {
- if (valueChangedListener != null)
- {
- if (!(component instanceof EditableValueHolder))
- {
- throw new IllegalArgumentException();
- }
- if (isValueReference(valueChangedListener))
- {
- MethodBinding mb = getFacesContext().getApplication().createMethodBinding(valueChangedListener,
- VALUE_LISTENER_ARGS);
- ((EditableValueHolder)component).setValueChangeListener(mb);
- }
-
- }
- }
-
- protected void setValueBinding(UIComponent component,
- String propName,
- String value)
- {
- if (value != null)
- {
- if (isValueReference(value))
- {
- ValueBinding vb = getFacesContext().getApplication().createValueBinding(value);
- component.setValueBinding(propName, vb);
- }
-
- }
- }
-
-
-
}
-
16 years, 6 months
Seam SVN: r8144 - trunk/ui/src/main/config/component.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-09 10:04:54 -0400 (Fri, 09 May 2008)
New Revision: 8144
Modified:
trunk/ui/src/main/config/component/atomicBooleanConverter.xml
trunk/ui/src/main/config/component/atomicIntegerConverter.xml
trunk/ui/src/main/config/component/atomicLongConverter.xml
trunk/ui/src/main/config/component/button.xml
trunk/ui/src/main/config/component/cache.xml
trunk/ui/src/main/config/component/conversationId.xml
trunk/ui/src/main/config/component/conversationName.xml
trunk/ui/src/main/config/component/conversationPropagation.xml
trunk/ui/src/main/config/component/convertDateTime.xml
trunk/ui/src/main/config/component/convertEntity.xml
trunk/ui/src/main/config/component/convertEnum.xml
trunk/ui/src/main/config/component/decorate.xml
trunk/ui/src/main/config/component/defaultAction.xml
trunk/ui/src/main/config/component/div.xml
trunk/ui/src/main/config/component/enumItem.xml
trunk/ui/src/main/config/component/fileUpload.xml
trunk/ui/src/main/config/component/formattedText.xml
trunk/ui/src/main/config/component/formattedTextValidator.xml
trunk/ui/src/main/config/component/fragment.xml
trunk/ui/src/main/config/component/graphicImage.xml
trunk/ui/src/main/config/component/label.xml
trunk/ui/src/main/config/component/link.xml
trunk/ui/src/main/config/component/message.xml
trunk/ui/src/main/config/component/modelValidator.xml
trunk/ui/src/main/config/component/remote.xml
trunk/ui/src/main/config/component/selectDate.xml
trunk/ui/src/main/config/component/selectItems.xml
trunk/ui/src/main/config/component/selection.xml
trunk/ui/src/main/config/component/span.xml
trunk/ui/src/main/config/component/taskId.xml
trunk/ui/src/main/config/component/transformImageBlur.xml
trunk/ui/src/main/config/component/transformImageSize.xml
trunk/ui/src/main/config/component/transformImageType.xml
trunk/ui/src/main/config/component/validateAll.xml
Log:
Change to new dtd location and fix validation errors
Modified: trunk/ui/src/main/config/component/atomicBooleanConverter.xml
===================================================================
--- trunk/ui/src/main/config/component/atomicBooleanConverter.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/atomicBooleanConverter.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <id>org.jboss.seam.ui.AtomicBooleanConverter</id>
- <family>org.jboss.seam.ui.AtomicBooleanConverter</family>
+ <name>org.jboss.seam.ui.AtomicBooleanConverter</name>
<classname>org.jboss.seam.ui.converter.AtomicBooleanConverter</classname>
<description>
<![CDATA[Converter for java.util.concurrent.atomic.AtomicBoolean]]>
Modified: trunk/ui/src/main/config/component/atomicIntegerConverter.xml
===================================================================
--- trunk/ui/src/main/config/component/atomicIntegerConverter.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/atomicIntegerConverter.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <id>org.jboss.seam.ui.AtomicIntegerConverter</id>
- <family>org.jboss.seam.ui.AtomicIntegerConverter</family>
+ <name>org.jboss.seam.ui.AtomicIntegerConverter</name>
<classname>org.jboss.seam.ui.converter.AtomicIntegerConverter</classname>
<description>
<![CDATA[Converter for java.util.concurrent.atomic.AtomicInteger]]>
Modified: trunk/ui/src/main/config/component/atomicLongConverter.xml
===================================================================
--- trunk/ui/src/main/config/component/atomicLongConverter.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/atomicLongConverter.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <id>org.jboss.seam.ui.AtomicLongConverter</id>
- <family>org.jboss.seam.ui.AtomicLongConverter</family>
+ <name>org.jboss.seam.ui.AtomicLongConverter</name>
<classname>org.jboss.seam.ui.converter.AtomicLongConverter</classname>
<description>
<![CDATA[Converter for java.util.concurrent.atomic.AtomicLong]]>
Modified: trunk/ui/src/main/config/component/button.xml
===================================================================
--- trunk/ui/src/main/config/component/button.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/button.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Button</name>
Modified: trunk/ui/src/main/config/component/cache.xml
===================================================================
--- trunk/ui/src/main/config/component/cache.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/cache.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Cache</name>
Modified: trunk/ui/src/main/config/component/conversationId.xml
===================================================================
--- trunk/ui/src/main/config/component/conversationId.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/conversationId.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.ConversationId</name>
Modified: trunk/ui/src/main/config/component/conversationName.xml
===================================================================
--- trunk/ui/src/main/config/component/conversationName.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/conversationName.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.ConversationName</name>
Modified: trunk/ui/src/main/config/component/conversationPropagation.xml
===================================================================
--- trunk/ui/src/main/config/component/conversationPropagation.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/conversationPropagation.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.ConversationPropagation</name>
Modified: trunk/ui/src/main/config/component/convertDateTime.xml
===================================================================
--- trunk/ui/src/main/config/component/convertDateTime.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/convertDateTime.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <id>org.jboss.seam.ui.DateTimeConverter</id>
- <family>org.jboss.seam.ui.DateTimeConverter</family>
+ <name>org.jboss.seam.ui.DateTimeConverter</name>
<classname>org.jboss.seam.ui.converter.DateTimeConverter</classname>
<description>
<![CDATA[Perform date or time conversions in the Seam timezone.]]>
Modified: trunk/ui/src/main/config/component/convertEntity.xml
===================================================================
--- trunk/ui/src/main/config/component/convertEntity.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/convertEntity.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false" >
- <id>org.jboss.seam.ui.EntityConverter</id>
- <family>org.jboss.seam.ui.EntityConverter</family>
+ <name>org.jboss.seam.ui.EntityConverter</name>
<classname>org.jboss.seam.ui.EntityConverter</classname>
<description>
<![CDATA[Convert an entity.]]>
Modified: trunk/ui/src/main/config/component/convertEnum.xml
===================================================================
--- trunk/ui/src/main/config/component/convertEnum.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/convertEnum.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<converter generate="false">
- <id>org.jboss.seam.ui.EnumConverter</id>
- <family>org.jboss.seam.ui.EnumConverter</family>
+ <name>org.jboss.seam.ui.EnumConverter</name>
<classname>org.jboss.seam.ui.converter.EnumConverter</classname>
<description>
<![CDATA[Convert an enum.]]>
Modified: trunk/ui/src/main/config/component/decorate.xml
===================================================================
--- trunk/ui/src/main/config/component/decorate.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/decorate.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Decorate</name>
@@ -35,7 +35,7 @@
<description>Id of the input field to decorate</description>
</property>
- <property exist="true">
+ <property existintag="false">
<name>template</name>
<classname>java.lang.String</classname>
<description>XHTML template to use to decorate the input field</description>
Modified: trunk/ui/src/main/config/component/defaultAction.xml
===================================================================
--- trunk/ui/src/main/config/component/defaultAction.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/defaultAction.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.DefaultAction</name>
Modified: trunk/ui/src/main/config/component/div.xml
===================================================================
--- trunk/ui/src/main/config/component/div.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/div.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Div</name>
Modified: trunk/ui/src/main/config/component/enumItem.xml
===================================================================
--- trunk/ui/src/main/config/component/enumItem.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/enumItem.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.EnumItem</name>
Modified: trunk/ui/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/ui/src/main/config/component/fileUpload.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/fileUpload.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.FileUpload</name>
Modified: trunk/ui/src/main/config/component/formattedText.xml
===================================================================
--- trunk/ui/src/main/config/component/formattedText.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/formattedText.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components >
<component>
<name>org.jboss.seam.ui.FormattedText</name>
Modified: trunk/ui/src/main/config/component/formattedTextValidator.xml
===================================================================
--- trunk/ui/src/main/config/component/formattedTextValidator.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/formattedTextValidator.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<validator generate="false">
<id>org.jboss.seam.ui.FormattedTextValidator</id>
Modified: trunk/ui/src/main/config/component/fragment.xml
===================================================================
--- trunk/ui/src/main/config/component/fragment.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/fragment.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Fragment</name>
Modified: trunk/ui/src/main/config/component/graphicImage.xml
===================================================================
--- trunk/ui/src/main/config/component/graphicImage.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/graphicImage.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.graphicImage.GraphicImage</name>
Modified: trunk/ui/src/main/config/component/label.xml
===================================================================
--- trunk/ui/src/main/config/component/label.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/label.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Label</name>
Modified: trunk/ui/src/main/config/component/link.xml
===================================================================
--- trunk/ui/src/main/config/component/link.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/link.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Link</name>
Modified: trunk/ui/src/main/config/component/message.xml
===================================================================
--- trunk/ui/src/main/config/component/message.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/message.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Message</name>
Modified: trunk/ui/src/main/config/component/modelValidator.xml
===================================================================
--- trunk/ui/src/main/config/component/modelValidator.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/modelValidator.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<validator generate="false">
- <id>org.jboss.seam.ui.ModelValidator</id>
+ <name>org.jboss.seam.ui.ModelValidator</name>
<classname>org.jboss.seam.ui.validator.ModelValidator</classname>
<description>
<![CDATA[Validate the JSF component against the model]]>
Modified: trunk/ui/src/main/config/component/remote.xml
===================================================================
--- trunk/ui/src/main/config/component/remote.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/remote.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Remote</name>
Modified: trunk/ui/src/main/config/component/selectDate.xml
===================================================================
--- trunk/ui/src/main/config/component/selectDate.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/selectDate.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.SelectDate</name>
Modified: trunk/ui/src/main/config/component/selectItems.xml
===================================================================
--- trunk/ui/src/main/config/component/selectItems.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/selectItems.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.SelectItems</name>
Modified: trunk/ui/src/main/config/component/selection.xml
===================================================================
--- trunk/ui/src/main/config/component/selection.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/selection.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Selection</name>
Modified: trunk/ui/src/main/config/component/span.xml
===================================================================
--- trunk/ui/src/main/config/component/span.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/span.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.Span</name>
Modified: trunk/ui/src/main/config/component/taskId.xml
===================================================================
--- trunk/ui/src/main/config/component/taskId.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/taskId.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.TaskId</name>
Modified: trunk/ui/src/main/config/component/transformImageBlur.xml
===================================================================
--- trunk/ui/src/main/config/component/transformImageBlur.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/transformImageBlur.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.graphicImage.TransformImageBlur</name>
Modified: trunk/ui/src/main/config/component/transformImageSize.xml
===================================================================
--- trunk/ui/src/main/config/component/transformImageSize.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/transformImageSize.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.graphicImage.TransformImageSize</name>
Modified: trunk/ui/src/main/config/component/transformImageType.xml
===================================================================
--- trunk/ui/src/main/config/component/transformImageType.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/transformImageType.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.graphicImage.TransformImageType</name>
Modified: trunk/ui/src/main/config/component/validateAll.xml
===================================================================
--- trunk/ui/src/main/config/component/validateAll.xml 2008-05-08 18:25:52 UTC (rev 8143)
+++ trunk/ui/src/main/config/component/validateAll.xml 2008-05-09 14:04:54 UTC (rev 8144)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://jboss.org/jbossrichfaces/component-config.dtd" >
<components>
<component>
<name>org.jboss.seam.ui.ValidateAll</name>
16 years, 6 months
Seam SVN: r8143 - trunk/src/main/org/jboss/seam/bpm.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-05-08 14:25:52 -0400 (Thu, 08 May 2008)
New Revision: 8143
Modified:
trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java
Log:
JBSEAM-2951
Modified: trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java
===================================================================
--- trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java 2008-05-08 16:50:53 UTC (rev 8142)
+++ trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java 2008-05-08 18:25:52 UTC (rev 8143)
@@ -118,8 +118,7 @@
*/
public void createProcess(String processDefinitionName)
{
- ProcessInstance process = ManagedJbpmContext.instance().newProcessInstanceForUpdate(processDefinitionName);
- afterCreateProcess(processDefinitionName, process);
+ createProcess(processDefinitionName, true);
}
/**
@@ -127,6 +126,18 @@
* current conversation.
*
* @param processDefinitionName the jBPM process definition name
+ */
+ public void createProcess(String processDefinitionName, boolean shouldSignalProcess)
+ {
+ ProcessInstance process = ManagedJbpmContext.instance().newProcessInstanceForUpdate(processDefinitionName);
+ afterCreateProcess(processDefinitionName, process, shouldSignalProcess);
+ }
+
+ /**
+ * Create a process instance and associate it with the
+ * current conversation.
+ *
+ * @param processDefinitionName the jBPM process definition name
* @param businessKey the business key of the new process definition
*/
public void createProcess(String processDefinitionName, String businessKey)
@@ -136,15 +147,17 @@
.createProcessInstance(Collections.EMPTY_MAP, businessKey);*/
ProcessInstance process = ManagedJbpmContext.instance().newProcessInstanceForUpdate(processDefinitionName);
process.setKey(businessKey);
- afterCreateProcess(processDefinitionName, process);
+ afterCreateProcess(processDefinitionName, process, true);
}
- private void afterCreateProcess(String processDefinitionName, ProcessInstance process)
+ private void afterCreateProcess(String processDefinitionName, ProcessInstance process, boolean shouldSignalProcess)
{
setProcessId( process.getId() );
// need to set process variables before the signal
Contexts.getBusinessProcessContext().flush();
- process.signal();
+ if (shouldSignalProcess) {
+ process.signal();
+ }
Events.instance().raiseEvent("org.jboss.seam.createProcess." + processDefinitionName);
}
16 years, 6 months
Seam SVN: r8142 - trunk/doc.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-08 12:50:53 -0400 (Thu, 08 May 2008)
New Revision: 8142
Removed:
trunk/doc/reference/
Log:
Delete old ref doc dir
16 years, 6 months
Seam SVN: r8141 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-08 12:49:06 -0400 (Thu, 08 May 2008)
New Revision: 8141
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Concepts.xml
trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
trunk/doc/Seam_Reference_Guide/en-US/Controls.xml
trunk/doc/Seam_Reference_Guide/en-US/Events.xml
trunk/doc/Seam_Reference_Guide/en-US/Framework.xml
trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
trunk/doc/Seam_Reference_Guide/en-US/Mail.xml
trunk/doc/Seam_Reference_Guide/en-US/Security.xml
trunk/doc/Seam_Reference_Guide/en-US/Testing.xml
Log:
Merge in doc changes from trunk
Modified: trunk/doc/Seam_Reference_Guide/en-US/Concepts.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Concepts.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Concepts.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -268,7 +268,9 @@
</para>
<para>
Since the session context is multithreaded, and often contains volatile state, session scope
- components are always protected by Seam from concurrent access. Seam serializes requests to session
+ components are always protected by Seam from concurrent access so long as the Seam interceptors
+ are not disabled for that component. If interceptors are disabled, then any thread-safety that is
+ required must be implemented by the component itself. Seam serializes requests to session
scope session beans and JavaBeans by default (and detects and breaks any deadlocks that occur). This is
not the default behaviour for application scoped components however, since application scoped components
do not usually hold volatile state and because synchronization at the global level is
@@ -357,7 +359,9 @@
the page or stateless contexts.
</para>
<para>
- Concurrent requests to session-scoped stateful session beans are always serialized by Seam.
+ Concurrent requests to session-scoped stateful session beans are always serialized by Seam as long
+ as the Seam interceptors are not disabled for the bean.
+
</para>
<para>
Seam stateful session bean components may be instantiated using <literal>Component.getInstance()</literal>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -68,6 +68,15 @@
<param-value>.xhtml</param-value>
</context-param>]]></programlisting>
+ <para>
+ If you are using facelets in JBoss AS, you'll find that facelets
+ logging is broken. Seam provides a bridge to fix this, to use it
+ copy <literal>lib/interop/jboss-seam-jul.jar</literal> to
+ <literal>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/jsf-libs/</literal>
+ and include the <literal>jboss-seam-ui.jar</literal> in the
+ <literal>WEB-INF/lib</literal> of your application.
+ </para>
+
</sect2>
<sect2>
@@ -959,5 +968,131 @@
</para>
</sect1>
+
+ <sect1>
+ <title>Deploying custom resources</title>
+
+ <para>
+ Seam scans all jars containing <literal>/seam.properties</literal>,
+ <literal>/META-INF/components.xml</literal> or <literal>/META-INF/seam.properties</literal>
+ on startup for resources. For example, all classes annotated with
+ <literal>@Name</literal> are registered with Seam as Seam components.
+ </para>
+
+ <para>
+ You may also want Seam to handle custom resources. A common use case
+ is to handle a specific annotation and Seam provides specific
+ support for this. First, tell Seam which annotations to handle in
+ <literal>/META-INF/seam-deployment.properties</literal>:
+ </para>
+
+ <programlisting><![CDATA[# A colon-separated list of annotation types to handle
+org.jboss.seam.deployment.annotationTypes=com.acme.Foo:com.acme.Bar]]></programlisting>
+
+ <para>
+ Then, during application startup you can get hold of all classes
+ annotated with <literal>@Foo</literal>:
+ </para>
+
+ <programlisting><![CDATA[@Name("fooStartup")
+@Scope(APPLICATION)
+@Startup
+public class FooStartup {
+ @In("#{deploymentStrategy.annotatedClasses['com.acme.Foo']}")
+ private Set<Class<Object>> fooClasses;
+
+ @In("#{hotDeploymentStrategy.annotatedClasses['com.acme.Foo']}")
+ private Set<Class<Object>> hotFooClasses;
+
+ @Create
+ public void create() {
+ for (Class clazz : fooClasses) {
+ handleClass(clazz);
+ }
+ for (Class clazz : hotFooClasses) {
+ handleClass(clazz);
+ }
+ }
+
+}]]></programlisting>
+
+ <para>
+ You can also handle <emphasis>any</emphasis> resource. For example,
+ you process any files with the extension <literal>.foo.xml</literal>.
+ To do this, we need to write a custom deployment handler:
+ </para>
+
+ <programlisting><![CDATA[public class FooDeploymentHandler implements DeploymentHandler {
+
+ private Set<InputStream> files = new HashSet<InputStream>();
+
+ public String getName() {
+ return "fooDeploymentHandler";
+ }
+
+ public Set<InputStream> getFiles() {
+ return files;
+ }
+
+ public void handle(String name, ClassLoader classLoader) {
+ if (name.endsWith(".foo.xml")) {
+ files.add(classLoader.getResourceAsStream(name));
+ }
+ }
+}]]></programlisting>
+
+ <para>
+ Here we are just building a list of any files with the suffix
+ <literal>.foo.xml</literal>.
+ </para>
+
+ <para>
+ Then, we need to register the deployment handler with Seam. In
+ <literal>/META-INF/seam-deployment.properties</literal>:
+ </para>
+
+ <programlisting><![CDATA[# For standard deployment
+org.jboss.seam.deployment.deploymentHandlers=com.acme.FooDeploymentHandler
+# For hot deployment
+org.jboss.seam.deployment.hotDeploymentHandlers=com.acme.FooDeploymentHandler]]></programlisting>
+
+ <para>
+ You can register multiple deployment handler using a comma
+ separated list.
+ </para>
+
+ <para>
+ Seam uses deployment handlers internally to install components and
+ namespaces, therefore the <literal>handle()</literal> is called too
+ early in inside Seam bootstrap to normally be useful. However, you
+ can easily access the deployment handler during an
+ <literal>APPLICATION</literal> scoped component's startup:
+ </para>
+
+ <programlisting><![CDATA[@Name("fooStartup")
+@Scope(APPLICATION)
+@Startup
+public class FooStartup {
+
+ @In("#{deploymentStrategy['fooDeploymentHandler']}")
+ private MyDeploymentHandler myDeploymentHandler;
+
+ @In("#{hotDeploymentStrategy['fooDeploymentHandler']}")
+ private MyDeploymentHandler myHotDeploymentHandler;
+
+ @Create
+ public void create() {
+ for (InputStream is : myDeploymentHandler.getFiles()) {
+ handleFooXml(is);
+ }
+ for (InputStream is : myHotDeploymentHandler.getFiles()) {
+ handleFooXml(is);
+ }
+ }
+
+}]]></programlisting>
+
+ </sect1>
+
</chapter>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Controls.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Controls.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Controls.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -96,9 +96,14 @@
<para>
You can specify both <literal>view</literal> and
<literal>action</literal> on <literal><s:link /></literal>.
- In this case, the action wil be called once the redirect to the
+ In this case, the action will be called once the redirect to the
specified view has occured.
</para>
+
+ <para>
+ The use of action listeners (including the default JSF action
+ listener) is not supported with <literal><s:button /></literal>.
+ </para>
</section>
@@ -145,6 +150,11 @@
form.</emphasis>
</para>
+ <para>
+ The use of action listeners (including the default JSF action
+ listener) is not supported with <literal><s:link /></literal>.
+ </para>
+
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
@@ -299,13 +309,14 @@
<para><emphasis>Description</emphasis></para>
<para>
Assigns an entity converter to the current component. This is
- primarily useful for radio button and dropdown controls.
+ useful for radio button and dropdown controls.
</para>
<para>
- The converter works with any managed entity which has an
- <literal>@Id</literal>
- annotation - either simple or composite.
+ The converter works with any managed entity - either simple or
+ composite. The converter should be able to find the items
+ declared in the JSF controls on form submission, otherwise you
+ will receive a validation error.
</para>
<para><emphasis>Attributes</emphasis></para>
@@ -321,36 +332,59 @@
<para>
If your <emphasis>Managed Persistence Context</emphasis> isn't
- called <literal>entityManager</literal>, then you need to set it in
- components.xml:
+ called <literal>entityManager</literal>, then you need to set it
+ in components.xml:
</para>
- <programlisting role="XML"><![CDATA[<component name="org.jboss.seam.ui.EntityConverter">
- <property name="entityManager">#{em}</property>
-</component>]]></programlisting>
+ <programlisting><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:ui="http://jboss.com/products/seam/ui">
+
+ <ui:entity-loader entity-manager="#{em}" />]]></programlisting>
<para>
If you are using a <emphasis>Managed Hibernate Session</emphasis>
then you need to set it in components.xml:
</para>
- <programlisting role="XML"><![CDATA[<component name="org.jboss.seam.ui.EntityConverter">
- <property name="session">#{hibernateSession}</property>
-</component>]]></programlisting>
+ <programlisting><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:ui="http://jboss.com/products/seam/ui">
+
+ <ui:hibernate-entity-loader />]]></programlisting>
<para>
+ If your <emphasis>Managed Hibernate Session</emphasis> isn't
+ called <literal>session</literal>, then you need to set it
+ in components.xml:
+ </para>
+
+ <programlisting><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:ui="http://jboss.com/products/seam/ui">
+
+ <ui:hibernate-entity-loader session="#{hibernateSession}" />]]></programlisting>
+
+ <para>
If you want to use more than one entity manager with the entity
converter, you can create a copy of the entity converter for each
- entity manager in components.xml:
+ entity manager in <literal>components.xml</literal> - note how
+ the entity converter delegates to the entity loader to perform
+ persistence operations:
</para>
- <programlisting role="XML"><![CDATA[<component name="myEntityConverter" class="org.jboss.seam.ui.converter.EntityConverter">
- <property name="entityManager">#{em}</property>
-</component>]]></programlisting>
+ <programlisting><![CDATA[<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:ui="http://jboss.com/products/seam/ui">
+
+ <ui:entity-converter name="standardEntityConverter" entity-loader="#{standardEntityLoader}" />
+
+ <ui:entity-loader name="standardEntityLoader" entity-manager="#{standardEntityManager}" />
- <programlisting role="XHTML"><![CDATA[<h:selectOneMenu value="#{person.continent}">
+ <ui:entity-converter name="restrictedEntityConverter" entity-loader="#{restrictedEntityLoader}" />
+
+ <ui:entity-loader name="restrictedEntityLoader" entity-manager="#{restrictedEntityManager}" />]]></programlisting>
+
+ <programlisting><![CDATA[<h:selectOneMenu value="#{person.continent}">
<s:selectItems value="#{continents.resultList}" var="continent"
label="#{continent.name}" />
- <f:converter converterId="myEntityConverter" />
+ <f:converter converterId="standardEntityConverter" />
</h:selectOneMenu>]]></programlisting>
+
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:selectOneMenu value="#{person.continent}" required="true">
@@ -380,9 +414,67 @@
noSelectionLabel="Please select" />
<s:convertEnum />
</h:selectOneMenu>]]></programlisting>
- </section>
+ </section>
<section>
+ <title><literal><s:convertAtomicBoolean></literal></title>
+
+ <para><emphasis>Description</emphasis></para>
+ <para>
+ <literal>javax.faces.convert.Converter</literal> for
+ <literal>java.util.concurrent.atomic.AtomicBoolean</literal>.
+ </para>
+
+ <para><emphasis>Attributes</emphasis></para>
+ <para>
+ None.
+ </para>
+
+ <para><emphasis>Usage</emphasis></para>
+ <programlisting><![CDATA[<h:outputText value="#{item.valid}">
+ <s:convertAtomicBoolean />
+</h:outputText>]]></programlisting>
+ </section>
+ <section>
+ <title><literal><s:convertAtomicInteger></literal></title>
+
+ <para><emphasis>Description</emphasis></para>
+ <para>
+ <literal>javax.faces.convert.Converter</literal> for
+ <literal>java.util.concurrent.atomic.AtomicInteger</literal>.
+ </para>
+
+ <para><emphasis>Attributes</emphasis></para>
+ <para>
+ None.
+ </para>
+
+ <para><emphasis>Usage</emphasis></para>
+ <programlisting><![CDATA[<h:outputText value="#{item.id}">
+ <s:convertAtomicInteger />
+</h:outputText>]]></programlisting>
+ </section>
+ <section>
+ <title><literal><s:convertAtomicLong></literal></title>
+
+ <para><emphasis>Description</emphasis></para>
+ <para>
+ <literal>javax.faces.convert.Converter</literal> for
+ <literal>java.util.concurrent.atomic.AtomicLong</literal>.
+ </para>
+
+ <para><emphasis>Attributes</emphasis></para>
+ <para>
+ None.
+ </para>
+
+ <para><emphasis>Usage</emphasis></para>
+ <programlisting><![CDATA[<h:outputText value="#{item.id}">
+ <s:convertAtomicLong />
+</h:outputText>]]></programlisting>
+ </section>
+
+ <section>
<title><literal><s:validate></literal></title>
<para><emphasis>Description</emphasis></para>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Events.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Events.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Events.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -885,7 +885,7 @@
</filter-mapping>]]></programlisting>
<para>
- You may also need to disable Facelets development mode in <literal>web.xml</literal> and
+ You need to disable Facelets development mode in <literal>web.xml</literal> and
Seam debug mode in <literal>components.xml</literal> if you want your exception handlers
to fire.
</para>
@@ -997,7 +997,7 @@
<para>
<literal>org.jboss.seam.handledException</literal> holds the nested exception that
was actually handled by an exception handler. The outermost (wrapper) exception is
- also available, as <literal>org.jboss.seam.exception</literal>.
+ also available, as <literal>org.jboss.seam.caughtException</literal>.
</para>
<section>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Framework.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Framework.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Framework.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -55,8 +55,7 @@
your taste, you can use extension instead:
</para>
- <programlisting role="JAVA"><![CDATA[
-@Name("personHome")
+ <programlisting role="JAVA"><![CDATA[@Name("personHome")
public class PersonHome extends EntityHome<Person> {
@In EntityManager personDatabase;
Modified: trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Itext.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Itext.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -95,6 +95,12 @@
and <literal>attachment</literal>, which indicates that the document should be treated as a download.
The default value is <literal>inline</literal>.</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>fileName</literal> — For attachments, this value
+ overrides the downloaded file name.
+ </para>
+ </listitem>
</itemizedlist>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Mail.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Mail.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Mail.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -567,6 +567,11 @@
<literal><h:graphicImage></literal> in your emails.
</para>
</listitem>
+ <listitem>
+ <para>
+ <literal>messageId</literal> — Sets the Message-ID explicitly
+ </para>
+ </listitem>
</itemizedlist>
</listitem>
</varlistentry>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Security.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -1622,5 +1622,919 @@
}]]></programlisting>
</sect1>
+
+ <sect1>
+ <title>Identity Management</title>
+ <para>
+ Seam Security provides an optional identity management API, which offers the following features:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ User management - the ability to create, delete and modify user accounts and their role memberships.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Authentication of users without the need for writing an Authenticator component.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A hierarchical role/group membership structure, allowing roles to be members of other roles.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Pluggable identity store, allowing the developer to choose their security provider, whether it be
+ JPA, LDAP, Kerberos, etc.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ The core of the identity management API is the <literal>IdentityManager</literal> component. Before it can be
+ used however, it must be configured with an <literal>IdentityStore</literal> implementation. The
+ <literal>IdentityStore</literal> does the actual work of interacting with the underlying security provider,
+ whatever it may be.
+ </para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/security-identitymanager.png" align="center"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="../shared/images/security-identitymanager.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <sect2>
+ <title>Configuration</title>
+
+ <para>
+ Configuration of the <literal>IdentityManager</literal> is extremely simple, requiring only an
+ <literal>IdentityStore</literal> to be configured in <literal>components.xml</literal>.
+ The identity management namespace is <literal>http://jboss.com/products/seam/security/management</literal>
+ and its schema location is <literal>http://jboss.com/products/seam/identity-management-2.1.xsd</literal>.
+ Here's a simple example showing the configuration of a <literal>JPAIdentityStore</literal> - for the
+ <literal>IdentityManager</literal> to use it, it must be named <literal>identityStore</literal>:
+ </para>
+
+ <programlisting><![CDATA[
+ <identity-management:jpa-identity-store name="identityStore" account-class="com.acme.UserAccount"/>
+ ]]></programlisting>
+ </sect2>
+
+ <sect2>
+ <title>JPAIdentityStore</title>
+
+ <para>
+ <literal>JPAIdentityStore</literal> is an <literal>IdentityStore</literal> implementation that uses
+ JPA as its underlying security provider. User accounts and their role memberships are stored in a
+ self-referencing database table, for which the corresponding entity bean must extend
+ <literal>org.jboss.seam.security.management.UserAccount</literal> to provide the following properties:
+ </para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/security-useraccount.png" align="center"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="../shared/images/security-useraccount.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <para>
+ To provide a complete example, here's what the actual database tables may look like:
+ </para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/security-useraccountschema.png" align="center"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="../shared/images/security-useraccountschema.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <para>
+ And an example of the corresponding entity bean:
+ </para>
+
+ <programlisting><![CDATA[@Entity @Table(name = "USER_ACCOUNT")
+public class UserAccount extends org.jboss.seam.security.management.UserAccount
+ implements Serializable
+{
+ private Integer accountId;
+ private String username;
+ private String passwordHash;
+ private boolean enabled;
+ private AccountType accountType;
+ private Set<UserAccount> memberships;
+
+ @Id @GeneratedValue public Integer getAccountId() { return accountId; }
+ public void setAccountId(Integer accountId) { this.accountId = accountId; }
+
+ @NotNull @Override public String getUsername() { return username; }
+ @Override public void setUsername(String username) { this.username = username; }
+
+ @Override public String getPasswordHash() { return passwordHash; }
+ @Override public void setPasswordHash(String passwordHash) { this.passwordHash = passwordHash; }
+
+ @Override public AccountType getAccountType() { return accountType; }
+ @Override public void setAccountType(AccountType accountType) { this.accountType = accountType; }
+
+ @Override public boolean isEnabled() { return enabled; }
+ @Override public void setEnabled(boolean enabled) { this.enabled = enabled; }
+
+ @ManyToMany(targetEntity = MemberAccount.class) @JoinTable(name = "ACCOUNT_MEMBERSHIP",
+ joinColumns = @JoinColumn(name = "ACCOUNT_ID"),
+ inverseJoinColumns = @JoinColumn(name = "MEMBER_OF"))
+ @Override public Set<UserAccount> getMemberships() { return memberships; }
+ @Override public void setMemberships(Set<UserAccount> memberships) { this.memberships = memberships; }}]]></programlisting>
+
+ <para>
+ In the above example, the implementation of <literal>UserAccount</literal> is self-referencing
+ in that it has a many-to-many relationship with itself via its <literal>memberships</literal>
+ property. To keep the model simple, both user accounts and roles are persisted as
+ <literal>UserAccount</literal>s, with the <literal>accountType</literal> property acting as the
+ discriminator between the two. With this model, roles can be members of other roles, making it
+ possible to define complex role membership hierarchies.
+ </para>
+
+ <para>
+ Once the <literal>UserAccount</literal> implementation has been created, the <literal>JPAIdentityStore</literal>
+ must be configured to use that implementation any time it performs an identity management operation.
+ This is done by specifying the <literal>account-class</literal> property in <literal>components.xml</literal>.
+ In the following example, it is configured as <literal>com.acme.UserAccount</literal>:
+ </para>
+
+ <programlisting><![CDATA[
+ <identity-management:jpa-identity-store name="identityStore" account-class="com.acme.UserAccount"/>]]></programlisting>
+
+ <para>
+ Please note that this is a required parameter, and must always be specified when using the
+ <literal>JPAIdentityStore</literal>.
+ </para>
+
+ <sect3>
+ <title>Password hashing</title>
+
+ <para>
+ The <literal>JPAIdentityStore</literal> stores a salted hash of the user's password, using the username
+ as the source material for salt generation. This guarantees that two users with the same password will
+ still have different password hashes. The method for generating a password hash is listed here for
+ convenience - it may be useful for generating password hashes for inclusion in DML scripts, etc:
+ </para>
+
+ <programlisting><![CDATA[
+ public String hashPassword(String password, String saltPhrase)
+ {
+ try {
+ MessageDigest md = MessageDigest.getInstance("MD5");
+
+ md.update(saltPhrase.getBytes());
+ byte[] salt = md.digest();
+
+ md.reset();
+ md.update(password.getBytes("UTF-8"));
+ md.update(salt);
+
+ byte[] raw = md.digest();
+
+ return new String(Hex.encodeHex(raw));
+ }
+ catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ ]]></programlisting>
+ </sect3>
+
+ </sect2>
+
+ <sect2>
+ <title>Authentication with the Identity Management API</title>
+
+ <para>
+ To authenticate using the Identity Management API, it is as simple as not specifying the
+ <literal>authenticate-method</literal> property for the <literal>Identity</literal> component.
+ If no <literal>authenticate-method</literal> is specified, then by default the authentication
+ process (controlled by <literal>SeamLoginModule</literal>) will attempt to authenticate using
+ <literal>IdentityManager</literal>'s <literal>authenticate()</literal> method, and no
+ Authenticator component is necessary.
+ </para>
+ </sect2>
+
+ <sect2>
+ <title>Using the IdentityManager API</title>
+
+ <para>
+ The <literal>IdentityManager</literal> can be accessed either by injecting it into your Seam
+ component as follows:
+ </para>
+
+ <programlisting><![CDATA[ @In IdentityManager identityManager;]]></programlisting>
+
+ <para>
+ or by accessing it through its static <literal>instance()</literal> method:
+ </para>
+
+ <programlisting><![CDATA[ IdentityManager identityManager = IdentityManager.instance();]]></programlisting>
+
+ <para>
+ The following table describes each of the methods that <literal>IdentityManager</literal> provides:
+ </para>
+
+ <table>
+ <title>Identity Management API</title>
+
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Method</para>
+ </entry>
+ <entry align="center">
+ <para>Returns</para>
+ </entry>
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>
+ <literal>createUser(String name, String password)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Creates a new user account, with the specified name and password. Returns <literal>true</literal>
+ if successful, or <literal>false</literal> if not.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>deleteUser(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Deletes the user account with the specified name. Returns <literal>true</literal>
+ if successful, or <literal>false</literal> if not.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>createRole(String role)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Creates a new role, with the specified name. Returns <literal>true</literal>
+ if successful, or <literal>false</literal> if not.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>deleteRole(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Deletes the role with the specified name. Returns <literal>true</literal>
+ if successful, or <literal>false</literal> if not.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>enableUser(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Enables the user account with the specified name. Accounts that are not enabled are
+ not able to authenticate. Returns <literal>true</literal> if successful, or
+ <literal>false</literal> if not.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>disableUser(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Disables the user account with the specified name. Returns <literal>true</literal> if
+ successful, or <literal>false</literal> if not.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>changePassword(String name, String password)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Changes the password for the user account with the specified name. Returns
+ <literal>true</literal> if successful, or <literal>false</literal> if not.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>isUserEnabled(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Returns <literal>true</literal> if the specified user account is enabled, or
+ <literal>false</literal> if it isn't.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>grantRole(String name, String role)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Grants the specified role to the specified user or role. The role must already exist for it to
+ be granted. Returns <literal>true</literal> if the role is successfully granted, or
+ <literal>false</literal> if it is already granted to the user.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>revokeRole(String name, String role)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Revokes the specified role from the specified user or role. Returns <literal>true</literal>
+ if the specified user is a member of the role and it is successfully revoked, or
+ <literal>false</literal> if the user is not a member of the role.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>userExists(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Returns <literal>true</literal> if the specified user exists, or <literal>false</literal>
+ if it doesn't.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>listUsers()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>List</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Returns a list of all user names, sorted in alpha-numeric order.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>listUsers(String filter)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>List</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Returns a list of all user names filtered by the specified filter parameter, sorted in alpha-numeric order.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>listRoles()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>List</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Returns a list of all role names.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>getGrantedRoles(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>List</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Returns a list of the names of all the roles explicitly granted to the specified user name.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>getImpliedRoles(String name)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>List</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Returns a list of the names of all the roles implicitly granted to the specified user name.
+ Implicitly granted roles include those that are not directly granted to a user, rather they are
+ granted to the roles that the user is a member of. For example, is the <literal>admin</literal>
+ role is a member of the <literal>user</literal> role, and a user is a member of the <literal>admin</literal>
+ role, then the implied roles for the user are both the <literal>admin</literal>, and <literal>user</literal>
+ roles.
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>authenticate(String name, String password)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>boolean</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Authenticates the specified username and password using the configured Identity Store. Returns
+ <literal>true</literal> if successful or <literal>false</literal> if authentication failed.
+ Successful authentication implies nothing beyond the return value of the method. It does not
+ change the state of the <literal>Identity</literal> component - to perform a proper Seam login the
+ <literal>Identity.login()</literal> must be used instead.
+ </para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ Using the Identity Management API requires that the calling user has the appropriate authorization to invoke
+ its methods. The following table describes the permission requirements for each of the methods in
+ <literal>IdentityManager</literal>.
+ </para>
+
+ <table>
+ <title>Identity Management Security Permissions</title>
+
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*" />
+ <colspec colnum="2" colwidth="3*" />
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Method</para>
+ </entry>
+ <entry align="center">
+ <para>Permission Name</para>
+ </entry>
+ <entry align="center">
+ <para>Permission Action</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <literal>createUser()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>create</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>deleteUser()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>delete</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>createRole()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>create</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>deleteRole()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>delete</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>enableUser()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>update</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>disableUser()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>update</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>changePassword()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>update</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>isUserEnabled()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>read</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>grantRole()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>update</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>revokeRole()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>update</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>userExists()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>read</literal>
+ </para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>
+ <literal>listUsers()</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>seam.account</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>read</literal>
+ </para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ The following code listing provides an example set of security rules that grants access to all
+ Identity Management-related methods to members of the <literal>admin</literal> role:
+ </para>
+
+ <programlisting><![CDATA[rule CreateAccount
+ no-loop
+ activation-group "permissions"
+when
+ check: PermissionCheck(name == "seam.account", action == "create", granted == false)
+ Role(name == "admin")
+then
+ check.grant();
+end
+
+rule ReadAccount
+ no-loop
+ activation-group "permissions"
+when
+ check: PermissionCheck(name == "seam.account", action == "read", granted == false)
+ Role(name == "admin")
+then
+ check.grant();
+end
+
+rule UpdateAccount
+ no-loop
+ activation-group "permissions"
+when
+ check: PermissionCheck(name == "seam.account", action == "update", granted == false)
+ Role(name == "admin")
+then
+ check.grant();
+end
+
+rule DeleteAccount
+ no-loop
+ activation-group "permissions"
+when
+ check: PermissionCheck(name == "seam.account", action == "delete", granted == false)
+ Role(name == "admin")
+then
+ check.grant();
+end]]></programlisting>
+
+ </sect2>
+
+ <sect2>
+ <title>Seam-gen and Identity Management</title>
+
+ <para>
+ When creating a new project using seam-gen (see <xref linkend="gettingstarted"/>), by default the
+ <literal>IdentityManager</literal> will be configured with a <literal>JPAIdentityStore</literal>
+ and a <literal>UserAccount</literal> implementation will be generated as part of the new project.
+ In addition to this, the project will include the following user management screens, allowing
+ new users to be created, roles assigned, etc:
+ </para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/security-usermanager1.png" align="center"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="../shared/images/security-usermanager1.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+ <para>
+ The user detail screen:
+ </para>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/security-usermanager2.png" align="center"/>
+ </imageobject>
+ <imageobject role="html">
+ <imagedata fileref="../shared/images/security-usermanager2.png" align="center"/>
+ </imageobject>
+ </mediaobject>
+
+
+ </sect2>
+
+ </sect1>
+
</chapter>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Testing.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Testing.xml 2008-05-08 15:59:42 UTC (rev 8140)
+++ trunk/doc/Seam_Reference_Guide/en-US/Testing.xml 2008-05-08 16:49:06 UTC (rev 8141)
@@ -530,10 +530,14 @@
</para>
<para>
- You need to provide a dataset for DBUnit. IMPORTANT NOTE: DBUnit supports two
- formats for dataset files, flat and XML. Seam's DBUnitSeamTest assumes the flat
- format is used, so please ensure that your dataset is in this format also.
+ You need to provide a dataset for DBUnit.
</para>
+
+ <caution>
+ DBUnit supports two formats for dataset files, flat and XML. Seam's
+ DBUnitSeamTest assumes the flat format is used, so make sure that
+ your dataset is in this format.
+ </caution>
<programlisting role="XML"><![CDATA[<dataset>
@@ -581,11 +585,30 @@
<![CDATA[<parameter name="datasourceJndiName" value="java:/seamdiscsDatasource"/>]]>
</programlisting>
- <para>
- DBUnitSeamTest only works out of the box with HSQL as a datasource.
- If you want to use another database, then you'll need to implement
- some extra methods. Read the javadoc on
- <literal>DBUnitSeamTest</literal> for more.
+ <para>
+ DBUnitSeamTest has support for MySQL and HSQL - you need to tell it
+ which database is being used:
+ </para>
+
+ <programlisting><![CDATA[<parameter name="database" value="HSQL" />]]></programlisting>
+
+ <para>
+ It also allows you to insert binary data into the test data set (n.b.
+ this is untested on Windows). You need to tell it where to locate
+ these resources:
+ </para>
+
+ <programlisting><![CDATA[<parameter name="binaryDir" value="images/" />]]></programlisting>
+
+ <para>
+ You <emphasis>must</emphasis> specify these three parameters in your
+ <literal>testng.xml</literal>.
+ </para>
+
+ <para>
+ If you want to use DBUnitSeamTest with another database, you'll need
+ to implement some methods. Read the javadoc of
+ <literal>AbstractDBUnitSeamTest</literal> for more.
</para>
</section>
@@ -593,9 +616,9 @@
<section id="testing.mail">
<title>Integration Testing Seam Mail</title>
- <para>
+ <caution>
Warning! This feature is still under development.
- </para>
+ </caution>
<para>
It's very easy to integration test your Seam Mail:
16 years, 6 months