Yeah, though about the namespace. Extracting the <ID> from the session keys seems like a better identifier, it's guaranteed to be unique, according to the spec. But perhaps not constant? Or what about using a render url with no parameters? I guess that's not guaranteed unique, either.
I think this is an almost FATAL flaw in the portlet 1.0 spec. I know the spec writers considered this issue; why was it decided the way it was? Thanks > -----Original Message----- > From: Stefan Hepper [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 28, 2005 5:53 PM > To: [email protected] > Subject: Re: ID for a Portlet Window > > Derek Richardson wrote: > > >Is there an accessible unique ID for a given portlet window? > I'd like to > >store portlet-window-specific but non-user-specific information in a > >database and need a primary key. > > > >Thanks, > > > >Derek > > > > > > > > > You can use RenderResponse.getNamespace that gives you an id > scoped to > the window, however this id may change and thus cannot be used as key > for db entries. The portlet spec does currently not provide > the access > to the window id, as you would also need lifecycle listeners when a > window is created or destroyed. > > Stefan >
