Re: [Maypole] 2.07 PR

From: n.a (n.a at ad.wakwak.com)
Date: Tue Jan 18 2005 - 14:50:18 GMT


At 19:17 05/01/17 +0000, you wrote:
>n.a wrote:
>>
>>>- Removed Maypole::Model->description.
>>>
>>>Fixes:
>>>- Model->process() shouldn't set $r->objects() to a list with a single,
>>>undefined element
>>
>>I'm not sure it is in the same line with this, but 'do_edit' sets
>>$r->objects() to a list with a single, undefined element.
>
>[snip patch]
>
>I don't think it's a problem as far as the factory templates are
>concerned, but I'm applying your patch to keep things consistent.

It is a problem with Maypole::View::Mason.

For the factory/edit template,

Mason version
------------------------------------------------
%if(@$objects){
%foreach my $item (@$objects) {
<DEFANGED_form action="<% $base %>/<% $item->table %>/do_edit/<%
--------------------------------------------------

TT version
-------------------------------------------------
[% IF objects.length %]
<div id="title">Edit a [% classmetadata.moniker %]</div>
[% FOR item = objects; %]
<DEFANGED_form action="[% base %]/[% item.table %]/do_edit/[% item.id %]" method="post">
-----------------------------------------------------

I don't know why TT template magicly goes well with $object=[undef].
but I can understand why Maypoles one gets error.

n.a at ad.wakwak.com

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT