You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by aj...@apache.org on 2008/12/31 18:37:56 UTC

svn commit: r730425 - in /incubator/jspwiki/trunk/src/webdocs: ./ templates/default/

Author: ajaquith
Date: Wed Dec 31 09:37:55 2008
New Revision: 730425

URL: http://svn.apache.org/viewvc?rev=730425&view=rev
Log:
Group.jsp, DeleteGroup.jsp, EditGroup.jsp and content JSPs refactored to use Stripes tags. GroupTab.jsp eliminated from Preferences screen. We will re-do this, later. Separated Login/create profile/lost password into separate JSPs (was causing havoc with form submits). Stripes-related labels, field names and validation errors moved to CoreResources i18n files, and removed from templates/default. Message keys were renamed to match Stripes field names where practical.

Added:
    incubator/jspwiki/trunk/src/webdocs/LostPassword.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/LostPasswordContent.jsp
Modified:
    incubator/jspwiki/trunk/src/webdocs/DeleteGroup.jsp
    incubator/jspwiki/trunk/src/webdocs/Edit.jsp
    incubator/jspwiki/trunk/src/webdocs/EditGroup.jsp
    incubator/jspwiki/trunk/src/webdocs/Group.jsp
    incubator/jspwiki/trunk/src/webdocs/Logout.jsp
    incubator/jspwiki/trunk/src/webdocs/Wiki.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/CreateProfileContent.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/GroupContent.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/LoginContent.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesContent.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp

Modified: incubator/jspwiki/trunk/src/webdocs/DeleteGroup.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/DeleteGroup.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/DeleteGroup.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/DeleteGroup.jsp Wed Dec 31 09:37:55 2008
@@ -1,56 +1,2 @@
-<%@ page import="com.ecyrd.jspwiki.log.Logger" %>
-<%@ page import="com.ecyrd.jspwiki.log.LoggerFactory" %>
-<%@ page import="com.ecyrd.jspwiki.*" %>
-<%@ page import="com.ecyrd.jspwiki.auth.NoSuchPrincipalException" %>
-<%@ page import="com.ecyrd.jspwiki.auth.WikiSecurityException" %>
-<%@ page import="com.ecyrd.jspwiki.auth.authorize.GroupManager" %>
-<%@ page errorPage="/Error.jsp" %>
-<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
-
-<%! 
-    Logger log = LoggerFactory.getLogger("JSPWiki");
-%>
-
-<%
-    WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
-    // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.DELETE_GROUP );
-
-    WikiSession wikiSession = wikiContext.getWikiSession();
-    GroupManager groupMgr = wiki.getGroupManager();
-    String name = request.getParameter( "group" );
-    
-    if ( name == null )
-    {
-        // Group parameter was null
-        wikiSession.addMessage( GroupManager.MESSAGES_KEY, "Parameter 'group' cannot be null." );
-        response.sendRedirect( "Group.jsp" );
-    }
-
-    // Check that the group exists first
-    try
-    {
-        groupMgr.getGroup( name );
-    }
-    catch ( NoSuchPrincipalException e )
-    {
-        // Group does not exist
-        wikiSession.addMessage( GroupManager.MESSAGES_KEY, e.getMessage() );
-        response.sendRedirect( "Group.jsp" );
-    }
-
-    // Now, let's delete the group
-    try 
-    {
-        groupMgr.removeGroup( name );
-        response.sendRedirect( "." );
-    }
-    catch ( WikiSecurityException e )
-    {
-        // Send error message
-        wikiSession.addMessage( GroupManager.MESSAGES_KEY, e.getMessage() );
-        response.sendRedirect( "Group.jsp" );
-    }
-
-%>
-
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.GroupActionBean" event="delete" id="wikiActionBean" executeResolution="true" />

Modified: incubator/jspwiki/trunk/src/webdocs/Edit.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/Edit.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/Edit.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/Edit.jsp Wed Dec 31 09:37:55 2008
@@ -11,7 +11,7 @@
 <%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
 <%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
-<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.EditActionBean" event="edit" id="wikiActionBean" />
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.EditActionBean" event="edit" executeResolution="true" id="wikiActionBean" />
 
 <%!
     Logger log = LoggerFactory.getLogger("JSPWiki");

