You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <dc...@fixed.com> on 2003/03/28 23:45:20 UTC

Seperate form definitions in 1 html page

Hi all,

Just a very small question.

Following I've got two forms with two different listeners.
Is it correct that irrespective of the enclosing form tags the *whole* page 
gets submitted?
I can appreciate this when enter is pressed as both forms are listening for 
that.

Or is there a possibility to have f1 react separately from f2?

<table>
<thead><td>TABLE HEADER</td></thead>
<tfoot><td><span jwcid="@Insert" value="ognl:result">result 
text</span></td></tfoot>
<tbody>
<tr>
<td>
<form jwcid="f1@Form" listener="ognl:listeners.clientValidationChanged">
<input onclick="this.form.submit()" type="checkbox" 
jwcid="inputEnabled@Checkbox" selected="ognl:clientValidation"/>
</form>
</td>
</tr>

<tr>
<td>
<form jwcid="f2@Form" listener="ognl:listeners.formSubmit">
<input type="text" jwcid="inputStr@TextField" value="ognl:inputString"/> 
textfield input<br />
<input type="text" jwcid="inputInt@TextField" 
value="ognl:intNumber"/>Integer field input<br />
<span jwcid="@Submit" label="Click me" 
listener="ognl:listeners.formSubmit"><input type="button" value="Click 
me"/></span>
</form>
</td>
</tr>
</tbody>

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

RE: Seperate form definitions in 1 html page

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Tapestry is about components that happen to live on a page.

The two Forms are separate objects, independent of each other.

Using the direct service (the default), submitting one Form does not affect
the other.  Tapestry will rewind one form, or the other, but not both.  If
you look at the query parameters, you can see the component id of one form
(or the other).

However, when the page renders, it will (of course) render both Forms and
their contents.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: F. Da Costa Gomez [mailto:dcg@fixed.com] 
> Sent: Friday, March 28, 2003 5:45 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Seperate form definitions in 1 html page
> 
> 
> Hi all,
> 
> Just a very small question.
> 
> Following I've got two forms with two different listeners.
> Is it correct that irrespective of the enclosing form tags 
> the *whole* page 
> gets submitted?
> I can appreciate this when enter is pressed as both forms are 
> listening for 
> that.
> 
> Or is there a possibility to have f1 react separately from f2?
> 
> <table>
> <thead><td>TABLE HEADER</td></thead>
> <tfoot><td><span jwcid="@Insert" value="ognl:result">result 
> text</span></td></tfoot>
> <tbody>
> <tr>
> <td>
> <form jwcid="f1@Form" 
> listener="ognl:listeners.clientValidationChanged">
> <input onclick="this.form.submit()" type="checkbox" 
> jwcid="inputEnabled@Checkbox" selected="ognl:clientValidation"/>
> </form>
> </td>
> </tr>
> 
> <tr>
> <td>
> <form jwcid="f2@Form" listener="ognl:listeners.formSubmit">
> <input type="text" jwcid="inputStr@TextField" 
> value="ognl:inputString"/> 
> textfield input<br />
> <input type="text" jwcid="inputInt@TextField" 
> value="ognl:intNumber"/>Integer field input<br />
> <span jwcid="@Submit" label="Click me" 
> listener="ognl:listeners.formSubmit"><input type="button" 
> value="Click 
> me"/></span>
> </form>
> </td>
> </tr>
> </tbody>
> 
> -- 
> Using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org