You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2003/03/03 17:57:16 UTC
cvs commit: jakarta-tapestry/doc/src/ComponentReference Upload.html
hlship 2003/03/03 08:57:16
Modified: examples/wap build.xml
eclipse Tapestry-Tutorial.launch Tapestry-Mock.launch
Tapestry-Junit.launch
. build.xml .classpath
framework/src/net/sf/tapestry
BaseComponentTemplateLoader.java
TapestryStrings.properties
AbstractMarkupWriter.java IForm.java
examples/Tutorial2 build.xml
examples/Tutorial build.xml
framework/src/net/sf/tapestry/form Upload.java Form.java
web new.html
examples/Tutorial/context/WEB-INF/workbench Upload.page
framework/src/net/sf/tapestry/record
DefaultValuePersister.java IValuePersister.java
doc/src/DevelopersGuide jars.xml
framework/src/net/sf/tapestry/valid ValidField.java
framework/src/net/sf/tapestry/engine RequestCycle.java
AbstractEngine.java
examples/DevelopmentEnvironment build.xml
junit/src/net/sf/tapestry/junit/mock
TestPersistentProperties.xml TestListEdit.xml
framework build.xml
junit build.xml
examples/Tutorial/context/workbench Upload.html
doc/src/ComponentReference Upload.html
Removed: junit/context6 Three.html
junit/src/net/sf/tapestry/junit/mock/c6 FakeHandle.java
FakeEJBObject.java Three.java
framework/src/net/sf/tapestry/record EJBCopier.java
EJBWrapper.java EJBWrapperCopier.java
junit/context6/WEB-INF Three.page
lib/ext ejb.jar
Log:
Remove ejb.jar; it is no longer necessary.
Change Form and Upload so that it is no longer necessary to specify an encoding type on the Form.
Revision Changes Path
1.18 +1 -2 jakarta-tapestry/examples/wap/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/examples/wap/build.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- build.xml 24 Jan 2003 00:49:37 -0000 1.17
+++ build.xml 3 Mar 2003 16:57:13 -0000 1.18
@@ -10,7 +10,6 @@
<property name="wap.war" value="wap.war"/>
<path id="project.class.path">
- <pathelement location="${lib.ext.dir}/ejb.jar"/>
<pathelement location="${lib.ext.dir}/javax.servlet.jar"/>
<pathelement location="${lib.ext.dir}/${commons-logging.jar}"/>
<pathelement location="${lib.ext.dir}/${commons-lang.jar}"/>
1.14 +0 -7 jakarta-tapestry/eclipse/Tapestry-Tutorial.launch
Index: Tapestry-Tutorial.launch
===================================================================
RCS file: /home/cvs/jakarta-tapestry/eclipse/Tapestry-Tutorial.launch,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Tapestry-Tutorial.launch 1 Feb 2003 16:48:48 -0000 1.13
+++ Tapestry-Tutorial.launch 3 Mar 2003 16:57:14 -0000 1.14
@@ -8,9 +8,6 @@
sourceAttachmentPath="JRE_SRC" sourceRootPath="JRE_SRCROOT" type="3"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
-<runtimeClasspathEntry path="3" projectName="Scratch" type="1"/>
-"/>
- <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry internalArchive="/jakarta-tapestry/config"
path="3" type="2"/>
"/>
@@ -21,10 +18,6 @@
<runtimeClasspathEntry
internalArchive="/jakarta-tapestry/lib/ext/jakarta-oro-2.0.6.jar"
path="3" type="2"/>
-"/>
- <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
-<runtimeClasspathEntry
- internalArchive="/jakarta-tapestry/lib/ext/ejb.jar" path="3" type="2"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
1.10 +17 -5 jakarta-tapestry/eclipse/Tapestry-Mock.launch
Index: Tapestry-Mock.launch
===================================================================
RCS file: /home/cvs/jakarta-tapestry/eclipse/Tapestry-Mock.launch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Tapestry-Mock.launch 1 Feb 2003 16:48:48 -0000 1.9
+++ Tapestry-Mock.launch 3 Mar 2003 16:57:14 -0000 1.10
@@ -22,10 +22,6 @@
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
- internalArchive="/jakarta-tapestry/lib/ext/ejb.jar" path="3" type="2"/>
-"/>
- <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
-<runtimeClasspathEntry
internalArchive="/jakarta-tapestry/lib/ext/javax.servlet.jar"
path="3" type="2"/>
"/>
@@ -62,6 +58,16 @@
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
+ internalArchive="/jakarta-tapestry/lib/ext/jcommon-0.6.4.jar"
+ path="3" type="2"/>
+"/>
+ <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
+<runtimeClasspathEntry
+ internalArchive="/jakarta-tapestry/lib/ext/jfreechart-0.9.2.jar"
+ path="3" type="2"/>
+"/>
+ <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
+<runtimeClasspathEntry
internalArchive="/jakarta-tapestry/junit/lib/jdom-b8.jar" path="3" type="2"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
@@ -92,10 +98,16 @@
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
- internalArchive="/jakarta-tapestry/lib/ext/log4j-1.2.6.jar" path="3" type="2"/>
+ internalArchive="/jakarta-tapestry/lib/ext/mckoidb-0.94h.jar"
+ path="3" sourceAttachmentPath="C:/Work/mckoi0.94h/src.zip"
+ sourceRootPath="src" type="2"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry containerPath="JYTHON_DIR/jython.jar" path="3" type="3"/>
+"/>
+ <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
+<runtimeClasspathEntry
+ internalArchive="/jakarta-tapestry/lib/ext/log4j-1.2.6.jar" path="3" type="2"/>
"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jakarta-tapestry"/>
1.9 +16 -4 jakarta-tapestry/eclipse/Tapestry-Junit.launch
Index: Tapestry-Junit.launch
===================================================================
RCS file: /home/cvs/jakarta-tapestry/eclipse/Tapestry-Junit.launch,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Tapestry-Junit.launch 1 Feb 2003 16:48:48 -0000 1.8
+++ Tapestry-Junit.launch 3 Mar 2003 16:57:14 -0000 1.9
@@ -22,10 +22,6 @@
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
- internalArchive="/jakarta-tapestry/lib/ext/ejb.jar" path="3" type="2"/>
-"/>
- <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
-<runtimeClasspathEntry
internalArchive="/jakarta-tapestry/lib/ext/javax.servlet.jar"
path="3" type="2"/>
"/>
@@ -62,6 +58,16 @@
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
+ internalArchive="/jakarta-tapestry/lib/ext/jcommon-0.6.4.jar"
+ path="3" type="2"/>
+"/>
+ <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
+<runtimeClasspathEntry
+ internalArchive="/jakarta-tapestry/lib/ext/jfreechart-0.9.2.jar"
+ path="3" type="2"/>
+"/>
+ <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
+<runtimeClasspathEntry
internalArchive="/jakarta-tapestry/junit/lib/jdom-b8.jar" path="3" type="2"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
@@ -89,6 +95,12 @@
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
internalArchive="/jakarta-tapestry/lib/ext/bcel-5.0.jar" path="3" type="2"/>
+"/>
+ <listEntry value="<?xml version="1.0" encoding="UTF-8"?>
+<runtimeClasspathEntry
+ internalArchive="/jakarta-tapestry/lib/ext/mckoidb-0.94h.jar"
+ path="3" sourceAttachmentPath="C:/Work/mckoi0.94h/src.zip"
+ sourceRootPath="src" type="2"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?>
<runtimeClasspathEntry
1.69 +1 -2 jakarta-tapestry/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/build.xml,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- build.xml 7 Feb 2003 04:28:47 -0000 1.68
+++ build.xml 3 Mar 2003 16:57:14 -0000 1.69
@@ -21,7 +21,6 @@
<pathelement location="${lib.ext.dir}/javax.xml.jaxp.jar"/>
<pathelement location="${lib.ext.dir}/org.apache.crimson.jar"/>
<pathelement location="${lib.ext.dir}/${jetty.jar}"/>
- <pathelement location="${lib.ext.dir}/ejb.jar"/>
<pathelement location="${lib.ext.dir}/${jakarta-oro.jar}"/>
<pathelement location="${lib.ext.dir}/${ognl.jar}"/>
<pathelement location="${lib.ext.dir}/${bsf.jar}"/>
1.24 +0 -1 jakarta-tapestry/.classpath
Index: .classpath
===================================================================
RCS file: /home/cvs/jakarta-tapestry/.classpath,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- .classpath 1 Feb 2003 16:48:48 -0000 1.23
+++ .classpath 3 Mar 2003 16:57:14 -0000 1.24
@@ -9,7 +9,6 @@
<classpathentry kind="src" path="examples/VlibBeans/src"/>
<classpathentry kind="src" path="examples/Vlib/src"/>
<classpathentry kind="lib" path="lib/ext/jakarta-oro-2.0.6.jar"/>
- <classpathentry kind="lib" path="lib/ext/ejb.jar"/>
<classpathentry kind="lib" path="lib/ext/javax.servlet.jar"/>
<classpathentry kind="lib" path="lib/ext/javax.xml.jaxp.jar"/>
<classpathentry kind="lib" path="lib/ext/junit.jar"/>
1.4 +46 -18 jakarta-tapestry/framework/src/net/sf/tapestry/BaseComponentTemplateLoader.java
Index: BaseComponentTemplateLoader.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/BaseComponentTemplateLoader.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BaseComponentTemplateLoader.java 25 Feb 2003 22:53:31 -0000 1.3
+++ BaseComponentTemplateLoader.java 3 Mar 2003 16:57:14 -0000 1.4
@@ -112,6 +112,7 @@
private static class LocalizedStringRender implements IRender
{
private IComponent _component;
+ private IComponentStrings _strings;
private String _key;
private Map _attributes;
private boolean _raw;
@@ -145,7 +146,10 @@
}
}
- String value = _component.getStrings().getString(_key);
+ if (_strings == null)
+ _strings = _component.getStrings();
+
+ String value = _strings.getString(_key);
if (_raw)
writer.printRaw(value);
@@ -171,9 +175,11 @@
}
public BaseComponentTemplateLoader(
- IRequestCycle requestCycle,
- IPageLoader pageLoader,
- BaseComponent loadComponent, ComponentTemplate template, IPageSource pageSource)
+ IRequestCycle requestCycle,
+ IPageLoader pageLoader,
+ BaseComponent loadComponent,
+ ComponentTemplate template,
+ IPageSource pageSource)
{
_requestCycle = requestCycle;
_pageLoader = pageLoader;
@@ -223,7 +229,9 @@
// of date, too.
if (_stackx != 0)
- throw new PageLoaderException(Tapestry.getString("BaseComponent.unbalance-open-tags"), _loadComponent);
+ throw new PageLoaderException(
+ Tapestry.getString("BaseComponent.unbalance-open-tags"),
+ _loadComponent);
checkAllComponentsReferenced();
}
@@ -257,17 +265,20 @@
String id = token.getId();
IComponent component = null;
String componentType = token.getComponentType();
-
+
if (componentType == null)
component = getEmbeddedComponent(id);
else
- component = createImplicitComponent(id, componentType);
+ component = createImplicitComponent(id, componentType);
// Make sure the template contains each component only once.
if (_seenIds.contains(id))
throw new PageLoaderException(
- Tapestry.getString("BaseComponent.multiple-component-references", _loadComponent.getExtendedId(), id),
+ Tapestry.getString(
+ "BaseComponent.multiple-component-references",
+ _loadComponent.getExtendedId(),
+ id),
_loadComponent);
_seenIds.add(id);
@@ -294,9 +305,13 @@
}
private IComponent createImplicitComponent(String id, String componentType)
- throws PageLoaderException
+ throws PageLoaderException
{
- return _pageLoader.createImplicitComponent(_requestCycle, _loadComponent, id, componentType);
+ return _pageLoader.createImplicitComponent(
+ _requestCycle,
+ _loadComponent,
+ id,
+ componentType);
}
private IComponent getEmbeddedComponent(String id) throws PageLoaderException
@@ -304,12 +319,15 @@
try
{
return _loadComponent.getComponent(id);
-
+
}
catch (NoSuchComponentException ex)
{
throw new PageLoaderException(
- Tapestry.getString("BaseComponent.undefined-embedded-component", _loadComponent.getExtendedId(), id),
+ Tapestry.getString(
+ "BaseComponent.undefined-embedded-component",
+ _loadComponent.getExtendedId(),
+ id),
_loadComponent,
ex);
}
@@ -321,7 +339,9 @@
// the template parser does a great job.
if (_stackx <= 0)
- throw new PageLoaderException(Tapestry.getString("BaseComponent.unbalanced-close-tags"), _loadComponent);
+ throw new PageLoaderException(
+ Tapestry.getString("BaseComponent.unbalanced-close-tags"),
+ _loadComponent);
// Null and forget the top element on the stack.
@@ -349,7 +369,8 @@
*
**/
- private void addExpressionBindings(IComponent component, Map expressionsMap) throws PageLoaderException
+ private void addExpressionBindings(IComponent component, Map expressionsMap)
+ throws PageLoaderException
{
if (Tapestry.isEmpty(expressionsMap))
return;
@@ -408,7 +429,11 @@
String expression = (String) e.getValue();
- IBinding binding = new ExpressionBinding(_pageSource.getResourceResolver(), _loadComponent, expression);
+ IBinding binding =
+ new ExpressionBinding(
+ _pageSource.getResourceResolver(),
+ _loadComponent,
+ expression);
component.setBinding(name, binding);
}
@@ -495,9 +520,12 @@
int count = ids.size();
String key =
- (count == 1) ? "BaseComponent.missing-component-spec-single" : "BaseComponent.missing-component-spec-multi";
+ (count == 1)
+ ? "BaseComponent.missing-component-spec-single"
+ : "BaseComponent.missing-component-spec-multi";
- StringBuffer buffer = new StringBuffer(Tapestry.getString(key, _loadComponent.getExtendedId()));
+ StringBuffer buffer =
+ new StringBuffer(Tapestry.getString(key, _loadComponent.getExtendedId()));
Iterator i = ids.iterator();
int j = 1;
1.45 +2 -1 jakarta-tapestry/framework/src/net/sf/tapestry/TapestryStrings.properties
Index: TapestryStrings.properties
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/TapestryStrings.properties,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- TapestryStrings.properties 25 Feb 2003 22:53:32 -0000 1.44
+++ TapestryStrings.properties 3 Mar 2003 16:57:14 -0000 1.45
@@ -196,6 +196,7 @@
Form.too-many-ids=Rewind of form {0} expected only {1} form elements, but an additional id was requested by component {2}.
Form.too-few-ids=Rewind of form {0} expected {1} more form elements, starting with id ''{2}''.
Form.id-mismatch=Rewind of form {0} expected allocated id #{1} to be ''{2}'', but was ''{3}'' (requested by component {4}).
+Form.encoding-type-contention=Components within Form {0} have requested conflicting encoding types ''{1}'' and ''{2}''.
ListEdit.unable-to-convert-value=Unable to convert {0} to an external string in ListEdit component.
ListEdit.unable-to-convert-string=Unable to convert {0} back into an object in ListEdit component.
1.6 +15 -4 jakarta-tapestry/framework/src/net/sf/tapestry/AbstractMarkupWriter.java
Index: AbstractMarkupWriter.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/AbstractMarkupWriter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractMarkupWriter.java 13 Jan 2003 03:33:08 -0000 1.5
+++ AbstractMarkupWriter.java 3 Mar 2003 16:57:14 -0000 1.6
@@ -54,8 +54,11 @@
*/
package net.sf.tapestry;
+import java.io.BufferedWriter;
import java.io.OutputStream;
+import java.io.OutputStreamWriter;
import java.io.PrintWriter;
+import java.io.Writer;
import java.util.Stack;
/**
@@ -179,11 +182,18 @@
*
**/
- protected AbstractMarkupWriter(boolean safe[], String[] entities, String contentType, OutputStream stream)
+ protected AbstractMarkupWriter(
+ boolean safe[],
+ String[] entities,
+ String contentType,
+ OutputStream stream)
{
this(safe, entities, contentType);
- _writer = new PrintWriter(stream);
+ OutputStreamWriter owriter = new OutputStreamWriter(stream);
+ Writer bwriter = new BufferedWriter(owriter);
+
+ _writer = new PrintWriter(bwriter);
}
/**
@@ -352,7 +362,8 @@
private void checkTagOpen()
{
if (!_openTag)
- throw new IllegalStateException(Tapestry.getString("AbstractMarkupWriter.tag-not-open"));
+ throw new IllegalStateException(
+ Tapestry.getString("AbstractMarkupWriter.tag-not-open"));
}
/**
1.7 +15 -1 jakarta-tapestry/framework/src/net/sf/tapestry/IForm.java
Index: IForm.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/IForm.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- IForm.java 17 Jan 2003 17:40:17 -0000 1.6
+++ IForm.java 3 Mar 2003 16:57:14 -0000 1.7
@@ -162,4 +162,18 @@
**/
public IValidationDelegate getDelegate() throws RequestCycleException;
+
+ /**
+ * May be invoked by a component to force the encoding type of the
+ * form to a particular value.
+ *
+ * @see net.sf.tapestry.form.Upload
+ * @throws RequestCycleException if the current encoding type is not null
+ * and doesn't match the suggested encoding type
+ * @since 2.4
+ *
+ **/
+
+ public void setEncodingType(String encodingType)
+ throws RequestCycleException;
}
1.8 +0 -1 jakarta-tapestry/examples/Tutorial2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/examples/Tutorial2/build.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- build.xml 23 Jan 2003 21:26:27 -0000 1.7
+++ build.xml 3 Mar 2003 16:57:14 -0000 1.8
@@ -30,7 +30,6 @@
<pathelement location="${lib.ext.dir}/javax.xml.jaxp.jar"/>
<pathelement location="${lib.ext.dir}/org.apache.crimson.jar"/>
<pathelement location="${lib.ext.dir}/${jetty.jar}"/>
- <pathelement location="${lib.ext.dir}/ejb.jar"/>
<pathelement location="${lib.ext.dir}/${jakarta-oro.jar}"/>
<pathelement location="${lib.ext.dir}/${ognl.jar}"/>
<pathelement location="${lib.ext.dir}/${bsf.jar}"/>
1.28 +1 -2 jakarta-tapestry/examples/Tutorial/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/examples/Tutorial/build.xml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- build.xml 24 Jan 2003 00:49:31 -0000 1.27
+++ build.xml 3 Mar 2003 16:57:14 -0000 1.28
@@ -8,7 +8,6 @@
<property file="${root.dir}/config/common.properties"/>
<path id="project.class.path">
- <pathelement location="${lib.ext.dir}/ejb.jar"/>
<pathelement location="${lib.ext.dir}/javax.servlet.jar"/>
<pathelement location="${lib.ext.dir}/${commons-logging.jar}"/>
<pathelement location="${lib.ext.dir}/${commons-lang.jar}"/>
1.13 +6 -1 jakarta-tapestry/framework/src/net/sf/tapestry/form/Upload.java
Index: Upload.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/form/Upload.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Upload.java 19 Feb 2003 23:22:11 -0000 1.12
+++ Upload.java 3 Mar 2003 16:57:14 -0000 1.13
@@ -96,6 +96,11 @@
return;
}
+ // Force the form to use the correct encoding type for
+ // file uploads.
+
+ form.setEncodingType("multipart/form-data");
+
writer.beginEmpty("input");
writer.attribute("type", "file");
writer.attribute("name", _name);
1.28 +76 -43 jakarta-tapestry/framework/src/net/sf/tapestry/form/Form.java
Index: Form.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/form/Form.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- Form.java 19 Feb 2003 23:22:11 -0000 1.27
+++ Form.java 3 Mar 2003 16:57:14 -0000 1.28
@@ -147,6 +147,8 @@
private IdAllocator _elementIdAllocator = new IdAllocator();
+ private String _encodingType;
+
/**
* Returns the currently active {@link IForm}, or null if no form is
* active. This is a convienience method, the result will be
@@ -197,7 +199,7 @@
public boolean getRequiresSession()
{
- return isStateful();
+ return isStateful();
}
/**
@@ -292,14 +294,39 @@
return _name;
}
- protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
- throws RequestCycleException
+ /** @since 2.4 **/
+
+ protected void prepareForRender(IRequestCycle cycle) throws RequestCycleException
{
+ super.prepareForRender(cycle);
+
if (cycle.getAttribute(ATTRIBUTE_NAME) != null)
throw new RequestCycleException(Tapestry.getString("Form.forms-may-not-nest"), this);
cycle.setAttribute(ATTRIBUTE_NAME, this);
+ }
+ protected void cleanupAfterRender(IRequestCycle cycle)
+ {
+ _rendering = false;
+
+ _allocatedIdIndex = 0;
+ _allocatedIds.clear();
+
+ _events = null;
+
+ _elementIdAllocator.clear();
+
+ cycle.removeAttribute(ATTRIBUTE_NAME);
+
+ _encodingType = null;
+
+ super.cleanupAfterRender(cycle);
+ }
+
+ protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
+ throws RequestCycleException
+ {
String actionId = cycle.getNextActionId();
_name = "Form" + actionId;
@@ -308,17 +335,38 @@
_rewinding = rewound;
+ _allocatedIdIndex = 0;
+
+ _rendering = true;
+
+ if (rewound)
+ {
+ String storedIdList = cycle.getRequestContext().getParameter(_name);
+
+ reconstructAllocatedIds(storedIdList);
+ }
+
ILink link = getLink(cycle, actionId);
+ // When rendering, use a nested writer so that an embedded Upload
+ // component can force the encoding type.
+
+ IMarkupWriter nested = writer.getNestedWriter();
+
+ renderBody(nested, cycle);
+
if (renderForm)
{
- String method = getMethod();
-
+ String method = getMethod();
+
writer.begin("form");
writer.attribute("method", (method == null) ? "post" : method);
writer.attribute("name", _name);
writer.attribute("action", link.getURL(null, false));
+ if (_encodingType != null)
+ writer.attribute("enctype", _encodingType);
+
generateAttributes(writer, cycle);
writer.println();
}
@@ -328,19 +376,6 @@
writeLinkParameters(writer, link, !renderForm);
- _allocatedIdIndex = 0;
-
- _rendering = true;
-
- if (rewound)
- {
- String storedIdList = cycle.getRequestContext().getParameter(_name);
-
- reconstructAllocatedIds(storedIdList);
- }
-
- renderBody(writer, cycle);
-
if (renderForm)
{
// What's this for? It's part of checking for stale links.
@@ -357,6 +392,8 @@
writer.attribute("value", buildAllocatedIdList());
writer.println();
+ nested.close();
+
writer.end("form");
// Write out event handlers collected during the rendering.
@@ -385,7 +422,7 @@
this);
}
- IActionListener listener = getListener();
+ IActionListener listener = getListener();
if (listener != null)
listener.actionTriggered(this, cycle);
@@ -394,8 +431,6 @@
throw new RenderRewoundException(this);
}
-
- cycle.removeAttribute(ATTRIBUTE_NAME);
}
/**
@@ -590,7 +625,6 @@
for (int i = 0; i < count; i++)
{
-
String name = names[i];
// Reserve the name.
@@ -624,22 +658,6 @@
}
}
- protected void cleanupAfterRender(IRequestCycle cycle)
- {
- _rendering = false;
-
- _allocatedIdIndex = 0;
- _allocatedIds.clear();
-
- _events = null;
-
- _elementIdAllocator.clear();
-
- super.cleanupAfterRender(cycle);
- }
-
-
-
/**
* Converts the allocateIds property into a string, a comma-separated list of ids.
* This is included as a hidden field in the form and is used to identify
@@ -693,7 +711,7 @@
public abstract void setDelegate(IValidationDelegate delegate);
public abstract void setDirect(boolean direct);
-
+
public abstract IActionListener getListener();
public abstract String getMethod();
@@ -706,8 +724,8 @@
public boolean isStateful()
{
- IBinding statefulBinding = getStatefulBinding();
-
+ IBinding statefulBinding = getStatefulBinding();
+
if (statefulBinding == null)
return true;
@@ -715,10 +733,25 @@
}
public abstract IBinding getStatefulBinding();
-
+
protected void finishLoad()
{
setDirect(true);
+ }
+
+ public void setEncodingType(String encodingType) throws RequestCycleException
+ {
+ if (_encodingType != null && !_encodingType.equals(encodingType))
+ throw new RequestCycleException(
+ Tapestry.getString(
+ "Form.encoding-type-contention",
+ getExtendedId(),
+ _encodingType,
+ encodingType),
+ this,
+ null);
+
+ _encodingType = encodingType;
}
}
1.129 +11 -1 jakarta-tapestry/web/new.html
Index: new.html
===================================================================
RCS file: /home/cvs/jakarta-tapestry/web/new.html,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- new.html 28 Feb 2003 17:28:35 -0000 1.128
+++ new.html 3 Mar 2003 16:57:15 -0000 1.129
@@ -23,6 +23,16 @@
validators.</li>
<li>Added methods to <a href="doc/api/net/sf/tapestry/valid/IComponentStrings.html">IComponentStrings</a> for formatting localized strings
with arguments.</li>
+<li>Remove ejb.jar and any direct dependencies on javax.ejb classes (application servers are responsible for properly replicating
+EJBObject and EJBHome instances).</li>
+<li>Added a <code>createRequestCycle()</code> method to
+<a href="doc/api/net/sf/tapestry/engine/AbstractEngine.html">AbstractEngine</a>.</li>
+<li>Moved the invocation of the
+<a href="doc/api/net/sf/tapestry/IMonitor.html">IMonitor</a> method <code>serviceEnd()</code>
+to always occur after the invocation of <code>serviceException()</code>.</li>
+<li>The <a href="doc/ComponentReference/Upload.html">Upload</a> component now works with the enclosing Form
+to automatically set the encoding type to <code>multipart/form-data</code>. It is no longer necessary to set
+the <code>enctype</code> attribute of the Form.</li>
</ul>
<h3>Release 2.4-alpha-3</h3>
1.4 +1 -5 jakarta-tapestry/examples/Tutorial/context/WEB-INF/workbench/Upload.page
Index: Upload.page
===================================================================
RCS file: /home/cvs/jakarta-tapestry/examples/Tutorial/context/WEB-INF/workbench/Upload.page,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Upload.page 26 Jan 2003 02:59:16 -0000 1.3
+++ Upload.page 3 Mar 2003 16:57:15 -0000 1.4
@@ -7,10 +7,6 @@
<page-specification class="tutorial.workbench.upload.Upload">
<bean name="delegate" class="tutorial.workbench.WorkbenchValidationDelegate"/>
-
- <component id="inputAscii" type="Checkbox">
- <binding name="selected" expression="showAscii"/>
- </component>
<component id="inputWidth" type="PropertySelection">
<binding name="value" expression="bytesPerLine"/>
1.3 +2 -17 jakarta-tapestry/framework/src/net/sf/tapestry/record/DefaultValuePersister.java
Index: DefaultValuePersister.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/record/DefaultValuePersister.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultValuePersister.java 17 Jan 2003 17:40:21 -0000 1.2
+++ DefaultValuePersister.java 3 Mar 2003 16:57:15 -0000 1.3
@@ -59,9 +59,6 @@
import java.util.List;
import java.util.Map;
-import javax.ejb.EJBObject;
-import javax.ejb.Handle;
-
import net.sf.tapestry.ApplicationRuntimeException;
import net.sf.tapestry.IRequestCycle;
import net.sf.tapestry.Tapestry;
@@ -126,10 +123,6 @@
* An instance of {@link MapCopier} is registered for {@link java.util.Map}.
*
* <p>
- * An instance of {@link EJBCopier} for {@link EJBObject}, and {@link EJBWrapperCopier}
- * for {@link EJBWrapper}.
- *
- * <p>
* An instance of {@link ArrayCopier} for <code>Object[]</code>.
*
* <p>
@@ -141,25 +134,17 @@
{
IValueCopier immutable = new ImmutableValueCopier();
+ registerValueCopier(Object.class, immutable);
registerValueCopier(IImmutable.class, immutable);
registerValueCopier(String.class, immutable);
registerValueCopier(Character.class, immutable);
registerValueCopier(Number.class, immutable);
registerValueCopier(Boolean.class, immutable);
registerValueCopier(Date.class, immutable);
- registerValueCopier(Handle.class, immutable);
registerValueCopier(Enum.class, immutable);
registerValueCopier(List.class, new ListCopier());
registerValueCopier(Map.class, new MapCopier());
-
- // EJBCopier copies an EJBObject as an EJBWrapper
-
- registerValueCopier(EJBObject.class, new EJBCopier());
-
- // EJBWrapperCopier restores an EJBWrapper to an EJBObject
-
- registerValueCopier(EJBWrapper.class, new EJBWrapperCopier());
registerValueCopier(Object[].class, new ArrayCopier());
1.3 +1 -2 jakarta-tapestry/framework/src/net/sf/tapestry/record/IValuePersister.java
Index: IValuePersister.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/record/IValuePersister.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- IValuePersister.java 17 Jan 2003 17:40:21 -0000 1.2
+++ IValuePersister.java 3 Mar 2003 16:57:15 -0000 1.3
@@ -61,7 +61,6 @@
* The values provided to the page recorder are not stored as is; there are several
* conversions that occur:
* <ul>
- * <li>{@link javax.ejb.EJBObject} is wrapped up in a {@link net.sf.tapestry.record.EJBWrapper}
* <li>Non-immutable objects are copied, using a {@link net.sf.tapestry.record.IValueCopier}
* <li>null passes through unchanged
* </ul>
1.7 +1 -14 jakarta-tapestry/doc/src/DevelopersGuide/jars.xml
Index: jars.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/doc/src/DevelopersGuide/jars.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- jars.xml 16 Jan 2003 04:18:43 -0000 1.6
+++ jars.xml 3 Mar 2003 16:57:15 -0000 1.7
@@ -23,19 +23,6 @@
</varlistentry>
<varlistentry>
- <term><filename>ejb.jar</filename></term>
- <listitem>
- <para>
- Contains the EJB 1.1 packages. These classes are needed by Tapestry at runtime
- (Tapestry includes some special handling
- of EJB client stubs recorded by a &PageRecorder;. However, most often, the
- servlet container or application server
- provides these interfaces and classes.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><filename>jakarta-oro-<replaceable>x.x.x</replaceable>.jar</filename></term>
<listitem>
<para>
1.23 +28 -26 jakarta-tapestry/framework/src/net/sf/tapestry/valid/ValidField.java
Index: ValidField.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/valid/ValidField.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ValidField.java 28 Feb 2003 17:28:36 -0000 1.22
+++ ValidField.java 3 Mar 2003 16:57:15 -0000 1.23
@@ -103,7 +103,7 @@
public String getDisplayName()
{
- return getDisplayNameBinding().getString();
+ return getDisplayNameBinding().getString();
}
/**
@@ -135,27 +135,33 @@
delegate.setFormComponent(this);
- if (rendering)
- delegate.writePrefix(writer, cycle, this, validator);
+ try
+ {
+
+ if (rendering)
+ delegate.writePrefix(writer, cycle, this, validator);
- super.renderComponent(writer, cycle);
+ super.renderComponent(writer, cycle);
- if (rendering)
- delegate.writeSuffix(writer, cycle, this, validator);
+ if (rendering)
+ delegate.writeSuffix(writer, cycle, this, validator);
- // If rendering and there's either an error in the field,
- // or the field is required but the value is currently null,
- // then we may have identified the default field (which will
- // automatically receive focus).
-
- if (rendering && delegate.isInError())
- addSelect(cycle);
-
- // That's OK, but an ideal situation would know about non-validating
- // text fields, and also be able to put the cursor in the
- // first field, period (even if there are no required or error fields).
- // Still, this pretty much rocks!
+ // If rendering and there's either an error in the field,
+ // then we may have identified the default field (which will
+ // automatically receive focus).
+ if (rendering && delegate.isInError())
+ addSelect(cycle);
+
+ // That's OK, but an ideal situation would know about non-validating
+ // text fields, and also be able to put the cursor in the
+ // first field, period (even if there are no required or error fields).
+ // Still, this pretty much rocks!
+ }
+ finally
+ {
+ delegate.setFormComponent(null);
+ }
}
/**
@@ -166,8 +172,8 @@
protected void beforeCloseTag(IMarkupWriter writer, IRequestCycle cycle)
throws RequestCycleException
{
- IValidator validator = getValidator();
-
+ IValidator validator = getValidator();
+
validator.renderValidatorContribution(this, writer, cycle);
getForm().getDelegate().writeAttributes(writer, cycle, this, validator);
@@ -233,7 +239,7 @@
Object objectValue = null;
IValidationDelegate delegate = getForm().getDelegate();
- delegate.recordFieldInputValue(value);
+ delegate.recordFieldInputValue(value);
try
{
@@ -246,13 +252,9 @@
}
getValueBinding().setObject(objectValue);
- delegate.reset();
}
public abstract IValidator getValidator();
-
-
-
protected void cleanupAfterRender(IRequestCycle cycle)
{
1.16 +7 -12 jakarta-tapestry/framework/src/net/sf/tapestry/engine/RequestCycle.java
Index: RequestCycle.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/engine/RequestCycle.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- RequestCycle.java 17 Jan 2003 17:40:25 -0000 1.15
+++ RequestCycle.java 3 Mar 2003 16:57:15 -0000 1.16
@@ -139,10 +139,15 @@
*
**/
- public RequestCycle(IEngine engine, RequestContext requestContext, IMonitor monitor)
+ public RequestCycle(
+ IEngine engine,
+ RequestContext requestContext,
+ IEngineService service,
+ IMonitor monitor)
{
_engine = engine;
_requestContext = requestContext;
+ _service = service;
_monitor = monitor;
}
@@ -175,16 +180,6 @@
public IEngineService getService()
{
return _service;
- }
-
- /**
- * @since 1.0.1
- *
- **/
-
- public void setService(IEngineService value)
- {
- _service = value;
}
public String encodeURL(String URL)
1.44 +47 -31 jakarta-tapestry/framework/src/net/sf/tapestry/engine/AbstractEngine.java
Index: AbstractEngine.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/net/sf/tapestry/engine/AbstractEngine.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- AbstractEngine.java 25 Feb 2003 22:53:32 -0000 1.43
+++ AbstractEngine.java 3 Mar 2003 16:57:15 -0000 1.44
@@ -708,10 +708,6 @@
public void renderResponse(IRequestCycle cycle, ResponseOutputStream output)
throws RequestCycleException, ServletException, IOException
{
- IMarkupWriter writer;
- boolean discard = true;
- IPage page;
-
if (LOG.isDebugEnabled())
LOG.debug("Begin render response.");
@@ -731,12 +727,14 @@
// Commit all changes and ignore further changes.
- page = cycle.getPage();
+ IPage page = cycle.getPage();
- writer = page.getResponseWriter(output);
+ IMarkupWriter writer = page.getResponseWriter(output);
output.setContentType(writer.getContentType());
+ boolean discard = true;
+
try
{
cycle.renderPage(writer);
@@ -773,7 +771,6 @@
public void restart(IRequestCycle cycle) throws IOException
{
-
RequestContext context = cycle.getRequestContext();
HttpSession session = context.getSession();
@@ -811,9 +808,9 @@
public boolean service(RequestContext context) throws ServletException, IOException
{
ApplicationServlet servlet = context.getServlet();
- RequestCycle cycle = null;
+ IRequestCycle cycle = null;
ResponseOutputStream output = null;
- IMonitor monitor;
+ IMonitor monitor = null;
if (LOG.isInfoEnabled())
LOG.info("Begin service " + context.getRequestURI());
@@ -836,8 +833,6 @@
monitor = getMonitor(context);
- cycle = new RequestCycle(this, context, monitor);
-
output = new ResponseOutputStream(context.getResponse());
}
catch (Exception ex)
@@ -860,7 +855,7 @@
service = getService(serviceName);
- cycle.setService(service);
+ cycle = createRequestCycle(context, service, monitor);
monitor.serviceBegin(serviceName, context.getRequestURI());
@@ -882,10 +877,6 @@
{
handleStaleSessionException(ex, cycle, output);
}
- finally
- {
- monitor.serviceEnd(service.getName());
- }
}
catch (Exception ex)
{
@@ -908,6 +899,8 @@
}
finally
{
+ monitor.serviceEnd(service.getName());
+
try
{
cycle.cleanup();
@@ -950,6 +943,23 @@
}
/**
+ * Invoked from {@link #service(RequestContext)} to create an instance of
+ * {@link IRequestCycle} for the current request. This implementation creates
+ * an returns an instance of {@link RequestCycle}.
+ *
+ * @since 2.4
+ *
+ **/
+
+ protected IRequestCycle createRequestCycle(
+ RequestContext context,
+ IEngineService service,
+ IMonitor monitor)
+ {
+ return new RequestCycle(this, context, service, monitor);
+ }
+
+ /**
* Invoked by {@link #service(RequestContext)} if a {@link StaleLinkException}
* is thrown by the {@link IEngineService service}. This implementation
* sets the message property of the StaleLink page to the
@@ -1013,8 +1023,8 @@
/**
* Discards all cached pages, component specifications and templates.
- * Subclasses who override this implementation should invoke it as
- * well.
+ * Subclasses who override this method should invoke this implementation
+ * as well.
*
* @since 1.0.1
*
@@ -1060,13 +1070,13 @@
* {@link IEngineService services} to build URLs. It consists
* of two parts: the context path and the servlet path.
*
- * <p>The servlet path is retrieved from {@link HttpServletRequest#getServletPath()}.
+ * <p>The servlet path is retrieved from {@link HttpServletRequest#getServletPath()}.
*
- * <p>The context path is retrieved from {@link HttpServletRequest#getContextPath()}.
+ * <p>The context path is retrieved from {@link HttpServletRequest#getContextPath()}.
*
- * <p>The global object is retrieved from {@link RequestContext#getGlobal()} method.
+ * <p>The global object is retrieved from {@link RequestContext#getGlobal()} method.
*
- * <p>The final path is available via the {@link #getServletPath()} method.
+ * <p>The final path is available via the {@link #getServletPath()} method.
*
* <p>In addition, this method locates and/or creates the:
* <ul>
@@ -1082,7 +1092,8 @@
* </ul>
*
* <p>This order is important, because some of the later shared objects
- * depend on some of the earlier shared objects already been located or created
+ * depend on some of the earlier shared objects already having
+ * been located or created
* (especially {@link #getPool() pool}).
*
* <p>Subclasses should invoke this implementation first, then perform their
@@ -1508,9 +1519,12 @@
/**
* Returns the global object for the application. The global object is created at the start
- * of the request ({@link #setupForRequest(RequestContext)} invokes {@link #createGlobal(RequestContext)} if needed),
- * and is stored into the {@link ServletContext}. All instances of the engine for the application share
- * the global object; however, the global object is explicitly <em>not</em> replicated to other servers within
+ * of the request ({@link #setupForRequest(RequestContext)} invokes
+ * {@link #createGlobal(RequestContext)} if needed),
+ * and is stored into the {@link ServletContext}. All instances of the engine for
+ * the application share
+ * the global object; however, the global object is explicitly <em>not</em>
+ * replicated to other servers within
* a cluster.
*
* @since 2.3
@@ -1872,7 +1886,7 @@
/**
* Returns false.
*
- * @deprecated With no replacement.
+ * @deprecated With no replacement. To be removed in 2.5.
* @since 2.2
*
**/
@@ -1885,7 +1899,7 @@
/**
* Does nothing.
*
- * @deprecated With no replacement.
+ * @deprecated With no replacement. To be removed in 2.5.
* @since 2.2
*
**/
@@ -1976,8 +1990,10 @@
/**
* Creates the shared Global object. This implementation looks for an configuration
- * property, <code>net.sf.tapestry.global-class</code>, and instantiates that class using a no-arguments
- * constructor. If the property is not defined, a synchronized {@link java.util.HashMap} is created.
+ * property, <code>net.sf.tapestry.global-class</code>, and instantiates that class
+ * using a no-arguments
+ * constructor. If the property is not defined, a synchronized
+ * {@link java.util.HashMap} is created.
*
* @since 2.3
*
1.3 +0 -1 jakarta-tapestry/examples/DevelopmentEnvironment/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/examples/DevelopmentEnvironment/build.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.xml 12 Sep 2002 17:31:11 -0000 1.2
+++ build.xml 3 Mar 2003 16:57:15 -0000 1.3
@@ -29,7 +29,6 @@
<pathelement location="${lib.ext.dir}/javax.xml.jaxp.jar"/>
<pathelement location="${lib.ext.dir}/org.apache.crimson.jar"/>
<pathelement location="${lib.ext.dir}/org.mortbay.jetty.jar"/>
- <pathelement location="${lib.ext.dir}/ejb.jar"/>
<pathelement location="${lib.ext.dir}/${jakarta-oro.jar}"/>
<pathelement location="${lib.ext.dir}/${ognl.jar}"/>
<pathelement location="config"/>
1.4 +1 -114 jakarta-tapestry/junit/src/net/sf/tapestry/junit/mock/TestPersistentProperties.xml
Index: TestPersistentProperties.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/junit/src/net/sf/tapestry/junit/mock/TestPersistentProperties.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestPersistentProperties.xml 24 Jan 2003 00:49:32 -0000 1.3
+++ TestPersistentProperties.xml 3 Mar 2003 16:57:16 -0000 1.4
@@ -197,120 +197,7 @@
Nested Message: Changed
</assert-output>
</request>
-
- <!-- Now on to page Three, where we test EJBs. -->
-
- <request>
- <parameter name="service" value="page"/>
- <parameter name="context" value="Three"/>
-
- <assert-output name="Page Title">
-<![CDATA[
-<title>Peristant EJB Property</title>
-]]>
- </assert-output>
-
- <assert-output name="EJB Initial Value">
-EJB is null
- </assert-output>
-
- <assert-output name="Create link">
-<![CDATA[
-/c6/app?service=direct&context=1/Three/$DirectLink
-]]>
- </assert-output>
-
- </request>
-
- <!-- Trigger the link. -->
-
- <request>
- <parameter name="service" value="direct"/>
- <parameter name="context" value="1/Three/$DirectLink"/>
- <assert-output name="Page Title">
-<![CDATA[
-<title>Peristant EJB Property</title>
-]]>
- </assert-output>
-
-
- <assert-output name="Updated EJB Value">
-EJB is FakeEJBObject[997]
- </assert-output>
-
- <assert name="Stored Value">
- request.session.getAttribute("app/Three/ejb").getClass().getName().equals("net.sf.tapestry.record.EJBWrapper")
- </assert>
-
- </request>
-
- <!-- Now, pretend a failover. -->
-
- <request failover="true">
- <parameter name="service" value="page"/>
- <parameter name="context" value="Three"/>
-
- <assert-output name="Page Title">
-<![CDATA[
-<title>Peristant EJB Property</title>
-]]>
- </assert-output>
-
-
- <assert-output name="Updated EJB Value">
-EJB is FakeEJBObject[997]
- </assert-output>
-
- <assert-output name="Discard URL">
-<![CDATA[
-/c6/app?service=direct&context=1/Three/$DirectLink_0
-]]>
- </assert-output>
-
- </request>
-
- <!-- Trigger the discard link. -->
-
- <request>
- <parameter name="service" value="direct"/>
- <parameter name="context" value="1/Three/$DirectLink_0"/>
-
- <assert-output name="Page Title">
-<![CDATA[
-<title>Peristant EJB Property</title>
-]]>
- </assert-output>
-
- <!-- Doesn't update the current state of the page! -->
-
- <assert-output name="Updated EJB Value">
-EJB is FakeEJBObject[997]
- </assert-output>
-
- <assert name="Attribute missing">
- request.session.getAttribute("app/Three/ejb") == null
- </assert>
-
- </request>
-
- <!-- Check that the value is now gone. -->
-
- <request>
- <parameter name="service" value="page"/>
- <parameter name="context" value="Three"/>
-
- <assert-output name="Page Title">
-<![CDATA[
-<title>Peristant EJB Property</title>
-]]>
- </assert-output>
-
- <assert-output name="EJB Value back to null">
-EJB is null
- </assert-output>
-
- </request>
<!-- Now, test that all sorts of variations on fireObservedChange() work with
different overloaded types. -->
1.3 +3 -3 jakarta-tapestry/junit/src/net/sf/tapestry/junit/mock/TestListEdit.xml
Index: TestListEdit.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/junit/src/net/sf/tapestry/junit/mock/TestListEdit.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestListEdit.xml 19 Feb 2003 23:33:53 -0000 1.2
+++ TestListEdit.xml 3 Mar 2003 16:57:16 -0000 1.3
@@ -24,10 +24,10 @@
<match>name="service" value="direct"</match>
<match>name="context" value="0/ListEdit/form"</match>
<match>name="sp" value="S0"</match>
+ <match>name="Form0" value="e,inputColor,inputColor_0,inputColor_1"</match>
<match>name="e" value="Clothing"</match>
<match>name="e" value="Eye Color"</match>
<match>name="e" value="SFood"</match>
- <match>name="Form0" value="e,inputColor,inputColor_0,inputColor_1"</match>
</assert-output-matches>
@@ -128,10 +128,10 @@
<match>name="service" value="direct"</match>
<match>name="context" value="0/ListEditArray/$ListEditForm.$Form"</match>
<match>name="sp" value="S0"</match>
+ <match>name="Form0" value="e"</match>
<match>name="e" value="SFred"</match>
<match>name="e" value="Dino"</match>
<match>name="e" value="Wilma"</match>
- <match>name="Form0" value="e"</match>
</assert-output-matches>
</request>
1.17 +1 -2 jakarta-tapestry/framework/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/build.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- build.xml 24 Jan 2003 00:49:38 -0000 1.16
+++ build.xml 3 Mar 2003 16:57:16 -0000 1.17
@@ -7,7 +7,6 @@
<property file="${root.dir}/config/common.properties"/>
<path id="project.class.path">
- <pathelement location="${lib.ext.dir}/ejb.jar"/>
<pathelement location="${lib.ext.dir}/javax.servlet.jar"/>
<pathelement location="${lib.ext.dir}/${commons-logging.jar}"/>
<pathelement location="${lib.ext.dir}/${commons-lang.jar}"/>
1.23 +1 -2 jakarta-tapestry/junit/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/junit/build.xml,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- build.xml 19 Feb 2003 23:33:55 -0000 1.22
+++ build.xml 3 Mar 2003 16:57:16 -0000 1.23
@@ -27,7 +27,6 @@
<path id="base.class.path">
<pathelement location="${contrib.jar}"/>
- <pathelement location="${lib.ext.dir}/ejb.jar"/>
<pathelement location="${lib.ext.dir}/javax.servlet.jar"/>
<pathelement location="${lib.ext.dir}/${commons-logging.jar}"/>
<pathelement location="${lib.ext.dir}/${commons-lang.jar}"/>
1.3 +3 -10 jakarta-tapestry/examples/Tutorial/context/workbench/Upload.html
Index: Upload.html
===================================================================
RCS file: /home/cvs/jakarta-tapestry/examples/Tutorial/context/workbench/Upload.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Upload.html 17 Jan 2003 17:45:21 -0000 1.2
+++ Upload.html 3 Mar 2003 16:57:16 -0000 1.3
@@ -5,13 +5,13 @@
<span jwcid="@Border">
<p>The Upload component is used as a form element and allows files to be uploaded to Tapestry. It can
-be freely mixed<a href="#note"><sup>*</sup></a> with other components in a form.
+be freely mixed with other components in a form.
<p>The following form allows you to upload a file and see a hexadecimal dump of it.
<span jwcid="@ShowError" delegate="[[ beans.delegate ]]"/>
-<form jwcid="@Form" listener="[[ listeners.formSubmit ]]" enctype="multipart/form-data">
+<form jwcid="@Form" listener="[[ listeners.formSubmit ]]">
<table class="form">
<tr>
@@ -40,13 +40,6 @@
</table>
</form>
-
-
-<p>
-<a name="note"><sup>*</sup>
-At this time, the developer must manually set the containing form's
-<code>enctype</code> attribute
-to <code>multipart/form-data</code>.
</span>
1.12 +3 -5 jakarta-tapestry/doc/src/ComponentReference/Upload.html
Index: Upload.html
===================================================================
RCS file: /home/cvs/jakarta-tapestry/doc/src/ComponentReference/Upload.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Upload.html 10 Nov 2002 09:29:15 -0000 1.11
+++ Upload.html 3 Mar 2003 16:57:16 -0000 1.12
@@ -53,9 +53,7 @@
<br>
A form element used to handle file uploads. The uploaded file is represented
by an instance of <a href="../api/net/sf/tapestry/IUploadFile.html">IUploadFile</a>.
- <p>
- Note the form's enctype must be set to multipart/form-data, i.e.
- <tt><form enctype="multipart/form-data"><tt>.
+
</td>
</tr>
@@ -149,7 +147,7 @@
</form>
<pre>
-<form jwcid="form" enctype="<b>multipart/form-data</b>">
+<form jwcid="form">
<table bgcolor="#c0c0c0" cellpadding="4">
<tr>
<td colspan="2">File:&nbsp;<input jwcid="<span class="jwcid">fileUpload</span>" type= "file"></input></td>