Modified: incubator/jspwiki/trunk/src/webdocs/EditGroup.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/EditGroup.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/EditGroup.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/EditGroup.jsp Wed Dec 31 09:37:55 2008
@@ -1,66 +1,7 @@
-<%@ page import="com.ecyrd.jspwiki.log.Logger" %>
-<%@ page import="com.ecyrd.jspwiki.log.LoggerFactory" %>
-<%@ page import="com.ecyrd.jspwiki.*" %>
-<%@ page import="com.ecyrd.jspwiki.auth.WikiSecurityException" %>
-<%@ page import="com.ecyrd.jspwiki.auth.authorize.Group" %>
-<%@ page import="com.ecyrd.jspwiki.auth.authorize.GroupManager" %>
-<%@ page errorPage="/Error.jsp" %>
-<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
-<%! 
-    Logger log = LoggerFactory.getLogger("JSPWiki"); 
-%>
-
-<%
-    WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
-    // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.EDIT_GROUP );
-    
-    // Extract the current user, group name, members and action attributes
-    WikiSession wikiSession = wikiContext.getWikiSession();
-    GroupManager groupMgr = wiki.getGroupManager();
-    Group group = null;
-    try 
-    {
-        group = groupMgr.parseGroup( wikiContext, false );
-        pageContext.setAttribute ( "Group", group, PageContext.REQUEST_SCOPE );
-    }
-    catch ( WikiSecurityException e )
-    {
-        wikiSession.addMessage( GroupManager.MESSAGES_KEY, e.getMessage() );
-        response.sendRedirect( "Group.jsp" );
-    }
-    
-    // Are we saving the group?
-    if( "save".equals(request.getParameter("action")) )
-    {
-        // Validate the group
-        groupMgr.validateGroup( wikiContext, group );
-
-        // If no errors, save the group now
-        if ( wikiSession.getMessages( GroupManager.MESSAGES_KEY ).length == 0 )
-        {
-            try
-            {
-                groupMgr.setGroup( wikiSession, group );
-            }
-            catch( WikiSecurityException e )
-            {
-                // Something went horribly wrong! Maybe it's an I/O error...
-                wikiSession.addMessage( GroupManager.MESSAGES_KEY, e.getMessage() );
-            }
-        }
-        if ( wikiSession.getMessages( GroupManager.MESSAGES_KEY ).length == 0 )
-        {
-            response.sendRedirect( "Group.jsp?group=" + group.getName() );
-            return;
-        }
-    }
-        
-    // Set the content type and include the response content
-    response.setContentType("text/html; charset="+wiki.getContentEncoding() );
-    String contentPage = wiki.getTemplateManager().findJSP( pageContext,
-                                                            wikiContext.getTemplate(),
-                                                            "EditTemplate.jsp" );
-
-%><wiki:Include page="<%=contentPage%>" />
-
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.GroupActionBean" event="save" id="wikiActionBean" />
+<stripes:layout-render name="/templates/default/ViewLayout.jsp">
+  <stripes:layout-component name="content">
+    <jsp:include page="/templates/default/EditGroupContent.jsp" />
+  </stripes:layout-component>
+</stripes:layout-render>

Modified: incubator/jspwiki/trunk/src/webdocs/Group.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/Group.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/Group.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/Group.jsp Wed Dec 31 09:37:55 2008
@@ -1,44 +1,7 @@
-<%@ page import="com.ecyrd.jspwiki.log.Logger" %>
-<%@ page import="com.ecyrd.jspwiki.log.LoggerFactory" %>
-<%@ page import="com.ecyrd.jspwiki.*" %>
-<%@ page import="com.ecyrd.jspwiki.auth.NoSuchPrincipalException" %>
-<%@ page import="com.ecyrd.jspwiki.auth.WikiSecurityException" %>
-<%@ page import="com.ecyrd.jspwiki.auth.authorize.Group" %>
-<%@ page import="com.ecyrd.jspwiki.auth.authorize.GroupManager" %>
-<%@ page errorPage="/Error.jsp" %>
-<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
-<%! 
-    Logger log = LoggerFactory.getLogger("JSPWiki"); 
-%>
-
-<%
-    WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
-    // Create wiki context and check for authorization
-    WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW_GROUP );
-    
-    // Extract the current user, group name, members
-    WikiSession wikiSession = wikiContext.getWikiSession();
-    GroupManager groupMgr = wiki.getGroupManager();
-    Group group = null;
-    try 
-    {
-        group = groupMgr.parseGroup( wikiContext, false );
-        pageContext.setAttribute ( "Group", group, PageContext.REQUEST_SCOPE );
-    }
-    catch ( NoSuchPrincipalException e )
-    {
-        // New group; let GroupContent print out the message...
-    }
-    catch ( WikiSecurityException e )
-    {
-        wikiSession.addMessage( GroupManager.MESSAGES_KEY, e.getMessage() );
-    }
-    
-    // Set the content type and include the response content
-    response.setContentType("text/html; charset="+wiki.getContentEncoding() );
-    String contentPage = wiki.getTemplateManager().findJSP( pageContext,
-                                                            wikiContext.getTemplate(),
-                                                            "ViewTemplate.jsp" );
-
-%><wiki:Include page="<%=contentPage%>" />
-
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.GroupActionBean" event="view" executeResolution="true" id="wikiActionBean" />
+<stripes:layout-render name="/templates/default/ViewLayout.jsp">
+  <stripes:layout-component name="content">
+    <jsp:include page="/templates/default/GroupContent.jsp" />
+  </stripes:layout-component>
+</stripes:layout-render>

