[Maypole] 2.07 PR
n.a
n.a@ad.wakwak.com
Tue, 18 Jan 2005 23:50:18 +0900
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) {
<form action="<% $base %>/<% $item->table %>/do_edit/<%
--------------------------------------------------
TT version
-------------------------------------------------
[% IF objects.length %]
<div id="title">Edit a [% classmetadata.moniker %]</div>
[% FOR item = objects; %]
<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@ad.wakwak.com