--> Wednesday, August 27, 2003, 6:28:13 PM, [EMAIL PROTECTED] wrote:

> I found myself doing this... but felt it was flawed.

>   def title(self):
>     self.product = self.request().uri().split('/')[1]  

> One thing I do quite often is use directory structures and filenames as
> implementation specific data whenever I can. In this case, the title will
> include the product name, which is the folder name.

> Am I supposed to do this instead?

>   def awake(self,transaction):
>     Page.awake(self,transaction)
>     self.product = self.transaction().request().uri().split('/')[1]  

This is a question of where I am supposed to put code I would normally put
in the class constructor but cannot since the good stuff, response/request,
of the Servlet is not defined at that point.

Is awake the right place for init/global/preprocessing code?

-Kai



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to