The drop event listener method you created in the previous card adds a dropped value to a list of items in a listbox. Thus, in this example, you will add the
af:selectOneListbox component and use it as the drop target.
When you add the
af:selectOneListbox component, the Insert Select One Listbox dialog displays for you to either create individual, static items for the list on the page, or to bind to a list that is populated dynamically through a managed bean. You will choose to bind to a dynamic list (in the previous card, you have already created a property and a getter method in a managed bean that can populate the list dynamically).
To define a component as a drop target, you will embed the
af:dropTarget tag into the component. When you embed
af:dropTarget, the Insert Drop Target dialog displays for you to register the custom drop event listener on the component.
When you define the drop target, you will also use the
af:dataFlavor tag to specify the type of object that can be dropped on the target.
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,