Modified: incubator/jspwiki/trunk/src/webdocs/Logout.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/Logout.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/Logout.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/Logout.jsp Wed Dec 31 09:37:55 2008
@@ -1,17 +1 @@
-<%@ page import="com.ecyrd.jspwiki.auth.login.CookieAuthenticationLoginModule" %>
-<%@ page import="com.ecyrd.jspwiki.WikiEngine" %>
-<%@ page import="com.ecyrd.jspwiki.auth.login.CookieAssertionLoginModule" %>
-<%
-  WikiEngine wiki = WikiEngine.getInstance( getServletConfig() );
-  wiki.getAuthenticationManager().logout( request );
-
-  // Clear the user cookie
-  CookieAssertionLoginModule.clearUserCookie( response );
-
-  // Delete the login cookie
-  CookieAuthenticationLoginModule.clearLoginCookie( wiki, request, response );
-
-  // Redirect to the webroot
-  // TODO: Should redirect to a "goodbye" -page?
-  response.sendRedirect(".");
-%>
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.LoginActionBean" event="logout" executeResolution="true" id="wikiActionBean" />

Added: incubator/jspwiki/trunk/src/webdocs/LostPassword.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/LostPassword.jsp?rev=730425&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/LostPassword.jsp (added)
+++ incubator/jspwiki/trunk/src/webdocs/LostPassword.jsp Wed Dec 31 09:37:55 2008
@@ -0,0 +1,7 @@
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.LoginActionBean" event="view" id="wikiActionBean" />
+<stripes:layout-render name="/templates/default/ViewLayout.jsp">
+  <stripes:layout-component name="content">
+    <jsp:include page="/templates/default/LostPasswordContent.jsp" />
+  </stripes:layout-component>
+</stripes:layout-render>

Modified: incubator/jspwiki/trunk/src/webdocs/Wiki.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/Wiki.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/Wiki.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/Wiki.jsp Wed Dec 31 09:37:55 2008
@@ -1,5 +1,5 @@
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
-<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.ViewActionBean" event="view" id="wikiActionBean" />
+<stripes:useActionBean beanclass="com.ecyrd.jspwiki.action.ViewActionBean" event="view" executeResolution="true" id="wikiActionBean" />
 <stripes:layout-render name="/templates/default/ViewLayout.jsp">
   <stripes:layout-component name="content">
     <jsp:include page="/templates/default/PageContent.jsp" />

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/CreateProfileContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/CreateProfileContent.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/CreateProfileContent.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/CreateProfileContent.jsp Wed Dec 31 09:37:55 2008
@@ -1,32 +1,25 @@
 <%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
-<%@ page import="com.ecyrd.jspwiki.*" %>
-<%@ page import="com.ecyrd.jspwiki.action.*" %>
-<%@ page import="com.ecyrd.jspwiki.auth.*" %>
-<%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
-<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <wiki:TabbedSection defaultTab="profile">
 
-<%-- Login functionality --%>
+<%-- Login tab --%>
 <wiki:UserCheck status="notauthenticated">
-<wiki:Tab id="logincontent" titleKey="login.tab" url="Login.jsp?tab=logincontent" />
+<wiki:Tab id="logincontent" titleKey="login.tab" url="Login.jsp" />
 
-<%-- Lost pasword functionality --%>
-<wiki:Tab id="lostpassword" titleKey="login.lostpw.tab" url="Login.jsp?tab=lostpassword" />
+<%-- Lost password tab --%>
+<wiki:Tab id="lostpassword" titleKey="login.lostpw.tab" url="LostPassword.jsp" />
 </wiki:UserCheck>
 
-<%-- Register new user profile --%>
+<%-- Register new user profile tab --%>
 <wiki:Permission permission='editProfile'>
   <wiki:Tab id="profile" titleKey="login.register.tab" accesskey="p">
      <wiki:Include page="ProfileTab.jsp" />
   </wiki:Tab>
 </wiki:Permission>
 
+<%-- Help tab --%>
 <wiki:Tab id="loginhelp" titleKey="login.tab.help">
   <wiki:InsertPage page="LoginHelp" />
-
   <wiki:NoSuchPage page="LoginHelp">
   <div class="error">
     <fmt:message key="login.loginhelpmissing">
