On Sun, 2006-01-01 at 20:40 -0700, Jeff Shell wrote:
> While ZCML's view and page directives will put BrowserView into your
> base classes automatically if it's not there, I prefer to still use it
> as a base class directly. It makes the code more readable (I can see
> that 'SearchResults' is a browser view immediately), and is just a
> good concept (I believe) in making your code more Pythonic and less
> dependent on you or other readers of it understanding the ZCML 'magic'
> that goes on in the browser declarations.

Hi all,

a bit of a different topic but Jeff mentioned above SearchResults and it
got me thinking about the way I handle searching (search form and
returning results) and it doesn't feel right.  Basically I handle
entering of ISearchFilter (just non-persistent search criteria fields),
searching a catalog and returning of results in a single AddView form.
As a result I have a single page template for this view and it is quite
messy as it collects form input and displays search results.

I would like to have two page views

1. ISearchFilter add view - collects search form fields and searches the
catalog creating ISearchResults object

2. ISearchResults browser view of SearchResults object

But I am having problems when navigating from the add view to
ISearchResults browser view (tried to get the view using
getMultiAdapter), maybe I should redirect to it?  SearchResults object
is created based on catalog search results but it is non-persistent and
only lives in memory during a single transaction, how do I navigate to
its browser view, what is its traversable path (or is locatable the
right term)?  Should I somehow register a factory for ISearchResults and
use zapi.createObject() to create some sort of a context for the object?
Or I might be completely missing the point.

I think I am lacking in understanding of traversable, locatable concepts
and if they can be of any relevance to non-persistent objects.  Any
explanation of this or pointers to documents I could read is much


Zope3-users mailing list

Reply via email to