To invoke custom code when a drop event is fired, register a drop event listener on the drop target component. The drop event listener is a method in a managed bean that contains your custom code for handling and processing the drop event. At runtime, when a source component is dragged and dropped on the target component, the drop event listener method is automatically invoked.
In this example, you will create a drop event listener method that adds a dropped value to a list of items in a listbox. You will also create a property and getter method to dynamically populate the listbox with an initial list of items. You will create the methods in a managed bean, which is added to the JSF configuration file
Note: If you are creating an application that also uses ADF data bindings and task flows, you should add managed beans to either the
adfc-config.xml file or the task flow definition file.
To begin creating a custom drop event listener method, you will create and configure a managed bean using the overview editor for the
faces-config.xml file. To open the overview editor, in the Application Navigator double-click
faces-config.xml to open the file in the editor window, then click the
Overview tab at the bottom of the editor.
Managed Beans section of the overview editor, you will click
Add to use the Create Managed Bean dialog to let JDeveloper configure the managed bean in
faces-config.xml, and create a new Java class file for you. You will specify a name, a Java class name, and select a scope for the managed bean in the dialog.
After creating and configuring a managed bean, you can immediately begin editing the class file in the source editor to add your method code.
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,