Terrence Brannon | 4 Nov 13:43
Picon
Gravatar

TAL link for PeTaL out of date

http://www.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage

lists Hiver's 2.14 version instead of Bruno's recent 2.17 version

Bruno Postle | 7 Nov 16:23
X-Face

Re: TAL link for PeTaL out of date

On Fri 04-Nov-2005 at 04:43 -0800, Terrence Brannon wrote:

> http://www.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage
> 
> lists Hiver's 2.14 version instead of Bruno's recent 2.17 version

Yes the way to link to the current version of a perl module is like
so:

  http://search.cpan.org/dist/Petal/

--

-- 
Bruno

Terrence Brannon | 4 Nov 11:44
Picon
Gravatar

TAL link for PeTaL out of date

http://www.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage

lists Hiver's 2.14 version instead of Bruno's recent 2.17 version

Evan Simpson | 7 Nov 23:50

Re: TAL link for PeTaL out of date

Terrence Brannon wrote:
> http://www.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage
> 
> lists Hiver's 2.14 version instead of Bruno's recent 2.17 version

Thanks, I've fixed this and another stale link on that page.

Cheers,

Evan @ 4-am

Josh Narins | 9 Nov 19:11

decode selected trouble

Dear Petal List,

I've got this in my template:

<option petal:repeat="o options" 
        petal:attributes="value string:${o/id}; selected decode: o/selected 1 'selected'">

And I am getting selected="0" for the options.

Am I doing something wrong?

TIA,
Josh

Raymond Barkhouse | 10 Nov 18:33

Re: decode selected trouble

On Wed, 2005-09-11 at 13:11 -0500, Josh Narins wrote:
> Dear Petal List,
> 
> I've got this in my template:
> 
> <option petal:repeat="o options" 
>         petal:attributes="value string:${o/id}; selected decode: o/selected 1 'selected'">

I use "selected decode:foo 1 'selected' nothing" to stop the attribute
from appearing at all when it's not selected (as needed for HTML).

larsks.20390725 | 29 Nov 04:55
Favicon

Problems with on-error?

Howdy,

I've run into what looks like a problems with the on-error directive
in Petal 2.17.  Given the following input (straight from the Petal documentation):

  <p petal:on-error="string:Cannot access object/method!!">
  $object/method

  </p>

Petal produced the following output:

  string:Cannot access
object/method!!

It looks as if Petal is treating the argument to on-error
as a simple string rather than as an expression, so the string: modifier shows
up in the text.

  $ perl -MPetal -e 'print $Petal::VERSION, "\n"'
  2.17

-- Lars

Bruno Postle | 30 Nov 13:59
X-Face

Re: Problems with on-error?

On Tue 29-Nov-2005 at 03:55 -0000, larsks.20390725@... wrote:

>  <p petal:on-error="string:Cannot access object/method!!">
>  $object/method
>  </p>
>
> Petal produced the following output:
>
>  string:Cannot access object/method!!
>
> It looks as if Petal is treating the argument to on-error
> as a simple string rather than as an expression, so the string: 
> modifier shows up in the text.

Yes, looks like there are two bugs here:

* The TAL spec says that 'on-error' should be treated as a 
  'content' statement, but Petal replaces the entire tag.

* The expression isn't being evaluated and is dumped as a simple 
  string.

http://www.zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4/#on-error

--

-- 
Bruno


Gmane