@@ -34,7 +27,6 @@
     </fmt:message>
   </div>
   </wiki:NoSuchPage>
-
 </wiki:Tab>
 
 </wiki:TabbedSection>

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/GroupContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/GroupContent.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/GroupContent.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/GroupContent.jsp Wed Dec 31 09:37:55 2008
@@ -1,93 +1,30 @@
 <%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
-<%@ page import="java.security.Principal" %>
-<%@ page import="java.util.*" %>
-<%@ page import="com.ecyrd.jspwiki.*" %>
-<%@ page import="com.ecyrd.jspwiki.auth.PrincipalComparator" %>
-<%@ page import="com.ecyrd.jspwiki.auth.authorize.Group" %>
-<%@ page import="com.ecyrd.jspwiki.auth.authorize.GroupManager" %>
-<%@ page import="com.ecyrd.jspwiki.preferences.Preferences" %>
-<%@ page import="com.ecyrd.jspwiki.log.Logger" %>
-<%@ page import="com.ecyrd.jspwiki.log.LoggerFactory" %>
-<%@ page errorPage="/Error.jsp" %>
-<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
-<%@ page import="com.ecyrd.jspwiki.action.WikiContextFactory" %>
-<%@ page import="com.ecyrd.jspwiki.util.TextUtil" %>
-<%!
-  Logger log = LoggerFactory.getLogger("JSPWiki");
-%>
-
-<%
-  WikiContext c = WikiContextFactory.findContext( pageContext );
-
-  // Extract the group name and members
-  String name = request.getParameter( "group" );
-  Group group = (Group)pageContext.getAttribute( "Group",PageContext.REQUEST_SCOPE );
-  Principal[] members = null;
-  String modified = "";
-  String created = "";
-  String modifier = "";
-  String creator = "";
-
-  if ( group != null )
-  {
-    name = group.getName();
-    members = group.members();
-    Arrays.sort( members, new PrincipalComparator() );
-    creator = group.getCreator();
-    if ( group.getCreated() != null )
-    {
-      created = Preferences.renderDate(WikiContextFactory.findContext( pageContext ), group.getCreated(),Preferences.TimeFormat.DATETIME);
-    }
-    modifier = group.getModifier();
-    if ( group.getLastModified() != null )
-    {
-      modified = Preferences.renderDate(WikiContextFactory.findContext( pageContext ), group.getLastModified(),Preferences.TimeFormat.DATETIME) ; 
-    }
-  }
-  name = TextUtil.replaceEntities(name);
-%>
-
 <wiki:TabbedSection defaultTab="${param.tab}">
   <wiki:Tab id="viewgroup" titleKey="group.tab">
-  <h3><%=name%></h3>
+  <h3><c:out value="${wikiActionBean.name}" /></h3>
+  <strips:messages />
+  <wiki:Permission permission="createGroups">
+    <fmt:message key="group.createsuggestion">
+      <fmt:param>
+        <stripes:link beanclass="com.ecyrd.jspwiki.action.GroupActionBean" event="create">
+          <stripes:param name="group" value="${wikiActionBean.name}" />
+          <stripes:param name="group" value="${wikiActionBean.name}" />
+          <fmt:message key="group.createit" />
+        </stripes:link>
+      </fmt:param>
+    </fmt:message>
+  </wiki:Permission>
 
