[Bedework-commit] r672 - in freebusy/trunk/webclient:
src/org/bedework/fbaggregator war/WEB-INF war/docs
svnadmin at bedework.org
svnadmin at bedework.org
Fri Jun 30 23:37:16 EDT 2006
Author: douglm
Date: 2006-06-30 23:37:13 -0400 (Fri, 30 Jun 2006)
New Revision: 672
Added:
freebusy/trunk/webclient/src/org/bedework/fbaggregator/RenderAction.java
Removed:
freebusy/trunk/webclient/war/docs/save.jsp
freebusy/trunk/webclient/war/docs/upload.jsp
Modified:
freebusy/trunk/webclient/war/WEB-INF/struts-config.xml
freebusy/trunk/webclient/war/docs/footer.jsp
freebusy/trunk/webclient/war/docs/header.jsp
freebusy/trunk/webclient/war/docs/main.jsp
Log:
More freebusy aggregator changes
Added: freebusy/trunk/webclient/src/org/bedework/fbaggregator/RenderAction.java
===================================================================
--- freebusy/trunk/webclient/src/org/bedework/fbaggregator/RenderAction.java (rev 0)
+++ freebusy/trunk/webclient/src/org/bedework/fbaggregator/RenderAction.java 2006-07-01 03:37:13 UTC (rev 672)
@@ -0,0 +1,100 @@
+/*
+ Copyright (c) 2000-2005 University of Washington. All rights reserved.
+
+ Redistribution and use of this distribution in source and binary forms,
+ with or without modification, are permitted provided that:
+
+ The above copyright notice and this permission notice appear in
+ all copies and supporting documentation;
+
+ The name, identifiers, and trademarks of the University of Washington
+ are not used in advertising or publicity without the express prior
+ written permission of the University of Washington;
+
+ Recipients acknowledge that this distribution is made available as a
+ research courtesy, "as is", potentially with defects, without
+ any obligation on the part of the University of Washington to
+ provide support, services, or repair;
+
+ THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR
+ IMPLIED, WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION
+ ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE, AND IN NO EVENT SHALL THE UNIVERSITY OF
+ WASHINGTON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT (INCLUDING
+ NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+/* **********************************************************************
+ Copyright 2005 Rensselaer Polytechnic Institute. All worldwide rights reserved.
+
+ Redistribution and use of this distribution in source and binary forms,
+ with or without modification, are permitted provided that:
+ The above copyright notice and this permission notice appear in all
+ copies and supporting documentation;
+
+ The name, identifiers, and trademarks of Rensselaer Polytechnic
+ Institute are not used in advertising or publicity without the
+ express prior written permission of Rensselaer Polytechnic Institute;
+
+ DISCLAIMER: The software is distributed" AS IS" without any express or
+ implied warranty, including but not limited to, any implied warranties
+ of merchantability or fitness for a particular purpose or any warrant)'
+ of non-infringement of any current or pending patent rights. The authors
+ of the software make no representations about the suitability of this
+ software for any particular purpose. The entire risk as to the quality
+ and performance of the software is with the user. Should the software
+ prove defective, the user assumes the cost of all necessary servicing,
+ repair or correction. In particular, neither Rensselaer Polytechnic
+ Institute, nor the authors of the software are liable for any indirect,
+ special, consequential, or incidental damages related to the software,
+ to the maximum extent the law permits.
+*/
+
+package org.bedework.fbaggregator;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ *
+ * @author Mike Douglass douglm at rpi.edu
+ */
+public class RenderAction extends FBAggAction {
+ public String getId() {
+ return getClass().getName();
+ }
+
+ public int doAction(HttpServletRequest request,
+ HttpServletResponse response,
+ FbAggSession sess,
+ FbAggForm frm) throws Throwable {
+ return forwardSuccess;
+ }
+
+ /* (non-Javadoc)
+ * @see edu.rpi.sss.util.jsp.UtilAbstractAction#getContentName(edu.rpi.sss.util.jsp.UtilActionForm)
+ */
+ public String getContentName(FbAggForm form) {
+ String contentName = form.getPresentationState().getContentName();
+
+ if (contentName != null) {
+ form.setContentName(contentName);
+ } else {
+ contentName = form.getContentName();
+ form.setContentName(null); // It's a one shot and we're about to render
+ }
+
+ return contentName;
+ }
+
+ /** In a portlet environment a render action should override this to return
+ * false to preserve messages.
+ *
+ * @return boolean true to clear messages
+ */
+ public boolean clearMessages() {
+ return false;
+ }
+}
Modified: freebusy/trunk/webclient/war/WEB-INF/struts-config.xml
===================================================================
--- freebusy/trunk/webclient/war/WEB-INF/struts-config.xml 2006-06-30 20:51:15 UTC (rev 671)
+++ freebusy/trunk/webclient/war/WEB-INF/struts-config.xml 2006-07-01 03:37:13 UTC (rev 672)
@@ -5,14 +5,14 @@
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<!-- =================================================================
- This is a the Struts configuration for the config app.
+ This is a the Struts configuration for the free busy aggregator
=================================================================== -->
<struts-config>
<!-- ========== Form Bean Definitions ================================ -->
<form-beans>
- <form-bean name="configForm"
- type="org.bedework.webconfig.ActionForm"/>
+ <form-bean name="bwForm"
+ type="org.bedework.fbaggregator.FbAggForm"/>
</form-beans>
<!-- ========== Global Forward Definitions ===========================
@@ -32,7 +32,7 @@
<!-- ========== Action Mapping Definitions =========================== -->
<action-mappings>
<action path="/showMain"
- type="org.bedework.webconfig.RenderAction"
+ type="org.bedework.fbaggregator.RenderAction"
name="configForm"
scope="session"
validate="false">
@@ -40,62 +40,40 @@
</action>
<action path="/setup"
- type="org.bedework.webconfig.RenderAction"
+ type="org.bedework.fbaggregator.RenderAction"
unknown="true"
name="configForm"
scope="session"
validate="false">
</action>
- <action path="/showUpload"
- type="org.bedework.webconfig.RenderAction"
+ <action path="/showFreeBusy"
+ type="org.bedework.fbaggregator.RenderAction"
name="configForm"
scope="session"
validate="false">
- <forward name="success" path="/docs/upload.jsp" />
+ <forward name="success" path="/docs/freeBusy.jsp" />
</action>
- <action path="/showSaved"
- type="org.bedework.webconfig.RenderAction"
- name="configForm"
- scope="session"
- validate="false">
- <forward name="success" path="/docs/save.jsp" />
- </action>
-
<!-- ===============================================================
- Config Actions
+ Actions
=============================================================== -->
- <action path="/update"
- type="org.bedework.webconfig.Action"
+ <action path="/getFreeBusy"
+ type="org.bedework.fbaggregator.GetFreeBusy"
name="configForm"
scope="session"
validate="false">
+ <forward name="success" path="/showFreeBusy.rdo" redirect="true" />
</action>
- <action path="/initUpload"
- type="org.bedework.webconfig.Action"
+ <action path="/addUser"
+ type="org.bedework.fbaggregator.AddUser"
name="configForm"
scope="session"
validate="false">
- <forward name="success" path="/showUpload.rdo" redirect="true" />
+ <forward name="success" path="/showMain.rdo" redirect="true" />
</action>
-
- <action path="/upload"
- type="org.bedework.webconfig.LoadAction"
- name="configForm"
- scope="session"
- validate="false">
- </action>
-
- <action path="/save"
- type="org.bedework.webconfig.SaveAction"
- name="configForm"
- scope="session"
- validate="false">
- <forward name="save" path="/showSaved.rdo" redirect="true" />
- </action>
</action-mappings>
<!-- Below will be one or more comments which must not be edited or removed
Modified: freebusy/trunk/webclient/war/docs/footer.jsp
===================================================================
--- freebusy/trunk/webclient/war/docs/footer.jsp 2006-06-30 20:51:15 UTC (rev 671)
+++ freebusy/trunk/webclient/war/docs/footer.jsp 2006-07-01 03:37:13 UTC (rev 672)
@@ -2,5 +2,5 @@
<%@ taglib uri='struts-logic' prefix='logic' %>
<%@ taglib uri='struts-html' prefix='html' %>
-</bedeworkconfig>
+</bedework-fbaggregator>
Modified: freebusy/trunk/webclient/war/docs/header.jsp
===================================================================
--- freebusy/trunk/webclient/war/docs/header.jsp 2006-06-30 20:51:15 UTC (rev 671)
+++ freebusy/trunk/webclient/war/docs/header.jsp 2006-07-01 03:37:13 UTC (rev 672)
@@ -2,11 +2,10 @@
<%@ taglib uri='struts-logic' prefix='logic' %>
<%@ taglib uri='struts-html' prefix='html' %>
<%@ taglib uri='struts-genurl' prefix='genurl' %>
-<html:xhtml/>
-<bedeworkconfig>
+<bedework-fbaggregator>
<!-- messages -->
- <logic:iterate id="msg" name="configForm" property="msg.msgList">
+ <logic:iterate id="msg" name="bwForm" property="msg.msgList">
<message>
<id><bean:write name="msg" property="msgId" /></id>
<logic:iterate id="param" name="msg" property="params" >
@@ -16,7 +15,7 @@
</logic:iterate>
<!-- errors -->
- <logic:iterate id="errBean" name="configForm" property="err.msgList">
+ <logic:iterate id="errBean" name="bwForm" property="err.msgList">
<error>
<id><bean:write name="errBean" property="msgId" /></id>
<logic:iterate id="param" name="errBean" property="params" >
@@ -26,19 +25,25 @@
</logic:iterate>
<!-- global variables -->
- <appRoot><bean:write name="configForm" property="presentationState.appRoot"/></appRoot><%--
+ <appRoot><bean:write name="bwForm" property="presentationState.appRoot"/></appRoot><%--
Value: URI - the location of web resources used by the code to find the
XSLT files. This element is defined prior to build in
../../../../clones/democal.properties
as pubevents.app.root and personal.app.root. Note that references to
html web resources such as images are set in the xsl stylesheets. --%>
- <urlPrefix><bean:write name="configForm" property="urlPrefix"/></urlPrefix><%--
+ <urlPrefix><bean:write name="bwForm" property="urlPrefix"/></urlPrefix><%--
Value: URI - this is prefix (web context) of the application.
e.g. http://localhost:8080/bwconfig
Use this value to prefix calls to the application actions in your XSLT.
e.g. <a href="{$urlPrefix}/eventView.do?eventId=8">View Event</a> --%>
- <logic:iterate id="appvar" name="configForm" property="appVars">
+ <urlPrefixes>
+ <initialise><genurl:rewrite forward="initialise"/></initialise>
+ <fetchFreeBusy><genurl:link page="getFreeBusy.do?b=de"/></fetchFreeBusy>
+ <addUser><genurl:rewrite action="addUser.do?b=de"/></addUser>
+ </urlPrefixes>
+
+ <logic:iterate id="appvar" name="bwForm" property="appVars">
<appvar><%--
Application variables can be set arbitrarily by the stylesheet designer.
Use an "appvar" by adding setappvar=key(value) to the query string of
Modified: freebusy/trunk/webclient/war/docs/main.jsp
===================================================================
--- freebusy/trunk/webclient/war/docs/main.jsp 2006-06-30 20:51:15 UTC (rev 671)
+++ freebusy/trunk/webclient/war/docs/main.jsp 2006-07-01 03:37:13 UTC (rev 672)
@@ -7,62 +7,7 @@
<page>main</page>
-<propertyGroups>
- <html:form action="save.do" method="POST" enctype="multipart/form-data">
- <logic:iterate id="pgroup" name="configForm" property="propertyCollections">
- <logic:equal name="pgroup" property="show" value="true" >
- <bean:define id="bwpgname" name="pgroup" property="name" />
- <propertyGroup name="<%=bwpgname%>">
- <logic:iterate id="prop" name="pgroup" property="properties" >
- <logic:equal name="prop" property="type" value="5" >
- <comment><bean:write name="prop" property="value"/></comment>
- </logic:equal>
- <logic:notEqual name="prop" property="type" value="5" >
- <logic:equal name="prop" property="show" value="true" >
- <bean:define id="ptype" name="prop" property="type" />
- <bean:define id="bwpname" name="prop" property="name" />
- <property name="<%=bwpname%>" type="<%=ptype%>">
- <required><bean:write name="prop" property="required"/></required>
- <ok><bean:write name="prop" property="goodValue"/></ok>
- <fieldName><bean:write name="pgroup" property="name" />.<bean:write name="prop" property="name" /></fieldName>
- <fieldValue><bean:write name="prop" property="value" /></fieldValue>
- <logic:equal name="prop" property="type" value="2" >
- <checked><bean:write name="prop" property="booleanValAndFlag"/></checked>
- </logic:equal>
- <%-- /*
- ORIGINAL JSP:
- <% String nm = String.valueOf(bwpgname) + "." + String.valueOf(bwpname); %>
- <logic:equal name="prop" property="type" value="2" >
- <% String checked = ""; %>
- <logic:equal name="prop" property="booleanValAndFlag" value="true" >
- <% checked = "CHECKED"; %>
- </logic:equal>
- <field><input type="checkbox" name="<%=nm%>" <%=checked%> value="true" /></field>
- </logic:equal>
- <logic:notEqual name="prop" property="type" value="2" >
- <logic:present name="prop" property="value" >
- <bean:define id="bwpval" name="prop" property="value" />
- <% String val = String.valueOf(bwpval); %>
- <input type="text" name="<%=nm%>" value="<%=val%>" />
- </logic:present>
- <logic:notPresent name="prop" property="value" >
- <input type="text" name="<%=nm%>" />
- </logic:notPresent>
- </logic:notEqual> */ --%>
- </property>
- </logic:equal>
- </logic:notEqual>
- </logic:iterate>
- </propertyGroup>
- </logic:equal>
- </logic:iterate>
- <submitButtons>
- <save><html:submit property="save" value="Save"/></save>
- <refresh><html:submit property="refresh" value="Refresh"/></refresh>
- </submitButtons>
- </html:form>
-</propertyGroups>
<%@ include file="footer.jsp" %>
Deleted: freebusy/trunk/webclient/war/docs/save.jsp
===================================================================
--- freebusy/trunk/webclient/war/docs/save.jsp 2006-06-30 20:51:15 UTC (rev 671)
+++ freebusy/trunk/webclient/war/docs/save.jsp 2006-07-01 03:37:13 UTC (rev 672)
@@ -1,27 +0,0 @@
-<%@ taglib uri='struts-bean' prefix='bean' %>
-<%@ taglib uri='struts-logic' prefix='logic' %>
-<%@ taglib uri='struts-html' prefix='html' %>
-<%@ taglib uri='struts-genurl' prefix='genurl' %>
-
-<%@ include file="header.jsp" %>
-
-<page>save</page>
-
-<%-- This page could change the content type and produce a properties file --%>
-
-<propertyGroups>
- <logic:iterate id="pgroup" name="configForm" property="propertyCollections">
- <bean:define id="bwpgname" name="pgroup" property="name" />
- <bean:define id="bwpgprefix" name="pgroup" property="prefix" />
- <propertyGroup name="<%=bwpgname%>">
- <logic:iterate id="prop" name="pgroup" property="properties" >
- <bean:define id="bwpsuffix" name="prop" property="suffix" />
- <% String nm = "org.bedework." + String.valueOf(bwpgprefix) + "." + String.valueOf(bwpsuffix); %>
- <property name="<%=nm%>"><logic:present name="prop" property="value" ><bean:write name="prop" property="value" /></logic:present></property>
- </logic:iterate>
- </propertyGroup>
- </logic:iterate>
-</propertyGroups>
-
-<%@ include file="footer.jsp" %>
-
Deleted: freebusy/trunk/webclient/war/docs/upload.jsp
===================================================================
--- freebusy/trunk/webclient/war/docs/upload.jsp 2006-06-30 20:51:15 UTC (rev 671)
+++ freebusy/trunk/webclient/war/docs/upload.jsp 2006-07-01 03:37:13 UTC (rev 672)
@@ -1,28 +0,0 @@
-<%@ taglib uri='struts-bean' prefix='bean' %>
-<%@ taglib uri='struts-logic' prefix='logic' %>
-<%@ taglib uri='struts-html' prefix='html' %>
-<%@ taglib uri='struts-genurl' prefix='genurl' %>
-
-<%@ include file="header.jsp" %>
-
-<%
-try {
-%>
-
-<page>upload</page>
-
-<uploadform>
- <genurl:form action="upload">
- <filename>
- </filename>
- </genurl:form>
-</uploadform>
-
-<%
-} catch (Throwable t) {
- t.printStackTrace();
-}
-%>
-
-<%@ include file="footer.jsp" %>
-
More information about the Bedework-commit
mailing list