Posted in Linux, Plone on October 29th, 2009 No Comments »
This year I’m attending the Plone Conference 2009 in Budapest. Today is the second day and as always with Plone conferences the vibe is great and it’s interesting to see the different talks.
Together with my collegue Kees Hink we gave a presentation about Hardening Plone.
For a customer who needed a DMS to exchange documents with [...]
Posted in Plone on January 20th, 2009 No Comments »
For a Zope FormLib based form I wanted a ‘Cancel’ button. I tried some googling but couldn’t find any info on it. Here it is, it isn’t so hard:
First do some imports:
from plone.app.form.validators import null_validator
from Products.statusmessages.interfaces import IStatusMessage
The cancel function:
@form.action(“Cancel”, validator=null_validator)
def action_cancel(self, action, data):
….context = aq_inner(self.context)
….IStatusMessage(self.request).addStatusMessage(_(‘Cancelled’), type=’info’)
….self.request.response.redirect(\
….context.absolute_url()+’/@@mypage’)
nb. wordpress messes with the indentation, hence the [...]
Posted in Plone on January 13th, 2009 No Comments »
I’m using KSS in Plone to ajaxify user interface actions. When you’ve got a server-side KSS method and would like to call a client action, here’s how it is done:
self.commands.addCommand(‘alert’, ‘.dummy-selector, message=’I’m called from the server!’)
self.commands.addCommand(‘myKssAction’, ‘my-selector’, param_1=”, param_n=”)
This way you can do necessary things (like storing data from a form), update the info on [...]