You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christian Mittendorf <ch...@freenet.de> on 2004/08/06 18:01:58 UTC

Howto combine multible components into one form?

Hello!

I'm quite new to tapestry and my question may probably sound like a 
beginner question. However, probably somebody can give me a hint on how 
to get some more insight into this framework.

What I want to do is the following:

I have a number of different components, each responsible for customer 
adress, product data and things like that.

However, in the final page some of these components shall be nested 
into a single form element (another component) using a single button to 
submit this form. This listener should trigger actions and validate 
input within its nested components.

How can I accomplish that? Is there a "standard procedure" that I 
should follow?

Christian


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


Re: Howto combine multible components into one form?

Posted by Eric Schneider <er...@centralparksoftware.com>.
Christian,

It's definitely possible.   You can do something like...

CustomerEdit.html:

<form jwcid="@Form"  listener="ognl:listeners.saveCustomer">

Billing Info:
<span jwcid="@BillingInfoEditor" value="ognl:customer.billingInfo" />

Current Address:
<span jwcid="@AddressEditor" value="ognl:customer.address" />

<input jwcid="@Submit" value="[-- Save --]" />

</form>

I'd suggest just not having any actions your nested form components.  
For whatever reason, I was having trouble getting values to bubble back 
up to the page level object.  Though, I could have been doing something 
wrong.

Also worth mentioning, if you plan on using ValidField components to 
validate your forms, nesting form components might not be a great idea. 
   This definitely noticed some weirdness trying this.

Hope that helps.
eric


On Aug 6, 2004, at 12:01 PM, Christian Mittendorf wrote:

> Hello!
>
> I'm quite new to tapestry and my question may probably sound like a 
> beginner question. However, probably somebody can give me a hint on 
> how to get some more insight into this framework.
>
> What I want to do is the following:
>
> I have a number of different components, each responsible for customer 
> adress, product data and things like that.
>
> However, in the final page some of these components shall be nested 
> into a single form element (another component) using a single button 
> to submit this form. This listener should trigger actions and validate 
> input within its nested components.
>
> How can I accomplish that? Is there a "standard procedure" that I 
> should follow?
>
> Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>