You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/06/11 02:32:27 UTC
svn commit: r953515 - in /tapestry/tapestry5/trunk/tapestry-core/src:
main/java/org/apache/tapestry5/corelib/components/
main/java/org/apache/tapestry5/internal/services/
main/java/org/apache/tapestry5/services/
main/resources/org/apache/tapestry5/ tes...
Author: hlship
Date: Fri Jun 11 00:32:26 2010
New Revision: 953515
URL: http://svn.apache.org/viewvc?rev=953515&view=rev
Log:
TAP5-971: FormFragment component should include a parameter to control whether non-visible content is included in the form submission
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/FormFragment.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClientBehaviorSupportImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ClientBehaviorSupport.java
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentDemo.tml
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentOutput.tml
tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/SubscribeData.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/FormFragment.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/FormFragment.java?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/FormFragment.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/FormFragment.java Fri Jun 11 00:32:26 2010
@@ -48,7 +48,8 @@ import org.slf4j.Logger;
* The client-side element will now listen to two new event defined by client-side constants:
* <dl>
* <dt>Tapestry.CHANGE_VISIBILITY_EVENT</dt>
- * <dd>Change the visiblity as per the event memo's visibility property. When the visiblity changes, the correct animation is executed.</dd>
+ * <dd>Change the visiblity as per the event memo's visibility property. When the visiblity changes, the correct
+ * animation is executed.</dd>
* <dt>Tapestry.HIDE_AND_REMOVE_EVENT</dt>
* <dd>Hides the element, then removes it from the DOM entirely.
* </dl>
@@ -67,6 +68,16 @@ public class FormFragment implements Cli
private boolean visible;
/**
+ * If true, then the fragment submits the values from fields it contains <em>even if</em> the fragment is not
+ * visible.
+ * The default is to omit values from fields when the enclosing fragment is non visible.
+ *
+ * @since 5.2.0
+ */
+ @Parameter
+ private boolean alwaysSubmit;
+
+ /**
* Name of a function on the client-side Tapestry.ElementEffect object that is invoked to make the fragment visible.
* If not specified, then the default "slidedown" function is used.
*/
@@ -145,7 +156,7 @@ public class FormFragment implements Cli
if (!visible)
element.addClassName(CSSClassConstants.INVISIBLE);
- clientBehaviorSupport.addFormFragment(clientId, show, hide);
+ clientBehaviorSupport.addFormFragment(clientId, alwaysSubmit, show, hide);
componentActions = new ComponentActionSink(logger, clientDataEncoder);
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClientBehaviorSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClientBehaviorSupportImpl.java?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClientBehaviorSupportImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ClientBehaviorSupportImpl.java Fri Jun 11 00:32:26 2010
@@ -70,13 +70,24 @@ public class ClientBehaviorSupportImpl i
javascriptSupport.addInitializerCall("linkZone", spec);
}
+ /**
+ * @deprecated Use {@link #addFormFragment(String,boolean,String,String)} instead
+ */
public void addFormFragment(String clientId, String showFunctionName, String hideFunctionName)
{
+ addFormFragment(clientId, false, showFunctionName, hideFunctionName);
+ }
+
+ public void addFormFragment(String clientId, boolean alwaysSubmit, String showFunctionName, String hideFunctionName)
+ {
JSONObject spec = new JSONObject("element", clientId);
addFunction(spec, "show", showFunctionName);
addFunction(spec, "hide", hideFunctionName);
+ if (alwaysSubmit)
+ spec.put("alwaysSubmit", true);
+
javascriptSupport.addInitializerCall("formFragment", spec);
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ClientBehaviorSupport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ClientBehaviorSupport.java?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ClientBehaviorSupport.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ClientBehaviorSupport.java Fri Jun 11 00:32:26 2010
@@ -1,10 +1,10 @@
-// Copyright 2007, 2008, 2009 The Apache Software Foundation
+// Copyright 2007, 2008, 2009, 2010 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
+// 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,
@@ -19,65 +19,97 @@ import org.apache.tapestry5.Link;
import org.apache.tapestry5.corelib.data.InsertPosition;
/**
- * Collects details about zone usage for efficient initialization of the client side objects. This has grown to include
+ * Collects details about zone usage for efficient initialization of the client side objects. This has grown to include
* the client-side behavior associated with {@link org.apache.tapestry5.corelib.components.FormFragment}s.
- *
+ *
* @see org.apache.tapestry5.corelib.components.Zone
*/
public interface ClientBehaviorSupport
{
/**
- * Adds a new client-side Tapestry.Zone object. Zones are linked to a an element (typically, a <div>). A Zone
+ * Adds a new client-side Tapestry.Zone object. Zones are linked to a an element (typically, a <div>). A Zone
* may have handlers used to initially show it, or to highlight it when its content changes. Such handlers are
* referenced by name, as functions of the Tapestry.ElementEffect object.
- *
- * @param clientId client-side id of the element that will be updated by the zone
- * @param showFunctionName name of the function used to initially show the zone (if not visible), or null for
- * default
- * @param updateFunctionName name of function used to highlight the function after an update, or null for default
+ *
+ * @param clientId
+ * client-side id of the element that will be updated by the zone
+ * @param showFunctionName
+ * name of the function used to initially show the zone (if not visible), or null for
+ * default
+ * @param updateFunctionName
+ * name of function used to highlight the function after an update, or null for default
*/
void addZone(String clientId, String showFunctionName, String updateFunctionName);
/**
* Sets the client-side onclick handler for an <a> element to perform an Ajax update of a zone.
- *
- * @param linkId id of the link to Ajax enable
- * @param elementId id of an element that has been previously registered as a Zone
+ *
+ * @param linkId
+ * id of the link to Ajax enable
+ * @param elementId
+ * id of an element that has been previously registered as a Zone
* @param eventLink
*/
void linkZone(String linkId, String elementId, Link eventLink);
/**
- * Adds a new client-side Tapestry.FormFragment object. FormFragment's are used to make parts of a client-side form
+ * Adds a new client-side Tapestry.FormFragment object. FormFragment's are used to make parts of a client-side form
* visible or invisible, which involves interactions with both the server-side and client-side validation.
- *
- * @param clientId client-side id of the element that will be made visible or invisible
- * @param showFunctionName name of function (of the Tapestry.ElementEffect object) used to make the SubForm visible,
- * or null for the default
- * @param hideFunctionName name of the function used to make the SubForm invisible, or null for the default
+ *
+ * @param clientId
+ * client-side id of the element that will be made visible or invisible
+ * @param showFunctionName
+ * name of function (of the Tapestry.ElementEffect object) used to make the SubForm visible,
+ * or null for the default
+ * @param hideFunctionName
+ * name of the function used to make the SubForm invisible, or null for the default
+ * @deprecated Use {@link #addFormFragment(String,boolean,String,String)} instead
*/
void addFormFragment(String clientId, String showFunctionName, String hideFunctionName);
/**
- * Adds a new client-side Tapestry.FormInjector object. FormInjectors are used to extend an existing Form with new
+ * Adds a new client-side Tapestry.FormFragment object. FormFragment's are used to make parts of a client-side form
+ * visible or invisible, which involves interactions with both the server-side and client-side validation.
+ *
+ * @param clientId
+ * client-side id of the element that will be made visible or invisible
+ * @param alwaysSubmit
+ * if true, the fragment ignores client-side visiblility and always submits its values
+ * @param showFunctionName
+ * name of function (of the Tapestry.ElementEffect object) used to make the SubForm visible,
+ * or null for the default
+ * @param hideFunctionName
+ * name of the function used to make the SubForm invisible, or null for the default
+ */
+ void addFormFragment(String clientId, boolean alwaysSubmit, String showFunctionName, String hideFunctionName);
+
+ /**
+ * Adds a new client-side Tapestry.FormInjector object. FormInjectors are used to extend an existing Form with new
* content.
- *
- * @param clientId client-side id of the element that identifiess where the new content will be placed
- * @param link action request link used to trigger the server-side object, to render the new content
- * @param insertPosition where the new content should go (above or below the element)
- * @param showFunctionName name of function (of the Tapestry.ElementEffect object) used to make the new element
- * visible, or null for the default
+ *
+ * @param clientId
+ * client-side id of the element that identifiess where the new content will be placed
+ * @param link
+ * action request link used to trigger the server-side object, to render the new content
+ * @param insertPosition
+ * where the new content should go (above or below the element)
+ * @param showFunctionName
+ * name of function (of the Tapestry.ElementEffect object) used to make the new element
+ * visible, or null for the default
*/
void addFormInjector(String clientId, Link link, InsertPosition insertPosition, String showFunctionName);
/**
* Collects field validation information.
- *
- * @param field for which validation is being generated
- * @param validationName name of validation method (see Tapestry.Validation in tapestry.js)
- * @param message the error message to display if the field is invalid
- * @param constraint additional constraint value, or null for validations that don't require a constraint
+ *
+ * @param field
+ * for which validation is being generated
+ * @param validationName
+ * name of validation method (see Tapestry.Validation in tapestry.js)
+ * @param message
+ * the error message to display if the field is invalid
+ * @param constraint
+ * additional constraint value, or null for validations that don't require a constraint
*/
void addValidation(Field field, String validationName, String message, Object constraint);
}
-
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js Fri Jun 11 00:32:26 2010
@@ -1137,15 +1137,17 @@ Tapestry.Initializer = {
};
});
- form.observe(Tapestry.FORM_PREPARE_FOR_SUBMIT_EVENT, function() {
+ if (!spec.alwaysSubmit) {
+ form.observe(Tapestry.FORM_PREPARE_FOR_SUBMIT_EVENT, function() {
- /*
- * On a submission, if the fragment is not visible, then disabled
- * its form submission data, so that no processing or validation
- * occurs on the server.
- */
- hidden.disabled = !element.isDeepVisible();
- });
+ /*
+ * On a submission, if the fragment is not visible, then disabled
+ * its form submission data, so that no processing or validation
+ * occurs on the server.
+ */
+ hidden.disabled = !element.isDeepVisible();
+ });
+ }
},
formInjector : function(spec) {
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentDemo.tml?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentDemo.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentDemo.tml Fri Jun 11 00:32:26 2010
@@ -1,57 +1,70 @@
-<html t:type="Border"
- xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
- <h1>Form Fragment Demo</h1>
+<html t:type="Border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+ <h1>Form Fragment Demo</h1>
- <form t:id="form">
+ <form t:id="form">
- <t:errors/>
+ <t:errors/>
- <div class="t-beaneditor">
+ <div class="t-beaneditor">
- <div class="t-beaneditor-row">
- <t:label for="name"/>
- <t:textfield t:id="name" value="subscribe.name"/>
- </div>
+ <div class="t-beaneditor-row">
+ <t:label for="name"/>
+ <t:textfield t:id="name" value="subscribe.name"/>
+ </div>
- <t:checkbox t:id="subscribeToEmail" t:mixins="triggerfragment" fragment="showEmail"/>
- <t:label for="subscribeToEmail">Subscribe to Email?</t:label>
+ <t:checkbox t:id="subscribeToEmail" t:mixins="triggerfragment" fragment="showEmail"/>
+ <t:label for="subscribeToEmail">Subscribe to Email?</t:label>
- <t:formfragment t:id="showEmail" visible="subscribeToEmail" hide="fade">
- <div class="t-beaneditor-row">
- <t:label for="email"/>
- <t:textfield t:id="email" value="subscribe.email"/>
- </div>
- </t:formfragment>
+ <t:formfragment t:id="showEmail" visible="subscribeToEmail" hide="fade">
+ <div class="t-beaneditor-row">
+ <t:label for="email"/>
+ <t:textfield t:id="email" value="subscribe.email"/>
+ </div>
+ </t:formfragment>
+ <br/>
- <br/>
+ <t:radiogroup value="codeVisible">
+ <t:radio t:id="on" label="On" value="true"/>
+ <t:label for="on"/>
+ <t:radio t:id="off" label="Off" t:mixins="triggerfragment" fragment="codeFragment"
+ invert="true" value="false"/>
+ <t:label for="off"/>
+ </t:radiogroup>
+
+
+ <t:formfragment t:id="codeFragment" visible="codeVisible">
+ <div class="t-beaneditor-row">
+ <t:label for="code"/>
+ <t:textfield t:id="code" value="subscribe.code"/>
+ </div>
+ </t:formfragment>
- <t:radiogroup value="codeVisible">
- <t:radio t:id="on" label="On" value="true"/>
- <t:label for="on"/>
- <t:radio t:id="off" label="Off" t:mixins="triggerfragment" fragment="codeFragment" invert="true" value="false"/>
- <t:label for="off"/>
- </t:radiogroup>
+ <br/>
- <t:formfragment t:id="codeFragment" visible="codeVisible">
- <div class="t-beaneditor-row">
- <t:label for="code"/>
- <t:textfield t:id="code" value="subscribe.code"/>
- </div>
- </t:formfragment>
+ <t:checkbox t:id="subVisible" t:mixins="triggerfragment" fragment="editSub"/>
+ <t:label for="subVisible">
+ Edit Sub? (whatever that is)</t:label>
+ <t:formfragment t:id="editSub" visible="subVisible" alwayssubmit="true" hide="fade">
+ <div class="t-beaneditor-row">
+ <t:label for="sub"/>
+ <t:textfield t:id="sub" value="subscribe.sub"/>
+ </div>
+ </t:formfragment>
- <div class="t-beaneditor-row">
- <input type="submit" value="Subscribe"/>
- </div>
- </div>
+ <div class="t-beaneditor-row">
+ <input type="submit" value="Subscribe"/>
+ </div>
+
+ </div>
- <p>
- <t:actionlink t:id="clear">Clear</t:actionlink>
- </p>
+ <p>
+ <t:actionlink t:id="clear">Clear</t:actionlink>
+ </p>
- </form>
+ </form>
</html>
\ No newline at end of file
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentOutput.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentOutput.tml?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentOutput.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/FormFragmentOutput.tml Fri Jun 11 00:32:26 2010
@@ -10,6 +10,8 @@
<dd id="email">${subscribe.email}</dd>
<dt>Code</dt>
<dd id="code">${subscribe.code}</dd>
+ <dt>Sub</dt>
+ <dd id="sub">${subscribe.sub}</dd>
</dl>
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml Fri Jun 11 00:32:26 2010
@@ -11,8 +11,7 @@
<class name="org.apache.tapestry5.test.SeleniumLauncher"/>
<!-- Modify classes below as needed. -->
- <class name="org.apache.tapestry5.integration.app1.CoreBehaviorsTests"/>
- <class name="org.apache.tapestry5.integration.app1.ZoneTests"/>
+ <class name="org.apache.tapestry5.integration.app1.AjaxTests"/>
</classes>
</test>
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java Fri Jun 11 00:32:26 2010
@@ -1,4 +1,4 @@
-// Copyright 2009 The Apache Software Foundation
+// Copyright 2009, 2010 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.
@@ -38,6 +38,9 @@ public class AjaxTests extends TapestryC
type("name", "Fred");
+ // Put a value into the sub field, then hide it ...
+ type("sub", "subvalue");
+
// Really, you can't type in the field because it is not visible, but
// this checks that invisible fields are not processed.
type("email", "this field is ignored");
@@ -53,6 +56,8 @@ public class AjaxTests extends TapestryC
click("subscribeToEmail");
click("on");
+ type("sub", "subvalue");
+
waitForCondition("selenium.browserbot.getCurrentWindow().$('code').isDeepVisible() == true", PAGE_LOAD_TIMEOUT);
type("name", "Barney");
@@ -61,6 +66,8 @@ public class AjaxTests extends TapestryC
click("off");
+ click("subVisible");
+
waitForCondition("selenium.browserbot.getCurrentWindow().$('code').isDeepVisible() == false", PAGE_LOAD_TIMEOUT);
clickAndWait(SUBMIT);
@@ -68,6 +75,9 @@ public class AjaxTests extends TapestryC
assertText("name", "Barney");
assertText("email", "rubble@bedrock.gov");
assertText("code", "");
+
+ // .. but it still gets submitted, thanks to alwyassubmit=true
+ assertText("sub", "subvalue");
}
@Test
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/SubscribeData.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/SubscribeData.java?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/SubscribeData.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/SubscribeData.java Fri Jun 11 00:32:26 2010
@@ -4,7 +4,7 @@
// 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
+// 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,
@@ -18,9 +18,10 @@ import org.apache.tapestry5.beaneditor.V
public class SubscribeData
{
- private String name, email, code;
-
+ // Only really required if visible!
@Validate("required")
+ private String name, email, code, sub;
+
public String getName()
{
return name;
@@ -31,8 +32,6 @@ public class SubscribeData
this.name = name;
}
- // Only really required if visible!
- @Validate("required")
public String getEmail()
{
return email;
@@ -43,7 +42,6 @@ public class SubscribeData
this.email = email;
}
- @Validate("required")
public String getCode()
{
return code;
@@ -53,4 +51,16 @@ public class SubscribeData
{
this.code = code;
}
+
+ public String getSub()
+ {
+ return sub;
+ }
+
+ public void setSub(String sub)
+ {
+ this.sub = sub;
+ }
+
+
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java?rev=953515&r1=953514&r2=953515&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentDemo.java Fri Jun 11 00:32:26 2010
@@ -1,10 +1,10 @@
-// Copyright 2008 The Apache Software Foundation
+// Copyright 2008, 2010 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
+// 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,
@@ -26,12 +26,10 @@ public class FormFragmentDemo
private SubscribeData subscribe;
@Property
- private boolean subscribeToEmail;
+ private boolean subscribeToEmail, codeVisible, subVisible = true;
- @Property
- private boolean codeVisible;
-
- @Component(parameters = {"clientValidation=false"})
+ @Component(parameters =
+ { "clientValidation=false" })
private Form form;
@InjectPage