[albatross-users] A pattern for processing a bunch of items at once?

Gregory Bond gnb at itga.com.au
Thu Oct 31 16:15:02 EST 2002


I'm looking for a good Albatross pattern for the following problem:

Consider the popview application in the manual.  What if you wanted to have the
ability to delete several of the messages in the one operation?

My thoughts so far are to include a checkbox on each row with a name like 
"del_<msgnum>" (built using nameexpr), and a delete button.  

But the next bit is odd: the best thing I can think of for the page_process() 
function is something like:
	if ctx.req_equals('delete'):
		for v in ctx.locals.__dict__:
	 	   if v[:4] == 'del_':
			mbox.delete_msg(int(v[4:]))
but this is pretty ugly.  

Any better/more elegant ways that ppl can suggest?





More information about the Albatross-users mailing list