[html-formfu] nested repeatables not showing data

Ascii King tech at swattermatter.com
Fri Apr 17 14:24:00 GMT 2009


Woot! Preliminary tests show that the code is working now. Bless you! My 
entire job just got a lot easier. I have tested the code against my app 
and it seems to read the data in, but won't save it.  I will test a bit 
more.

I have written a write test, and I will work on a read test.

Ascii King wrote:
> I've written a test to cover the has_many to has_many but i'm still 
> working out how to submit it. I will check the new code right away, 
> though.
>
> Carl Franks wrote:
>> 2009/4/8 Ascii King <tech at swattermatter.com>:
>>  
>>> I am using FormFu with Catalyst to load a very complex form. I am 
>>> testing a
>>> repeatable within a repeatable call to the database and it is 
>>> failing to
>>> display the data from the database.
>>>
>>> Organization -> has_many -> Person -> has_many -> Equipment
>>>
>>> An Organization (table) has many Person (table) records.
>>> A Person (table) has many Equipment (table) records.
>>>
>>>   * I can display the Organization record.
>>>   * I place the related Person records within a repeatable element and
>>>     they display fine.
>>>   * I place the related Equipment  records within a repeatable element
>>>     and they display fine.
>>>   * I place the related Equipment  records within a repeatable element
>>>     inside of the Person repeatable and they will NOT display any data.
>>>
>>>
>>> It does however display the right number of Equipment records, but the
>>> fields are all empty.
>>>
>>> It seems to me that the  "sub _fill_nested" routine is the part that 
>>> won't
>>> populate the fields. HTML-FormFu-Model-DBIC seems to have pulled the 
>>> data
>>> from the database accurately, but it will not put the data into the 
>>> fields.
>>> Perhaps it is because it doesn't know how to interpret the new 
>>> fieldname
>>> with the extra underscore and number?
>>>
>>> example:
>>> <input name="persons.equipments.equipment_id_1_3" type="hidden"
>>> id="persons.equipments.equipment_id_1_3" />
>>>     
>>
>> I've made some fixes to support Repeatable-within-a-Repeatable,
>> could you checkout HTML-FormFu ( -r 1450 or higher )
>> and HTML-FormFu-Model-DBIC ( -r 1451 or higher )
>> from svn, and give it a try again?
>>
>> The only scenario that's currently covered in the test suite is
>> many-to-many -> has-many,
>> simply because the test schema already had those relationships setup.
>> If you have any problems with, for example, has_many -> has_many,
>> then we'll need to expand the test suite to cover it.
>>
>> Carl
>>
>> _______________________________________________
>> HTML-FormFu mailing list
>> HTML-FormFu at lists.scsys.co.uk
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>>
>>   
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>



More information about the HTML-FormFu mailing list