cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: CForms: Upload Repeater
Date Mon, 30 Oct 2006 12:26:07 GMT

On 26 Oct 2006, at 20:35, Lars Trieloff wrote:

>>> But in this case the repeater's add-button should only do an ajax- 
>>> request and add the new contents behind the already existing  
>>> repeater-rows. So I think the main problem is making the repeater  
>>> AJAX-aware.
>> Repeaters are already Ajax-aware.
>> When you click to add a new row, the whole form is submitted, with  
>> the repeater's action button id in the hidden 'forms_submit_id'  
>> field. AFAICS, currently all form data is sent, but is not  
>> validated on the server.
>> Turning on Ajax in the form results in the whole form being  
>> submitted via Ajax techniques, a new hidden field 'cocoon- 
>> ajax=true' is created, this is detected by the response pipeline  
>> to filter and wrap any changes in the BrowserUpdate schema, which  
>> is used to inject those changes into the form.
>> This is how it already works.
>> The trouble for my usecase though is that all the form fields are  
>> submitted, when not all of it is 'needed' for the event to work  
>> properly on the server.
>> I am trying to work out if it is safe to somehow filter out a  
>> bunch of fields from this type of submit. Only sending enough data  
>> for the action to work.
> I see no problem with excluding some fields from the submit e.g.  
> for actions or on-value-changed submits, the server just needs to  
> know there are some fields that are not sending data, not sending  
> empty data.

Clearly, I can just implement this specially for my one application,  
but would like to work out if this is something I can safely apply  
generically to CForms as a whole.

Has anyone else got an opinion about this issue ?


regards Jeremy

View raw message