Key JSF / ADF Faces Specific Binding Properties and Methods

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:26:55 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Key JSF / ADF Faces Specific Binding Properties and Methods

At runtime when working with ADF Faces, your action binding will be an instance of the FacesCtrlActionBinding class, which extends the core JUCtrlActionBinding implementation class to add a few JSF-specific methods.

The two JSF-specific action binding methods are:

  • public void execute(ActionEvent event)
    • This can be referenced in an ActionListener property like #{bindings.YourActionBinding.execute}
  • public String outcome()
    • This can be referenced in an Action property like #{bindings.YourActionBinding.outcome}

The former is used by default any time you drop a operation from the data control palette in the automatically-configured ActionListener property of the commandButton or commandLink. Its implementation at runtime results in executing the action binding's operation declaratively.

The latter one is there in case you might want to use the result of a method action binding (once converted to a String) as a JSF navigation outcome to determine the next page to navigate to, normally its use implies tying your view-controller layer too tightly to your model, so it's rarely used.

Similarly, when you work with a Table/Range binding in Faces, you'll be working with an instance of the FacesCtrlRangeBinding class that extends the core JUCtrlRangeBinding class to add one JSF specific property: collectionModel.

That property returns the data wrapped by an object that extends the javax.faces.model.DataModel object that JSF and ADF Faces like for many of their collection-valued components like tables.

And finally, when you're working with an ADFM tree binding in ADF Faces, you'll be working with an instance of the FacesCtrlHierBinding class that extends the core JUCtrlHierBinding class to add one JSF specific property: treeModel.

All the rest of the properties and methods of the bindings are also available, as they are inherited, but these are the most important (perhaps only!) JSF specific ones that I can think of.



© Copyright 2008 Steve Muench. Click here to send an email to the editor of this weblog.
Last update: 2/3/2008; 9:26:55 PM.