[Zope-CMF] Re: Serious problem with type actions

Yuppie schubbe@web.de
Wed, 30 Apr 2003 20:29:31 +0200


Hi Ronan, hi Tres!


Ronan Amicel wrote:
> Well, almost... In Plone, we have type actions with a '/' inside,
> such as string:portal_form/edit_form" to handle form validation and
> navigation. I seem to remember Alan saying he wanted to get rid of
> that in a future release, but I'm not sure.

aargh!!!

Example: portal_form/document_edit_form

works with ActionsTool and getActionById(), but _getViewFor() just calls 
document_edit_form in this case.

As long as _getViewFor() finds a view that doesn't use something like 
"portal_form/document_edit_form", the other views (e.g. 'edit') can use it.


> The kludge I'm using right now is the opposite solution. I keep the
> relative URLs in action strings, but I prepend "$object_url/" when
> type actions are used by portal_types to list actions.

@ Ronan: You modified listActions()?

I don't think this is a general solution. All actions should work the 
same way.


@ Tres: What was the idea behind utils.getActionContext()?

Example: string:${object_url}/document_view

_getViewFor() returns an error, getActionById() returns 
'/document_view'. Both results are not very useful.


I'm still not sure what's the right solution, but I agree with Florent:

> Indeed, the semantics of the action should be clarified.
> Maybe not in time for 1.4beta1, but it will definitely be done before
> the final 1.4.


Cheers,

Yuppie