You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by sthomps <st...@gmail.com> on 2013/01/15 21:42:52 UTC

Nested Form Support

I wanted to confirm that there is not nested form support in Tapestry 5?

I'm currently evaluating Tapestry coming from Wicket and I use nested forms
quite often. 

It's nice to be able to componentize a form, include it as needed among
other forms/pages, and have a validation chain from parent to child forms. 

Thanks



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Nested Form Support

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 17 Jan 2013 15:39:40 -0200, sthomps <st...@gmail.com> wrote:

> Thiago,

Hi!

> Your assumption is correct.

:)

> I'm not saying right or wrong either way on how Tapestry handles this -  
> it's just different from how Wicket handles it and something I have to  
> be aware of.

In this case, I'd say Wicket has a feature that Tapestry hasn't. I never  
needed something like that, so it would be nice to have some scenarios  
described.

-- 
Thiago H. de Paula Figueiredo

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


Re: Nested Form Support

Posted by sthomps <st...@gmail.com>.
Thiago,

Your assumption is correct.  

I'm not saying right or wrong either way on how Tapestry handles this - it's
just different from how Wicket handles it and something I have to be aware
of.

Thanks



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719372.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Nested Form Support

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 17 Jan 2013 15:16:43 -0200, mailinglist@j-b-s.de  
<ma...@j-b-s.de> wrote:

> To me it sounds like you need dividing all your form parts into  
> components and on a per page basis you have only one form containing  
> 1..n of your components. I do not see the point why all your components  
> have to be forms. The form is just enclosing/surrounding your  
> components. That's at least the way we deal with "complex" forms.

I guess what he really wants is to have these components being submitted  
alone even when nested in others. HTML doesn't support that, probabaly not  
without some heavy JavaScript code, so I guess (guess!) Wicket just  
ignores the fields which aren't in that component.

-- 
Thiago H. de Paula Figueiredo

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


Re: Nested Form Support

Posted by "mailinglist@j-b-s.de" <ma...@j-b-s.de>.
To me it sounds like you need dividing all your form parts into components and on a per page basis you have only one form containing 1..n of your components. I do not see the point why all your components have to be forms. The form is just enclosing/surrounding your components. That's at least the way we deal with "complex" forms.

Jens

Sent from my iPhone

On 17.01.2013, at 17:22, sthomps <st...@gmail.com> wrote:

> I don't have an existing public site I can point to - all my examples are
> internal.
> 
> In essence it's fairly simple - componentize a form that can act on it's own
> on a page or be nested within a parent form on page.
> 
> Again not a huge deal but something that Wicket developers would need to be
> aware of.
> 
> Wicket Nested Forms <https://cwiki.apache.org/WICKET/nested-forms.html>  
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719362.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

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


Re: Nested Form Support

Posted by sthomps <st...@gmail.com>.
I don't have an existing public site I can point to - all my examples are
internal.

In essence it's fairly simple - componentize a form that can act on it's own
on a page or be nested within a parent form on page.

Again not a huge deal but something that Wicket developers would need to be
aware of.

Wicket Nested Forms <https://cwiki.apache.org/WICKET/nested-forms.html>  



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719362.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Nested Form Support

Posted by Geoff Callender <ge...@gmail.com>.
A submit submits the whole form.

Can you help me out here - because I can't picture the use case - can you point to an existing public web site that behaves in the way you want so I can have a look?

Cheers

On 17/01/2013, at 8:48 AM, sthomps wrote:

> An Address component could be one.
> 
> This appears to be what I would need.
> 
> http://jumpstart.doublenegative.com.au/jumpstart/examples/component/subformvalidation1
> 
> Can these "sub-forms" contain other components that will submit only that
> sub-forms information or does it submit the entire form and validation is
> done with the use of FormSupport and ValidationTracker?
> 
> I would like the sub-form to be able to contain a submit button/submit link
> that only acts on that sub-form.
> 
> Thanks
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719352.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


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


Re: Nested Form Support

Posted by sthomps <st...@gmail.com>.
An Address component could be one.

This appears to be what I would need.

http://jumpstart.doublenegative.com.au/jumpstart/examples/component/subformvalidation1

Can these "sub-forms" contain other components that will submit only that
sub-forms information or does it submit the entire form and validation is
done with the use of FormSupport and ValidationTracker?