-<%
-  if ( group == null )
-  {
-    if ( c.getWikiSession().getMessages( GroupManager.MESSAGES_KEY ).length == 0 )
-    {
-%>
-    <fmt:message key="group.doesnotexist" />
-    <wiki:Permission permission="createGroups">
-      <fmt:message key="group.createsuggestion">
-        <fmt:param><wiki:Link jsp="NewGroup.jsp">
-                      <wiki:Param name="group" value="<%=name%>" />
-                      <wiki:Param name="group" value="<%=name%>" />
-                      <fmt:message key="group.createit" />
-                   </wiki:Link>
-        </fmt:param>
-      </fmt:message>
-    </wiki:Permission>
-<%
-    }
-    else
-    {
-%>
-       <wiki:Messages div="error" topic="<%=GroupManager.MESSAGES_KEY%>" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"group.errorprefix")%>' />
-<%
-    }
-  }
-  else
-  {
-%>
- <table class="wikitable">
+  <table class="wikitable">
+    <!-- Name -->
     <tr>
       <th><fmt:message key="group.name" /></th>
       <td>
         <fmt:message key="group.groupintro">
-          <fmt:param><em><%=name%></em></fmt:param>
+          <fmt:param><em><c:out value="${wikiActionBean.name}" /></em></fmt:param>
         </fmt:message>
       </td>
     </tr>
@@ -95,56 +32,45 @@
     <tr>
       <th><fmt:message key="group.members" />
       </th>
-      <td><%
-            for ( int i = 0; i < members.length; i++ )
-            {
-              out.println( members[i].getName().trim() );
-              if ( i < ( members.length - 1 ) )
-              {
-                out.println( "<br/>" );
-              }
-            }
-          %></td>
-          <%--fmt:message key="group.membership"/--%>
-      </tr>
-      <tr>
-        <td colspan="2">
+      <td>
+         <c:forEach items="${wikiActionBean.members}" var="member" varStatus="loop">
+           <c:out value="${member.name}" /><br/>
+         </c:forEach>
+      </td>
+    </tr>
+    <tr>
+      <td colspan="2">
         <fmt:message key="group.modifier">
-           <fmt:param><%=modifier%></fmt:param>
-           <fmt:param><%=modified%></fmt:param>
+          <fmt:param><c:out value="${wikiActionBean.modifier}" /></fmt:param>
+          <fmt:param><c:out value="${wikiActionBean.modified}" /></fmt:param>
         </fmt:message>
-        </td>
-      </tr>
-      <tr>
-        <td colspan="2">
+      </td>
+    </tr>
+    <tr>
+      <td colspan="2">
         <fmt:message key="group.creator">
-           <fmt:param><%=creator%></fmt:param>
-           <fmt:param><%=created%></fmt:param>
+          <fmt:param><c:out value="${wikiActionBean.creator}" /></fmt:param>
+          <fmt:param><c:out value="${wikiActionBean.created}" /></fmt:param>
         </fmt:message>
-        </td>
-      </tr>
-    </table>
-<%
-  }
-%>
+      </td>
+    </tr>
+  </table>
 
-  <wiki:Permission permission="deleteGroup"> 
-  <form action="<wiki:Link format='url' jsp='DeleteGroup.jsp'/>"
-         class="wikiform"
-            id="deleteGroup"
-        onsubmit="return( confirm('<fmt:message key="grp.deletegroup.confirm"/>') 
-        && Wiki.submitOnce(this) );"
-        method="POST" accept-charset="UTF-8">
-      <input type="submit" name="ok" value="<fmt:message key="actions.deletegroup"/>" />
-      <input type="hidden" name="group" value="${param.group}" />
-  </form>
+  <wiki:Permission permission="deleteGroup">
+    <c:set var="confirm" value="<fmt:message key='grp.deletegroup.confirm'/>" scope="page"/>
+    <stripes:form beanclass="com.ecyrd.jspwiki.action.GroupActionBean" class="wikiform"
+      id="deleteGroup"
+      onsubmit="return( confirm('${confirm}') && Wiki.submitOnce(this) );"
+      method="POST" acceptcharset="UTF-8">
+      <stripes:submit name="delete"><fmt:message key="actions.deletegroup" /></stripes:submit>
+    </stripes:form>
   </wiki:Permission>
 
 </wiki:Tab>
 
 <wiki:Permission permission="editGroup">
   <wiki:Tab id="editgroup" titleKey="actions.editgroup"
-           url='<%=c.getURL(WikiContext.NONE, "EditGroup.jsp", "group="+request.getParameter("group") ) %>'
+           url="<stripes:link beanclass='com.ecyrd.jspwiki.action.GroupActionBean' event='edit'><stripes:param name='group' value='${wikiActionBean.name}' /></stripes:link>"
            accesskey="e" >
   </wiki:Tab>
 </wiki:Permission>

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/LoginContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/LoginContent.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/LoginContent.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/LoginContent.jsp Wed Dec 31 09:37:55 2008
@@ -2,7 +2,6 @@
 <%@ page import="com.ecyrd.jspwiki.*" %>
 <%@ page import="com.ecyrd.jspwiki.action.*" %>
 <%@ page import="com.ecyrd.jspwiki.auth.*" %>
-<%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
@@ -25,7 +24,7 @@
 %>
 <wiki:TabbedSection defaultTab="${param.tab}">
 
-<%-- Login functionality --%>
+<%-- Login tab --%>
 <wiki:UserCheck status="notauthenticated">
 <wiki:Tab id="logincontent" titleKey="login.tab">
 <%--<wiki:Include page='LoginTab.jsp'/>--%>
@@ -46,25 +45,25 @@
       </td>
     </tr>
     <tr>
-      <td><stripes:label for="j_username" name="login.login" /></td>
+      <td><stripes:label for="j_username" name="loginName" /></td>
       <td>
         <stripes:text size="24" name="j_username" id="j_username"><wiki:Variable var="uid" default="" /></stripes:text>
       </td>
     </tr>
     <tr>
