Malcolm, Exactly we have moved to Ajax forms, and encapsulates better the code, the only problem we have encountered is that $imports or $jsImports in Ajax sections, behave as full page imports, in fact i've just replied to Bob about this.
Thanks Hans Hans Poo, Welinux S.A. Bombero Ossa #1010, oficina 800, +56-2-3729770, Movil: +56-9-3199305 Santiago, Chile ----- Mensaje original ----- De: "Malcolm Edgar" <[email protected]> Para: [email protected] Enviados: Jueves, 14 de Julio 2011 6:09:32 Asunto: Re: Initialisation of dynamic added date fields Hi Has, I think once pages get to a certain level of complexity or have a fair amount of dynamic data entry then moving to a more AJAX oriented approach is better. regards Malcolm Edgar On Thu, Jul 14, 2011 at 6:11 PM, Bob Schellink <[email protected]> wrote: > Hi, > > Click's DateField uses Prototype.js library. I wouldn't mix Prototype > and jQuery. Rather use Click-calendar[1]. > > regards > > Bob > > [1]: http://code.google.com/a/apache-extras.org/p/click-calendar/ > > On 2011/07/13 19:15 PM, Hans C. Poo wrote: >> Hi, >> >> We are building a very dynamic data entry system that requires adding fields >> on the fly. >> >> Specially we have some sections we are calling "grid". >> >> Each row of these grids is a set of fields that replicate from the fields of >> row zero, there is a button to add new rows. >> >> Initially we used some jquery to clone rows, rename fields, and worked fine, >> but the initialisation of dateFields was missing, we are mounting all the >> application on click fields and eventually other controls may get broken >> too, at this time we considered to manually call the javascript binding >> code of the dateField, but we considered it too obtrusive, and decided to >> resource to Ajax and created a handler that only returned one row at a time, >> velocity code: >> >> $imports >> >> <tr> >> #foreach( $field in $fields ) >> <td>$field</td> >> #end >> </tr> >> >> Then we included in the response the $imports, and in fact the javascript >> code for the dateField was there but with a lot o baggage, and were too much >> and the page loose the format. >> >> Finally we agree that we need only the javascript initialisation (binding) >> code of the dateField: Event.observer ..., it wasn't possible because but it >> was inside the protected method addCalendarOptions(..). >> >> We don't want to broke the API or begin to clone javascript code, is there a >> way to accomplish this in some more standard way. >> >> Note: Due to the nature of the system we were not able to use FormTable, >> that was the most similar thing we found on apache click space. >> >> Thanks >> Hans >> >
