Monday, April 5, 2010

Create or CreateInsert

Taken from Jdeveloper 11g handbook:
Create or CreateInsert?

The two different create operations provided by ADF, Create and CreateInsert, can be a little
confusing because they seem to accomplish the same task. The row created by the Create
operation is managed as a temporary object by the framework. If the user abandons an
input screen without submitting the new record, the row will simply disappear, leaving the
programmer with no clean-up to do. CreateInsert, however, requires clean-up.
Although the Create behavior is generally more useful, there are still some circumstances
where CreateInsert should be used. Typically, this will be when the side effects of entity object
creation are desirable. For example, the create method on the entity object adds information
defined as defaults for attributes such as dates and reference numbers. With CreateInsert, this
default information will be visible to the user on the created (blank) record. If the Create
operation is used, the defaults will not be set until after the user submits the new record.

From Fusion Guide:

The ADF BC data control exposes three operations for a view object to create a new row: Create, CreateInsert, and CreateWithParams. The Create operation creates a new row for the collection but doesn’t add it to the iterator. CreateInsert works the same as Create but adds the new row above the current row in the iterator. CreateWithParams works the same as CreateInsert but optionally allows developers to define default values declaratively for the row attributes. The difference between Create and CreateInsert is only relevant if the collection is displayed in a table, not for a form.


Anonymous said...

thanks for information about create and createinsert

edwick said...

We get good information from your blog.This is a very nice blog.

Flats in Greater Noida
Properties in Noida Extension
Amrapali Verona Heights
Commercial Projects in Noida
Resale flats in noida extension