-      <td><stripes:label for="j_password" name="login.password" /></td>
+      <td><stripes:label for="j_password" name="password" /></td>
       <td><stripes:password size="24" name="j_password" id="j_password" /></td>
     </tr>
     <% if( supportsCookieAuthentication ) { %>
     <tr>
-      <td><stripes:label for="remember" name="login.remember" /></td>
+      <td><stripes:label for="remember" /></td>
       <td><stripes:checkbox name="remember" id="j_remember" /></td>
     </tr>
     <% } %>
     <tr>
       <td>&nbsp;</td>
       <td>
-        <stripes:submit name="login"><fmt:message key="login.submit.login" /></stripes:submit>
+        <stripes:submit name="login" />
       </td>
     </tr>
     </table>
@@ -89,81 +88,18 @@
 
 </wiki:Tab>
 
-<%-- Lost pasword functionality --%>
-<wiki:Tab id="lostpassword" titleKey="login.lostpw.tab">
-
-<div class="center">
-<stripes:form beanclass="com.ecyrd.jspwiki.action.LoginActionBean" id="lostpw" class="wikiform" method="post" acceptcharset="UTF-8">
-  <stripes:param name="tab" value="lostpassword" />
-  <h3><fmt:message key="login.lostpw.heading" /></h3>
-
-  <c:choose>
-  <c:when test="${passwordreset == 'done' }">
-      <wiki:Messages div="information" topic="resetpw" prefix="" />
-      <p>
-        <fmt:message key="login.lostpw.reset.login">
-          <fmt:param><a href="<wiki:Link jsp='Login.action' />"><fmt:message key="login.lostpw.reset.clickhere" /></a></fmt:param>
-        </fmt:message>
-      </p>
-  </c:when>
-  <c:otherwise>
-
-  <div class="formhelp"><fmt:message key="login.lostpw.help"></fmt:message></div>
-
-  <table>
-    <c:if test="${param.tab eq 'lostpassword'}">
-    <tr>
-      <td colspan="2" class="formhelp">
-        <wiki:Messages div="error" topic="resetpw" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"login.errorprefix")%>' />
-        <wiki:Messages div="information" topic="resetpwok" />
-      </td>
-    </tr>
-    </c:if>
-    <tr>
-      <td><stripes:label for="email" name="login.lostpw.name" /></td>
-      <td><stripes:text size="24" name="email" id="email" /></td>
-    </tr>
-    <tr>
-      <td>&nbsp;</td>
-      <td>
-        <stripes:submit name="resetPassword"><fmt:message key="login.lostpw.submit" /></stripes:submit>
-      </td>
-    </tr>
-  </table>
-
-  <div class="formhelp">
-    <fmt:message key="login.invite" />
-    <a href="#" onclick="$('menu-logincontent').fireEvent('click');" title="<fmt:message key='login.title' />">
-      <fmt:message key="login.heading.login"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message>
-    </a>
-  </div>
-  <div class="formhelp">
-    <fmt:message key="login.nopassword" />
-    <%--<a href="UserPreferences.jsp?tab=profile">--%>
-    <a href="#" onclick="$('menu-profile').fireEvent('click');" title="<fmt:message key='login.registernow.title' />">
-      <fmt:message key="login.registernow">
-        <fmt:param><wiki:Variable var="applicationname" /></fmt:param>
-      </fmt:message>
-    </a>
-  </div>
-
-  </c:otherwise>
-  </c:choose>
-
-</stripes:form>
-</div>
-
-</wiki:Tab>
+<%-- Lost password tab --%>
+<wiki:Tab id="lostpassword" titleKey="login.lostpw.tab" url="LostPassword.jsp" />
 </wiki:UserCheck>
 
-<%-- Register new user profile --%>
+<%-- Register new user profile tab --%>
 <wiki:Permission permission='editProfile'>
-<wiki:Tab id="profile" titleKey="login.register.tab" url="CreateProfile.jsp" />
+  <wiki:Tab id="profile" titleKey="login.register.tab" url="CreateProfile.jsp" />
 </wiki:Permission>
 
+<%-- Help tab --%>
 <wiki:Tab id="loginhelp" titleKey="login.tab.help">
   <wiki:InsertPage page="LoginHelp" />
-
   <wiki:NoSuchPage page="LoginHelp">
   <div class="error">
     <fmt:message key="login.loginhelpmissing">
@@ -171,7 +107,6 @@
     </fmt:message>
   </div>
   </wiki:NoSuchPage>
-
 </wiki:Tab>
 
 </wiki:TabbedSection>
\ No newline at end of file

