Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-18 Thread Geoff Callender
On 18 Dec 2014, at 11:02 pm, Thiago H de Paula Figueiredo wrote: > On Thu, 18 Dec 2014 01:21:03 -0200, Geoff Callender > wrote: > >> The starting point of the problem is that Form has a copy of its rendered >> state in a hidden field, and it depends on Form knowing what it rendered. > > I'm

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-18 Thread Muhammad Gelbana
Thank you all for the details. About the FormInjector , would someone please provide an explanation to this component ? I search for examples but I couldn't find any clear ones. It says that it gives t

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-18 Thread Thiago H de Paula Figueiredo
On Thu, 18 Dec 2014 01:21:03 -0200, Geoff Callender wrote: The starting point of the problem is that Form has a copy of its rendered state in a hidden field, and it depends on Form knowing what it rendered. I'm afraid you got this wrong, Geoff. Tapestry never stores the rendering of an

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-17 Thread Geoff Callender
I'm late to this thread, but I don't see an explanation of **why** Muhammad can't add fields to the existing Form, so I'll try. Please correct me if I'm wrong. The starting point of the problem is that Form has a copy of its rendered state in a hidden field, and it depends on Form knowing what

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-17 Thread Muhammad Gelbana
Thanks a lot Thiago for your response. As much as it answers my question, as much as it makes me sad that I couldn't do it easily using Zones. *-* *Muhammad Gelbana* http://www.linkedin.com/in/mgelbana On Wed, Dec 17, 2014 at 3:18 PM, Thiago H de Paula Figueiredo < thiag...@gm

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-17 Thread Thiago H de Paula Figueiredo
On Wed, 17 Dec 2014 05:10:53 -0200, Muhammad Gelbana wrote: Yea I get. But I won't be able to fill these fields with their default values from the server side. The user won't see them, so what's the problem? :) Just submit the whole form when the Select value changes, so you don't lose th

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-16 Thread Muhammad Gelbana
Yea I get. But I won't be able to fill these fields with their default values from the server side. The select component may have unpredictable amount of elements, each element will control what fields to be displayed and what default values should they have. This is all database driver. You soluti

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-16 Thread Thiago H de Paula Figueiredo
On Tue, 16 Dec 2014 13:48:50 -0200, Muhammad Gelbana wrote: @Thiago, do you mean I should do that using ajax on the client side ? No. :) Maybe some JS, but not AJAX. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br --

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-16 Thread Muhammad Gelbana
@Thiago, do you mean I should do that using ajax on the client side ? *-* *Muhammad Gelbana* http://www.linkedin.com/in/mgelbana On Tue, Dec 16, 2014 at 3:27 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > > On Sun, 14 Dec 2014 18:08:33 -0200, Muhammad Gelbana

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-16 Thread Thiago H de Paula Figueiredo
On Sun, 14 Dec 2014 18:08:33 -0200, Muhammad Gelbana wrote: @Thiago ​I need the server​ to populate these fields with default values. Also the fields will be unexpected until runtime because the selected element in the Select component is essential to decide which fields to display. The

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-16 Thread Muhammad Gelbana
al Message- > From: "Muhammad Gelbana" > Sent: ‎14-‎12-‎2014 21:09 > To: "Tapestry users" > Subject: Re: [5.4-beta-22] Adding forms to a form using ajax > > @Thiago > ​I need the server​ to populate these fields with default values. Also the >

RE: [5.4-beta-22] Adding forms to a form using ajax

2014-12-14 Thread Akshay
, you can use a block and delegate to them accordingly , keeping eveything in the same single form. Regards Akshay -Original Message- From: "Muhammad Gelbana" Sent: ‎14-‎12-‎2014 21:09 To: "Tapestry users" Subject: Re: [5.4-beta-22] Adding forms to a form using ajax @

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-14 Thread Muhammad Gelbana
@Thiago ​I need the server​ to populate these fields with default values. Also the fields will be unexpected until runtime because the selected element in the Select component is essential to decide which fields to display. These fields are even database driven so the displayed fields cannot be kno

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-14 Thread Thiago H de Paula Figueiredo
On Sun, 14 Dec 2014 07:22:00 -0200, Muhammad Gelbana wrote: The ajax-form-loop does it but it doesn't fit my scenario. I need to display portions of the form based on a Select component changed value. And even if I try to do it using the Select component change event, I don't need to add ro

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-14 Thread akshay
Hi, Why don't you try something like this. May not to be the best way but should work fine. Juts try removing the extra zone that you try to render from your form and do like below:- x.tml input fields other input fields based on the select field x.java @Property @Persist private bool

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-14 Thread Muhammad Gelbana
The ajax-form-loop does it but it doesn't fit my scenario. I need to display portions of the form based on a Select component changed value. And even if I try to do it using the Select component change event, I don't need to add rows. I just need to update a zone with different form fields. I even

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-13 Thread Diego Socaceti
Hi, have to tried to use the AjaxFormLoop http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/corelib/components/AjaxFormLoop.html I just found it in the API docs. Unfortunately there are no 5.4 jumpstart examples, but i think you can adapt the one from 5.3 http://jumpstart.doublenegativ

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-12-02 Thread Muhammad Gelbana
Anyone please ? *-* *Muhammad Gelbana* http://www.linkedin.com/in/mgelbana On Sun, Nov 30, 2014 at 11:43 PM, Muhammad Gelbana wrote: > Wrong subject. It should've been "Adding *fields* to a form using ajax" > > *-* > *Muhammad Gelbana* > http://www.linked

Re: [5.4-beta-22] Adding forms to a form using ajax

2014-11-30 Thread Muhammad Gelbana
Wrong subject. It should've been "Adding *fields* to a form using ajax" *-* *Muhammad Gelbana* http://www.linkedin.com/in/mgelbana On Sun, Nov 30, 2014 at 11:42 PM, Muhammad Gelbana wrote: > From this jira issue , I > understa