[Zope] ZTUtils.Iterator value in ZPT

David Pratt fairwinds at eastlink.ca
Tue Jul 19 20:34:37 EDT 2005


Hi Peter. Thanks for your reply.  I think I am getting closer with this 
but still not quite right.
It appears I am calling Iterator right, because it gets an Iterator 
instance and now getting number 1
but that doesn't tell me much.


<div tal:define = "tabindex python:Iterator(range(100));">

	<div>
		.. html form contents
                    .. a field
                    <input tal:attributes="tabindex/next ...
	         ... another field	
	</div>

is giving tabindex="1" all the way through my forms.  I thought next 
meant next, meaning you are asking the iterator for the next value. 
What am I missing?

Regards,
David

On Tuesday, July 19, 2005, at 07:18 PM, Peter Bengtsson wrote:

> On 7/19/05, David Pratt <fairwinds at eastlink.ca> wrote:
>> I want to intialize the value of ZTUtils.Iterator and use the value
>> to increment tabindex attribute  in my ZPT for forms in CMF
>>
>> Something like:
>>
>> <div tal:define iterator python:modules['ZTUtils'].Iterator; >
>>         <div>
>
> Don't you need to create it with a sequence like
> <div tal:define iterator 
> python:modules['ZTUtils'].Iterator(range(100)); >
> -- 
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.com
>


More information about the Zope mailing list