Added: incubator/jspwiki/trunk/src/webdocs/templates/default/LostPasswordContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/LostPasswordContent.jsp?rev=730425&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/LostPasswordContent.jsp (added)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/LostPasswordContent.jsp Wed Dec 31 09:37:55 2008
@@ -0,0 +1,96 @@
+<%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
+<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<wiki:TabbedSection defaultTab="lostpassword">
+
+<%-- Login tab --%>
+<wiki:UserCheck status="notauthenticated">
+<wiki:Tab id="logincontent" titleKey="login.tab" url="Login.jsp" />
+
+<%-- Lost password tab --%>
+<wiki:Tab id="lostpassword" titleKey="login.lostpw.tab">
+
+<div class="center">
+<stripes:form beanclass="com.ecyrd.jspwiki.action.LoginActionBean" id="lostpw" class="wikiform" method="post" acceptcharset="UTF-8">
+  <stripes:param name="tab" value="lostpassword" />
+  <h3><fmt:message key="login.lostpw.heading" /></h3>
+
+  <c:choose>
+  <c:when test="${passwordreset == 'done' }">
+      <wiki:Messages div="information" topic="resetpw" prefix="" />
+      <p>
+        <fmt:message key="login.lostpw.reset.login">
+          <fmt:param><a href="<wiki:Link jsp='Login.action' />"><fmt:message key="login.lostpw.reset.clickhere" /></a></fmt:param>
+        </fmt:message>
+      </p>
+  </c:when>
+  <c:otherwise>
+
+  <div class="formhelp"><fmt:message key="login.lostpw.help"></fmt:message></div>
+
+  <table>
+    <c:if test="${param.tab eq 'lostpassword'}">
+    <tr>
+      <td colspan="2" class="formhelp">
+        <wiki:Messages div="error" topic="resetpw" prefix='<%=LocaleSupport.getLocalizedMessage(pageContext,"login.errorprefix")%>' />
+        <wiki:Messages div="information" topic="resetpwok" />
+      </td>
+    </tr>
+    </c:if>
+    <tr>
+      <td><stripes:label for="email" /></td>
+      <td><stripes:text size="24" name="email" id="email" /></td>
+    </tr>
+    <tr>
+      <td>&nbsp;</td>
+      <td>
+        <stripes:submit name="resetPassword" />
+      </td>
+    </tr>
+  </table>
+
+  <div class="formhelp">
+    <fmt:message key="login.invite" />
+    <a href="#" onclick="$('menu-logincontent').fireEvent('click');" title="<fmt:message key='login.title' />">
+      <fmt:message key="login.heading.login"><fmt:param><wiki:Variable var="applicationname" /></fmt:param></fmt:message>
+    </a>
+  </div>
+  <div class="formhelp">
+    <fmt:message key="login.nopassword" />
+    <%--<a href="UserPreferences.jsp?tab=profile">--%>
+    <a href="#" onclick="$('menu-profile').fireEvent('click');" title="<fmt:message key='login.registernow.title' />">
+      <fmt:message key="login.registernow">
+        <fmt:param><wiki:Variable var="applicationname" /></fmt:param>
+      </fmt:message>
+    </a>
+  </div>
+
+  </c:otherwise>
+  </c:choose>
+
+</stripes:form>
+</div>
+
+</wiki:Tab>
+</wiki:UserCheck>
+
+<%-- Register new user profile tab --%>
+<wiki:Permission permission='editProfile'>
+  <wiki:Tab id="profile" titleKey="login.register.tab" url="CreateProfile.jsp" />
+</wiki:Permission>
+
+<%-- Help tab --%>
+<wiki:Tab id="loginhelp" titleKey="login.tab.help">
+  <wiki:InsertPage page="LoginHelp" />
+  <wiki:NoSuchPage page="LoginHelp">
+  <div class="error">
+    <fmt:message key="login.loginhelpmissing">
+       <fmt:param><wiki:EditLink page="LoginHelp">LoginHelp</wiki:EditLink></fmt:param>
+    </fmt:message>
+  </div>
+  </wiki:NoSuchPage>
+</wiki:Tab>
+
+</wiki:TabbedSection>

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesContent.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesContent.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesContent.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/PreferencesContent.jsp Wed Dec 31 09:37:55 2008
@@ -12,11 +12,5 @@
   </wiki:Tab>
   </wiki:Permission>
   </wiki:UserCheck>
-  
-  <wiki:Permission permission="createGroups"> <!-- FIXME check right permissions -->
-  <wiki:Tab id="group" titleKey="group.tab" accesskey="g">
-    <wiki:Include page="GroupTab.jsp" />
-  </wiki:Tab>
-  </wiki:Permission>
 
 </wiki:TabbedSection>
