|
|
hlship 2005/02/03 17:43:11
Modified: contrib/src/java/org/apache/tapestry/contrib/table/components
TableView.jwc
examples/Workbench/src/context/WEB-INF Upload.page
examples/Workbench/src/java/org/apache/tapestry/workbench/upload
Upload.java
framework/src/descriptor/META-INF tapestry.state.xml
contrib/src/java/org/apache/tapestry/contrib/form
FormConditional.jwc
Log:
Fix a few minor errors that have creeped in.
Revision Changes Path
1.8 +1 -1
jakarta-tapestry/contrib/src/java/org/apache/tapestry/contrib/table/components/TableView.jwc
Index: TableView.jwc
===================================================================
RCS file:
/home/cvs/jakarta-tapestry/contrib/src/java/org/apache/tapestry/contrib/table/components/TableView.jwc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TableView.jwc 9 Jan 2005 19:56:33 -0000 1.7
+++ TableView.jwc 4 Feb 2005 01:43:10 -0000 1.8
@@ -116,6 +116,6 @@
<component id="renderBody" type="RenderBody"/>
- <inject name="modelSource"
object="service:tapestry.contrib.TableColumnModelSource"/>
+ <inject property="modelSource"
object="service:tapestry.contrib.TableColumnModelSource"/>
</component-specification>
1.5 +3 -0
jakarta-tapestry/examples/Workbench/src/context/WEB-INF/Upload.page
Index: Upload.page
===================================================================
RCS file:
/home/cvs/jakarta-tapestry/examples/Workbench/src/context/WEB-INF/Upload.page,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Upload.page 6 Jan 2005 02:17:24 -0000 1.4
+++ Upload.page 4 Feb 2005 01:43:10 -0000 1.5
@@ -23,6 +23,9 @@
<bean name="delegate"
class="org.apache.tapestry.workbench.WorkbenchValidationDelegate"/>
+ <property name="showAscii" persist="session"/>
+ <property name="bytesPerLine" persist="session"/>
+
<component id="inputWidth" type="PropertySelection">
<binding name="value" value="ognl:bytesPerLine"/>
<binding name="model" value="ognl:bytesPerLineModel"/>
1.5 +9 -59
jakarta-tapestry/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/Upload.java
Index: Upload.java
===================================================================
RCS file:
/home/cvs/jakarta-tapestry/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/Upload.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Upload.java 6 Jan 2005 02:17:26 -0000 1.4
+++ Upload.java 4 Feb 2005 01:43:10 -0000 1.5
@@ -16,7 +16,6 @@
import org.apache.hivemind.HiveMind;
import org.apache.tapestry.IRequestCycle;
-import org.apache.tapestry.Tapestry;
import org.apache.tapestry.form.IFormComponent;
import org.apache.tapestry.form.IPropertySelectionModel;
import org.apache.tapestry.form.StringPropertySelectionModel;
@@ -31,32 +30,23 @@
* @author Howard Lewis Ship
*/
-public class Upload extends BasePage
+public abstract class Upload extends BasePage
{
- private static final String[] bytesPerLineOptions = new String[]
- { "8", "16", "24", "32", "40", "48" };
-
- private static final String DEFAULT_BPL = "16";
+ public abstract IUploadFile getFile();
- private String bytesPerLine = DEFAULT_BPL;
+ public abstract boolean isShowAscii();
- private boolean showAscii;
+ public abstract String getBytesPerLine();
- private IUploadFile file;
+ private static final String[] bytesPerLineOptions = new String[]
+ { "8", "16", "24", "32", "40", "48" };
private IPropertySelectionModel bplModel;
- public void detach()
- {
- bytesPerLine = DEFAULT_BPL;
- showAscii = false;
- file = null;
-
- super.detach();
- }
-
public void formSubmit(IRequestCycle cycle)
{
+ IUploadFile file = getFile();
+
if (HiveMind.isBlank(file.getFileName()))
{
IValidationDelegate delegate = (IValidationDelegate)
getBeans().getBean("delegate");
@@ -68,31 +58,7 @@
UploadResults results = (UploadResults)
cycle.getPage("UploadResults");
- results.activate(file, showAscii, Integer.parseInt(bytesPerLine),
cycle);
- }
-
- public String getBytesPerLine()
- {
- return bytesPerLine;
- }
-
- public void setBytesPerLine(String bytesPerLine)
- {
- this.bytesPerLine = bytesPerLine;
-
- Tapestry.fireObservedChange(this, "bytesPerLine", bytesPerLine);
- }
-
- public boolean getShowAscii()
- {
- return showAscii;
- }
-
- public void setShowAscii(boolean showAscii)
- {
- this.showAscii = showAscii;
-
- Tapestry.fireObservedChange(this, "showAscii", new
Boolean(showAscii));
+ results.activate(file, isShowAscii(),
Integer.parseInt(getBytesPerLine()), cycle);
}
public IPropertySelectionModel getBytesPerLineModel()
@@ -102,20 +68,4 @@
return bplModel;
}
-
- public IUploadFile getFile()
- {
- return file;
- }
-
- public void setFile(IUploadFile file)
- {
- this.file = file;
- }
-
- public void setMessage(String message)
- {
-
- }
-
}
\ No newline at end of file
1.3 +1 -1
jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.state.xml
Index: tapestry.state.xml
===================================================================
RCS file:
/home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.state.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tapestry.state.xml 29 Jan 2005 16:45:14 -0000 1.2
+++ tapestry.state.xml 4 Feb 2005 01:43:10 -0000 1.3
@@ -170,7 +170,7 @@
<invoke-factory>
<construct
class="org.apache.tapestry.engine.state.SessionScopeManager">
<set-object property="request" value="infrastructure:request"/>
- <set-object property="applicationName"
value="infrastructure:applicationId"/>
+ <set-object property="applicationId"
value="infrastructure:applicationId"/>
</construct>
</invoke-factory>
</service-point>
1.6 +1 -1
jakarta-tapestry/contrib/src/java/org/apache/tapestry/contrib/form/FormConditional.jwc
Index: FormConditional.jwc
===================================================================
RCS file:
/home/cvs/jakarta-tapestry/contrib/src/java/org/apache/tapestry/contrib/form/FormConditional.jwc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FormConditional.jwc 6 Jan 2005 02:17:28 -0000 1.5
+++ FormConditional.jwc 4 Feb 2005 01:43:11 -0000 1.6
@@ -48,6 +48,6 @@
<reserved-parameter name="invert"/>
- <inject name="dataSqueezer" object="service:tapestry.data.DataSqueezer"/>
+ <inject property="dataSqueezer"
object="service:tapestry.data.DataSqueezer"/>
</component-specification>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: tapestry-dev-help@xxxxxxxxxxxxxxxxxx
|
|