Difficulties with Actions

Derek Richardson derek.richardson at gatech.edu
Mon Oct 8 17:50:38 UTC 2007


I'm attempting to write a replacement for Plone CAS Login for Plone 3.0, 
since the product hasn't been updated.

The 2.5 product changed the login portlet and the login form to go to 
CAS. I've decided it is more elegant to simply have the "login" link on 
the personal bar link to the CAS server login form and get rid of the 
portlet and login form altogether, because, since the CAS server gathers 
the username and password, there is no need for an entire portlet or 
form - a link is just right.

Unfortunately, the CAS server needs to know whether javascript and 
cookies are enabled and this info is harvested on the linking page via 
javascript and passed via the form parameters (the form method is GET) 
to the CAS server.

I don't know how to do this from a GenericSetup action registration. It 
simply takes a URL which, while it can by dynamic, can't AFAICT include 
javascript. Does anyone see how I can produce these urls from action 
definitions?

This reminds me of a post I made a few weeks ago that received no 
replies entitled "Vertically Stacked Dynamic Links in Document Actions". 
It's short, so I'll include it here:

#####

I want to get an entry on the document actions line that has multiple 
links. Example: stacked on top of each other, "Atom Feed", "RSS2 Feed", 
and "RSS Feed", each going to a separate url. But I don't want them 
distributed horizontally, as separate document actions would have it. 
Also, they must be dynamic based on the context - folder A may have all 
3, while folder B lacks the RSS2 feed. I tried inserting another viewlet 
into the manager, but so far haven't gotten it to work. So I'm asking 
for advice...

#####

I am guessing that, if I hit the similar problems twice in two very 
different contexts in a few weeks, either I have a systematic 
misunderstanding or there's a real challenge here. It seems to me that 
it would be nice if actions were more flexible, to be able to render a 
nested viewlet as well as a URL. This would give product authors much 
more flexibility. What do y'all think?

In the mean time, I need solutions to both of these problems in Plone 
3.0.x. Ideas?

Derek





More information about the Product-Developers mailing list