\ No newline at end of file

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp?rev=730425&r1=730424&r2=730425&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp Wed Dec 31 09:37:55 2008
@@ -1,7 +1,7 @@
 <%@ taglib uri="http://jakarta.apache.org/jspwiki.tld" prefix="wiki" %>
-<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld" prefix="stripes" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <stripes:form beanclass="com.ecyrd.jspwiki.action.UserProfileActionBean" id="editProfile" class="wikiform" method="post" acceptcharset="UTF-8">
       <stripes:param name="tab" value="profile" />
@@ -21,7 +21,7 @@
 
      <!-- Login name -->
      <tr>
-       <td><stripes:label for="profile.loginName" name="prefs.loginname" /></td>
+       <td><stripes:label for="profile.loginName" /></td>
        <td>
          <wiki:UserProfile property="canChangeLoginName">
            <stripes:text name="profile.loginName" id="loginName" size="20"><wiki:UserProfile property="loginname" /></stripes:text>
@@ -43,14 +43,14 @@
      <!-- Password; not displayed if container auth used -->
      <wiki:UserProfile property="canChangePassword">
        <tr>
-         <td><stripes:label for="profile.password" name="prefs.password" /></td>
+         <td><stripes:label for="profile.password" /></td>
          <td>
            <stripes:password name="profile.password" id="password" size="20" value="" />
            <stripes:errors field="profile.password" />
           </td>
         </tr>
         <tr>
-          <td><stripes:label for="passwordAgain" name="prefs.password2" /></td>
+          <td><stripes:label for="passwordAgain" /></td>
           <td>
            <stripes:password name="passwordAgain" id="passwordAgain" size="20" value="" />
            <stripes:errors field="profile.passwordAgain" />
@@ -60,7 +60,7 @@
 
      <!-- Full name -->
      <tr>
-       <td><stripes:label for="profile.fullname" name="prefs.fullname" /></td>
+       <td><stripes:label for="profile.fullname" /></td>
        <td>
          <stripes:text name="profile.fullname" id="fullname" size="20"><wiki:UserProfile property="fullname" /></stripes:text>
           <stripes:errors field="profile.fullname" />
@@ -70,7 +70,7 @@
 
      <!-- E-mail -->
      <tr>
-       <td><stripes:label for="profile.email" name="prefs.email" /></td>
+       <td><stripes:label for="profile.email" name="email" /></td>
        <td>
          <stripes:text name="profile.email" id="email" size="20"><wiki:UserProfile property="email" /></stripes:text>
          <stripes:errors field="profile.email" />
@@ -80,11 +80,11 @@
 
      <wiki:UserProfile property="exists">
      <tr class="additinfo">
-       <td><stripes:label name="prefs.roles" /></td>
+       <td><fmt:message key="prefs.roles" /></td>
        <td><div class="formvalue"><wiki:UserProfile property="roles" /></div></td>
      </tr>
      <tr class="additinfo">
-       <td><stripes:label name="prefs.groups" /></td>
+       <td><fmt:message key="prefs.groups" /></td>
        <td>
          <%-- TODO this should become clickable group links so you can immediately go and look at them if you want --%>
          <div class="formvalue"><wiki:UserProfile property="groups" /></div>
@@ -93,14 +93,14 @@
      </tr>
 
      <tr class="additinfo">
-       <td><stripes:label name="prefs.creationdate" /></td>
+       <td><fmt:message key="prefs.creationdate" /></td>
        <td class="formvalue">
          <%--<wiki:UserProfile property="created"/>--%>
  	     <fmt:formatDate value="${profile.Created}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
        </td>
      </tr>
      <tr class="additinfo">
-       <td><stripes:label name="prefs.profile.lastmodified" /></td>
+       <td><fmt:message key="prefs.profile.lastmodified" /></td>
        <td class="formvalue">
          <%--<wiki:UserProfile property="modified"/>--%>
  	     <fmt:formatDate value="${profile.LastModified}" pattern="${prefs.DateFormat}" timeZone="${prefs.TimeZone}" />
@@ -111,13 +111,7 @@
      <tr>
        <td>&nbsp;</td>
        <td>
-       <wiki:UserProfile property="exists">
-        <stripes:submit name="save"><fmt:message key="prefs.save.submit" /></stripes:submit>
-       </wiki:UserProfile>
-       <wiki:UserProfile property="new">
-        <stripes:submit name="save"><fmt:message key="prefs.save.submit" /></stripes:submit>
-       </wiki:UserProfile>
-
+       <stripes:submit name="save" />
        <wiki:UserCheck status="assertionsAllowed">
           <div class="formhelp"><fmt:message key="prefs.cookie.info" /></div>
         </wiki:UserCheck>