I would like the sub-form to be able to contain a submit button/submit link
that only acts on that sub-form.

Thanks



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719352.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Nested Form Support

Posted by Geoff Callender <ge...@gmail.com>.
What's an example? An Address component?

Are these anything like what you need...

	http://jumpstart.doublenegative.com.au/jumpstart/examples/component/subformcomponent1
	http://jumpstart.doublenegative.com.au/jumpstart/examples/component/subformvalidation1
	http://jumpstart.doublenegative.com.au/jumpstart/examples/component/subformasafield1

Cheers,

Geoff

On 16/01/2013, at 11:12 AM, sthomps wrote:

> While I agree that there is not technically a true nested form in HTML, it's
> the best term I have to describe it :)
> 
> What I'm trying to do in my evaluation is see where the sticking points will
> be as developers, if the framework is chosen, will run into.  This is one of
> them.
> 
> It sounds like what I want to accomplish is feasible.  I'll just need to
> code it out.
> 
> Thanks for your help.
> 
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719339.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


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


Re: Nested Form Support

Posted by sthomps <st...@gmail.com>.
While I agree that there is not technically a true nested form in HTML, it's
the best term I have to describe it :)

What I'm trying to do in my evaluation is see where the sticking points will
be as developers, if the framework is chosen, will run into.  This is one of
them.

It sounds like what I want to accomplish is feasible.  I'll just need to
code it out.

Thanks for your help.
 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719339.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Nested Form Support

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 15 Jan 2013 20:01:22 -0200, sthomps <st...@gmail.com> wrote:

> No form fragments don't appear to be what I would need.
>
> I'm still finding my way around Tapestry so I'll try and explain a bit
> better in how I use Wicket with nested forms.
>
> I would like to have a parent form that on submit will validate all the
> nested forms contained within including it's own input fields.
>
> The nested forms in the parent form are small subsets of information that
> may or may not be required for completion.
>
> I can carve out this subset of info in a nested form (input fields and a
> submit component) and as the user is completing the form, the nested form
> can be validated on it's own - only that info related to the nested form  
> is submitted and validated.

I'd suggest you to start by not using the term nested form. There's no  
such thing in HTML nor Tapestry. In addition, don't write Tapestry code  
thinking in Wicket. They share some concepts, but the implementation is  
radically different.

All you need to do is to create components wrapping form fields and the  
submit buttons. Tapestry (actually, the Form component) will take care of  
validation and etc. You can't have a Tapestry Form component nested inside  
another.

Regarding to just validating and submitting one of what you call subform,  
actually you can't do that in Tapestry directly, but you can work around  
it easily: create one component just with the fields and their validation  
(I'll call it Fields for this example), another one (FieldsForm) which has  
a template with Form component wrapping a Fields instance. Of course,  
you'll need more than one pair of it.

-- 
Thiago H. de Paula Figueiredo

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


Re: Nested Form Support

Posted by sthomps <st...@gmail.com>.
No form fragments don't appear to be what I would need.

I'm still finding my way around Tapestry so I'll try and explain a bit
better in how I use Wicket with nested forms.

I would like to have a parent form that on submit will validate all the
nested forms contained within including it's own input fields.

The nested forms in the parent form are small subsets of information that
may or may not be required for completion.

I can carve out this subset of info in a nested form (input fields and a
submit component) and as the user is completing the form, the nested form
can be validated on it's own - only that info related to the nested form is
submitted and validated.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332p5719334.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Nested Form Support

Posted by Kalle Korhonen <ka...@gmail.com>.
I have a feeling you are not even asking about form fragments (see
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/FormFragment.html,
also shows an example of using a nested bean editor) but just making a
component out of a bunch of related fields, and yes sure, in Tapestry you
can always make a component out of other components. The form fields expect
a form as a containing component but the components (on the server side)
don't have the same strict parent-child relationship as in Wicket.

Kalle


On Tue, Jan 15, 2013 at 12:42 PM, sthomps <st...@gmail.com> wrote:

> I wanted to confirm that there is not nested form support in Tapestry 5?
>
> I'm currently evaluating Tapestry coming from Wicket and I use nested forms
> quite often.
>
> It's nice to be able to componentize a form, include it as needed among
> other forms/pages, and have a validation chain from parent to child forms.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Nested-Form-Support-tp5719332.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>