cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Ekstedt <>
Subject Getting access to the actionEvent in Woody flow
Date Thu, 31 Jul 2003 03:35:14 GMT

Have recently started using woody+hibernate+flow and absolutely love it.
One thing I don't like however is how items in a repeater-widget is
removed. I've made a small change to my woody.js and wondered if you're
interested. I'll supply a patch if you are (although I might need some
pointers on how to do that since it would be the first time).

The problem was that I wanted to create forms that looked like this:

Name  Age
Name1   1  [Remove]
Name2   2  [Remove]
Name3   3  [Remove]
[Add name]

This is different to the woody-samples where there is a boolean field
called select on every row and one button that removes all selected.

To be able to do this I needed access to the ActionEvent that is created
when a button is pressed. What I did in woody.js was to add a function
Form.getAction() and edited some of

The benefit is that I can now write a formhandler like this:

function formHandler(form) {
    var model = form.getModel();
    switch(form.getSubmitId()) {
    case "remove-name": // NB. singular not plural
	    var i = form.getAction().getSource().getParent().getId();
    case "add-name":
        return true;
    return false;


// Jonas

View raw message