For some time I have been experimenting with using component 
application model with Turbine. Whole user interaction is handled 
via events.
It is more radical than adding ActionEventListener to Action but 
you migth find it interesting.

Example:

import org.apache.ecs.ConcreteElement;
import org.apache.honey.*;
import org.apache.honey.html.*;

public class HelloWorld extends DefaultPaglet implements Paglet {

    int numberOfHits = 0;

    public void init(Object o) {

        DefaultContainer c = new DefaultContainer();

        final HText text0 = new HText("Hello World.");
        final HText text1 = new HText("Number of hits: " + 
numberOfHits);
        HLinkButton button = new HLinkButton("Hit me!", true);

        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                numberOfHits++;
                text1.setValue("Number of hits: " + numberOfHits);
            }
        });
        c.add(text0);
        c.add(text1);
        c.add(button);

        addComponent(c);
    }
} 

Here is source for review:
ftp://ftp.tiger.com.pl/pub/honey/honey.zip

This work is at the stage of developement. Most of the classes 
lack documentation at the moment.


Maciek Kaminski
[EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to