[Zope] Create a list in the REQUEST space ????

Peter Sabaini sabaini@niil.at
Wed, 24 Nov 1999 21:32:06 +0100 (CET)


you can do this with something like:
<dtml-call "REQUEST.set('list', [])">

you can append elements to the list:
<dtml-call "list.append(1)">

output some elements:
<dtml-var "list[0]">

slices and dtml-in also work:
<dtml-in "list[1:]">
 <dtml-var sequence-item><br>
</dtml-in>

hth

peter.

On Wed, 24 Nov 1999, Daniel G. Rusch wrote:

:Help!,
:
:We are trying to load user roles from a table. roles needs to be a list
:so that the manage_users call can set the roles. 
:
:The question is how does one create a list on the fly in the REQUEST
:Space...? The below snippet does not create the list, any thoughts???
:
://snippet
:<dtml-in getUserRoles>
:	<dtml-call "REQUEST.set('roles:list',name)">
:</dtml-in>
:<dtml-call "acl_users.manage_users(submit='Add', REQUEST=REQUEST)">
:
:Thanks,
:
:DR
:
:_______________________________________________
:Zope maillist  -  Zope@zope.org
:http://lists.zope.org/mailman/listinfo/zope
:          No cross posts or HTML encoding!
:(Related lists - 
: http://lists.zope.org/mailman/listinfo/zope-announce
: http://lists.zope.org/mailman/listinfo/zope-dev )
:

-- 

_________________________________________________
peter sabaini, mailto: sabaini@niil.at
-------------------------------------------------