Author: andyhot
Date: Wed Nov 15 11:13:35 2006
New Revision: 475366
URL: http://svn.apache.org/viewvc?view=rev&rev=475366
Log:
Interface and implementations for factories of FormSupport instances
Added:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactory.java
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactoryImpl.java
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/wml/GoFormSupportFactory.java
Added:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactory.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactory.java?view=auto&rev=475366
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactory.java
(added)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactory.java
Wed Nov 15 11:13:35 2006
@@ -0,0 +1,36 @@
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.form;
+
+import org.apache.tapestry.IForm;
+import org.apache.tapestry.IMarkupWriter;
+import org.apache.tapestry.IRequestCycle;
+
+/**
+ * Interface for factories that can generate [EMAIL PROTECTED] FormSupport}
+ * objects.
+ *
+ * @since 4.1.1
+ */
+public interface FormSupportFactory
+{
+
+ /**
+ * Invoked every time an [EMAIL PROTECTED] IForm} is rendering in order to
obtain a
+ * [EMAIL PROTECTED] FormSupport} instance to support and manage the
process.
+ * <p/>
+ */
+ FormSupport createFormSupport(IMarkupWriter writer, IRequestCycle cycle,
IForm form);
+}
Added:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactoryImpl.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactoryImpl.java?view=auto&rev=475366
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactoryImpl.java
(added)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/FormSupportFactoryImpl.java
Wed Nov 15 11:13:35 2006
@@ -0,0 +1,33 @@
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.form;
+
+import org.apache.tapestry.IForm;
+import org.apache.tapestry.IMarkupWriter;
+import org.apache.tapestry.IRequestCycle;
+
+/**
+ * The standard implementation of [EMAIL PROTECTED] FormSupportFactory}. It
generates
+ * [EMAIL PROTECTED] FormSupportImpl} instances.
+ *
+ * @since 4.1.1
+ */
+public class FormSupportFactoryImpl implements FormSupportFactory
+{
+ public FormSupport createFormSupport(IMarkupWriter writer, IRequestCycle
cycle, IForm form)
+ {
+ return new FormSupportImpl(writer, cycle, form);
+ }
+}
Added:
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/wml/GoFormSupportFactory.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/wml/GoFormSupportFactory.java?view=auto&rev=475366
==============================================================================
---
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/wml/GoFormSupportFactory.java
(added)
+++
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/wml/GoFormSupportFactory.java
Wed Nov 15 11:13:35 2006
@@ -0,0 +1,35 @@
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.wml;
+
+import org.apache.tapestry.IForm;
+import org.apache.tapestry.IMarkupWriter;
+import org.apache.tapestry.IRequestCycle;
+import org.apache.tapestry.form.FormSupport;
+import org.apache.tapestry.form.FormSupportFactory;
+
+/**
+ * Implementation of [EMAIL PROTECTED] FormSupportFactory} that generates
+ * [EMAIL PROTECTED] GoFormSupportImpl} instances, suitable for WML content.
+ *
+ * @since 4.1.1
+ */
+public class GoFormSupportFactory implements FormSupportFactory
+{
+ public FormSupport createFormSupport(IMarkupWriter writer, IRequestCycle
cycle, IForm form)
+ {
+ return new GoFormSupportImpl(writer, cycle, form);
+ }
+}