What is the difference between action and actionlistener in jsf




















A form will be submitted. ActionListener ActionEvent e handles the "listening events" of the components on the page. The main operation is the components in the current page, or Some changes in the business model, or modify the properties of the backing bean managed bean , etc. Listen for events. Note: ActionListener event listener is used to resolve events that only affect the user interface.

In particular, it is called before the form data of the beans is loaded and the verification is triggered. Fifth stage: calling application execution will not affect navigation.

The main operation is the components on the current page, or some business model changes, or modify backing The properties of the bean managed bean , etc. Will submit the form. ActionListener event listener is used to solve events that only affect the user interface.

Specifically, it is called before the form data of the beans is loaded and the verification is triggered. The form will be redisplayed without applying navigation rules, and the page will not be redirected. It is basically identical to the action method but instead it just executes the code after an action event button click or link click but a navigation is not needed. A good example of actionlistener could be in response to clicking on a checkbox and having the actionlistener code behind it change a visual attribute of a page such as render a component that was not rendered before..

Chapter 8 has exactly this example where I show how you can have a checkbox when clicked render an additional field in an input form. With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. Boost this thread!



0コメント

  • 1000 / 1000