[Zope-CMF] SearchableText, custom subfolders, 2 data streams.

Tres Seaver tseaver@digicool.com
Sun, 22 Apr 2001 19:47:06 -0400


Ignacio Valdes wrote:
> 
> Hello all, I'm actually getting somewhere with my portal app, here's some stumper(to me) questions:
> 
> 1) Does the SearchableText python script have to reside in the
> PortalPollProductClass? Can it be relocated to a local spot such as in
> portal_skins/custom?

It can be, although there is good reason to put it on the class:
class methods are more "tightly bound" to the object than skin
methods.  If you put in in 'portal_skins/custom', then it will
be acquirable by *all* objects in the portal (those which don't
have a "real" method of that name, anyway);  I doubt that this
is what you intend.

ZClasses as simple portal content have a lot going for them:
they can be pretty much responsible for only "pure business
logic", with all UI in skin methods.  I like this paradigm a
lot.
 
> 2) Is there a way to group methods in a subfolder of 'custom'?  I was
> able to move my modified PortalPollProduct methods to
> portal_skins/custom, but can't gather them in a portal subfolder because
> Zope seems unable to find them in a subfolder to portal_skins/custom.

We would need to think about this before proceding;  perhaps it
would make sense to be able to group skin methods by "type
object" ID, and have the skins tool automagically search for
such a subfolder in each "regular" skins folder?

> 3) I am modifying the Portal Poll product such that I'm adding
> properties other than the stock ones such as documentationURL. I would
> also like to use the standard metadata fields since they already hold
> title, description, etc. So I need to have all of these data fields on
> one input form, but then split them up to go to their appropriate
> places: title, desc-->metadata and  documentationURL-->PortalPoll
> propertysheet.

I don't quite get this -- why don't you want to edit the
"poll-specific" data on its own view, and the standard metadata
on the stock 'metadata_edit_form'?

> I'm trying to marry the two methods that do these
> independently, but as far as I can tell with how <form> is setup, it
> doesn't appear as though you can submit to two different places at once.
> I've tried just calling EditDone, but this doesn't seem to do it without
> the action= statement set to ./

You can create a single method as the POST target, and then have
it update both the metadata and the poll properties::

  context.editMetadata( REQUEST[ 'title' ], .... )
  pps = context.propertysheets.PortalPollProperties
  pps.manage_changeProperites( REQUEST )

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org