The JDatePicker and JDateField components can be used with the Oracle ADF JClient data binding framework. In order to allow the date editing components to work with the binding framework, we provide a lightweight date model (DateEditComponentBinding) that binds a date edit component to a BC4J attribute.
Here's how to do the actual binding:
//This is how the binding is done for a default Swing component. Actually, this code is generated automatically by JDeveloper.
JTextField mEmployeeId = new JTextField();
mEmployeeId.setDocument((Document)panelBinding.bindUIControl("EmployeeId", mEmployeeId));
//This is how you bind JDatePicker or JDateField to edit a certain attribute.
JDateEditComponent mHireDate = new JDatePicker(); //or new JDateField()
//This code must be added by hand in the ADF Swing form.
mHireDate.setDateModel(DateEditComponentBinding.createAttributeBinding(panelBinding, mHireDate, "EmployeeView1", null, "EmployeeView1Iter", "HireDate"));The model is placed in the jdatepicker-jclient.jar file. Be sure to include it in your classpath. You can also access the model's source code to see how it is implemented. See the src/jclient directory.