JClient with ADF and Oracle Objects Revisit UI development with Oracle Objects August 3, 2006 Ioannis K. Moutsatsos
November 11, 2008 Ioannis K. Moutsatsos
Environment • JDEV v10.1.3 • SQL Developer 1.0 – For package and procedure creation
November 11, 2008 Ioannis K. Moutsatsos
Create a complex entity object • From Oracle Object Sample_OT
This complex type is just assigned a struct
– By default the complex objects that this entity object is composed of are not mapped to detailed object types but just to an Oracle struct AtThese this contained point the complex types are view displays assigned to their – Explicitly create domain objects for contained appropriate domain each of the complex types class and are • Note that at this point their complex types are also created
– Go back to the entity object and assign the Object Type to the newly created domain • Pay attention that you select the correct package as it seems that JDEV suggests a few classes that do not seem to exist!
November 11, 2008 Ioannis K. Moutsatsos
complex types displayed correctly correctly
Entity Object Implementation combined with a domain object! • The idea comes from ADF example 36 by Steve Muench – Custom doDML methods of the entity object implementation class use methods from the corresponding domain object
• The entity implementation class provides a method for creating domain objects from a row of the entity objects
November 11, 2008 Ioannis K. Moutsatsos
Stumbling block! Inner domains • Insert operations on an outer domain object do not seem to generate the inner domain objects. – This results in null inner objects and the UI will not allow entry into fields from such null inner domain objects. Thus these objects can’t be edited! – OK so there is some mention in the online ADF help (representing column objects as business components) that you must call create() on the inner domains every time you create a new outer domain object. • The SOLUTION! – /**Add attribute defaulting logic in this method. – */ – protected void create(AttributeList attributeList)
November 11, 2008 Ioannis K. Moutsatsos
Add attribute defaulting logic to the create() method of the SampleOtImpl.java
November 11, 2008 Ioannis K. Moutsatsos