You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ds...@apache.org on 2004/03/31 05:09:56 UTC
cvs commit: jakarta-tapestry/doc/src/ComponentReference Submit.html
dsolis 2004/03/30 19:09:56
Modified: doc/src/ComponentReference Submit.html
Log:
Update example
Revision Changes Path
1.14 +13 -31 jakarta-tapestry/doc/src/ComponentReference/Submit.html
Index: Submit.html
===================================================================
RCS file: /home/cvs/jakarta-tapestry/doc/src/ComponentReference/Submit.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Submit.html 2 Mar 2004 01:44:31 -0000 1.13
+++ Submit.html 31 Mar 2004 03:09:56 -0000 1.14
@@ -288,43 +288,25 @@
</tr>
</table>
-<pre>
-<form jwcid="purchageForm">
+ <pre>
+<form jwcid="@<A href="Form.html">Form</a>" listener="ognl: listeners.formSubmit">
Item: <span jwcid="selectItem"/>
<p>
- Description: <span jwcid="insertDescription"/>
+ Description: <span jwcid="@<A href="Insert.html">Insert</a>" value="ognl: clothingItem.description">100% Egyptian Cotton</span>
<p>
- Label: <span jwcid="insertLabel"/>
+ Label: <span jwcid="@<A href="Insert.html">Insert</a>" value="ognl: clothingItem.label">Jersey Bed Sheet</span>
<p>
- Price: $<span jwcid="insertPrice"/>
+ Price: $<span jwcid="@<A href="Insert.html">Insert</a>" value="ognl: clothingItem.price">$150.00</span>
<p>
- <input jwcid="<span class="jwcid">addToCartSubmit</span>" type="Submit"value="Add to Cart"/>
+ <input jwcid="<span class="jwcid">addToCartSubmit</span>" type="Submit" value="Add to Cart"/>
</form>
<property-specification name="itemSelectionModel" type="ItemSelectionModel" persistent="yes"/><br><property-specification name="clothingItem" type="Item" persistent="yes"/><br><property-specification name="selectedComponent" type="java.lang.String"/><br>
-<component id="purchaseForm" type="<A href="Form.html">Form</a>">
- <binding name="listener" expression="listeners.formSubmit"/>
-</component>
-
<component id="selectItem" type="<A href="PropertySelection.html">PropertySelection</a>">
<binding name="model" expression="itemSelectionModel"/>
<binding name="value" expression="clothingItem"/>
<binding name="submitOnChange" expression="true"/>
- <binding name="selected" expression="selectedComponent"/>
- <binding name="tag" expression='"SELECT_ITEM"'/>
-</component>
-
-<component id="insertDescription" type="<A href="Insert.html">Insert</a>">
- <binding name="value" expression="clothingItem.description"/>
-</component>
-
-<component id="insertLabel" type="<A href="Insert.html">Insert</a>">
- <binding name="value" expression="clothingItem.label"/>
-</component>
-
-<component id="insertPrice" type="<A href="Insert.html">Insert</a>">
- <binding name="value" expression="clothingItem.price"/>
</component>
<component id="<span class="jwcid">submitAddToCart</span>" type="<A href="Submit.html">Submit</a>">
@@ -347,15 +329,15 @@
public abstract ItemSelectionModel setItemSelectionModel(ItemSelectionModel value);
public void formSubmit(IRequestCycle cycle) {
- if (getSelectedComponent().equals("SELECT_ITEM")) {
- // Submit from selectItem component.
- // Item display will automatically update, but we will log user's
- // interest in the selected clothing item
- ..
- } else if (getSelectedComponent().equals("SUBMIT_ADD_TO_CHART")) {
+ if (getSelectedComponent().equals("SUBMIT_ADD_TO_CHART")) {
// Submit from submitAddToCart component.
// Add selected item to shopping cart
Item item = getClothingItem();
+ ..
+ } else {
+ // Submit from selectItem component.
+ // Item display will automatically update, but we will log user's
+ // interest in the selected clothing item
..
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org