Dec
09
2009
0
Simple example of how to bind a class method to an action (button click) with JavaServer Faces
By David Luhman
I'm learning a bit of JavaServer Faces. Its paradigm for event handling is quite different from what I've seen in "classical" MVC frameworks like Yii, CodeIgniter, Rails, or even simple PHP.
I was looking for a simple example along the lines of :
If I click a button on a JSF page, it will invoke a method in a "model" class.
This is straight forward in POP (plain ole PHP). Set up an HTML form and bind the form to a PHP script via an ACTION=myscript.php entry in the form.
Categories: