Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling Jdeveloper ADF Application from Oracle Forms

640822Aug 27 2008 — edited Aug 28 2008
Hallo All,

i want to call an ADF Application from Jdeveloper in Oracle Forms. I followed the exapmple here(http://www.oracle.com/technology/obe/obe11jdev/11/dvt/gant_chart_pivot_table.htm) and created the master-detail page, guage,gantts chart,pivot table . Now i am looking at the opportunity of calling this application in Forms Builder, so that when i click on a buttoun i can see the Gantt chart or Map or Pivot table i created in Jdeveloper.
Does anyone have any idea? Pls can you give me a step by step know-how of the solution?

Thanks..

Comments

Timo Hahn

A change in the DB will only be visible in the app when you execute the query behind the VO again. A simple refresh or auto-refresh will not do as the db will not trigger any update to the sessions using the table.
There is something named ActiveData that should implement your use case, but to my knowledge, it's not a good solution (if it's working at all).
The question is why do you need this use case at all? The framework will notify the user that the row has changed in the db and you try to change the same row in the app and try to save it to the db.
You can add a button that will execute the query of the VO again and to show the user the current changes in the db.

Timo

dvohra21

10.4.7 How to Automatically Refresh the View Object of the View Accessor
If you need to ensure that your view accessor always queries the latest data from the lookup table, you can set the Auto Refresh property on the destination view object. This property allows the view object instance to refresh itself after a change in the database. The typical use case is when you define a view accessor for the destination view object.
Because the auto-refresh feature relies on the database change notification feature, observe these restrictions when enabling auto-refresh for your view object:
The view objects should query as few read-only tables as possible. This will ensure the best performance and prevent the database invalidation queue from becoming too large.
The database user must have database notification privileges. For example, to accomplish this with a SQL*Plus command use grant change notification to <user name>.
When these restrictions are observed, the refresh is accomplished through the Oracle database change notification feature. Prior to executing the view object query, the framework will use the JDBC API to register the query for database notifications. When a notification arrives, the row sets of the corresponding view object instance are marked for refresh during the next checkout of the application module. Because the shared application module waits until the next checkout, the row set currency of the current transaction is maintained and the end user is not hampered by the update.
For example, assume that an LOV displays a list of zip codes that is managed in read-only fashion by a database administrator. After the administrator adds a new zip code as a row to the database, the shared application module detects a time when there are no outstanding requests and determines that a pending notification exists for the view instance that access the list of zip codes; at that point, the view object refreshes the data and all future requests will see the new zip code.
To enable auto-refresh for a view instance of a shared application module:
In the Application Navigator, double-click the view object that you want to receive database change notifications.
In the overview editor, click the General navigation tab.
In the Property Inspector expand the Tuning section, and select True for the Auto Refresh property.
https://docs.oracle.com/cd/E16162_01/web.1112/e16182/bclookups.htm#ADFFD1622
It’s not enough to simply re-execute the master view object as it will not refresh the query collections of the child row sets. Leading to the possibility of out dated data cached earlier to be visible in the af:tree shown to the end user. To avoid such data inconsistency its necessary to refresh the child nodes as well, simply done by retrieving their respective row sets and refreshing them using the execute query.

Eric v.M.
Answer

Before getting lost in Auto Refresh and Active Data features, have a look at the basics:
In the screenshot you posted I see an update statement. However, I don't see any commit statement. Maybe the sql tooling you're using operates in some auto-commit mode, I don't know. But if not, your change is not committed and will not be visible in any other session at all.

Marked as Answer by User_7TK0D · Sep 12 2022
dvohra21

Is auto commit not selected? Select Tools>Preferences. In the Preferences dialog, select Database>Advanced, and select the Autocommit checkbox if not already selected.

image.png

User_7TK0D

@eric-v-m @dvohra21 @timo-hahn1 thanks for helping me! the commit statement works!

1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 25 2008
Added on Aug 27 2008
3 comments
442 views