Requirement We have DB table contents displayed in ADF GUI After changes in that DB table (by anyone else in the background) we want to immediately display in our currenlty open browser session Solution To achieve our goal we need somehow to know when changes in DB happen. Once we know when, need to notify browser session in order it…
How to select all JDBC Database Change Notification Registrations and clean them?
Question: How do I select all database change notifications registered via JDBC driver by my DB user? Answer: select * from user_change_notification_regs Question: How do I clean all of my DB change notifications? Answer: Database change notifications registered via JDBC driver can be deregistered only the same way – using JDBC driver. Therefore you need to execute this code: This…
How to add ADF source code in JDeveloper 12c ?
Problem I want to have ADF source code available in my project. Solution Open service request ticket at My Oracle Support and ask to provide you a source code for ADF. Oracle staff will provide you a security code and a link to download a zip file. Open JDeveloper, select Tools -> Manage Libraries… Click Libraries tab Select folder User…
I get JBO-25200: Application module is not connected to a database exception. What can be the reason?
Problem Time to time “JBO-25200: Application module is not connected to a database” exception is raised while browsing ADF application Solution Tune ADF application module by disabling “Support Dynamic JDBC Credentials”. However this solution may not work in your case, depends on the root cause. Comment If I understand this option correctly, it is needed only when application users must…
How to iterate through all view object rows irrespective of specified range size and without impact to current rowset?
Problem Imagine we have iterator binding EmployeesViewIterator with specified range size 25. But we want to iterate through ALL employees available, not just 25 of current range. Solution Create new row set iterator from EmployeesView view object. It will contain ALL rows irrespective of specified range size. Iterate it !
ADF ViewObject query selects values into wrong attributes?
Problem In the view object result set value of particular attribute has wrong value. It belongs to another attribute of the same view object, usually to previous one in the sequence. Solution Each view object attribute has property “Selected in query”. It must be selected if attribute is fetched using SQL query. If it is not selected and…
Ubuntu vpn connects successfully and shortly thereafter fails – network traffic stops – either VPN and local network
I’ve started to use Ubuntu for my job needs and experienced first pretty annoying challenge with VPN connection. I’m using openvpn client with network manager. After successfull connect to VPN server I can use local and remote networks with no problem. After a while – like 1 -10 minutes , sometimes a bit longer up to couple hours or sometimes…
ADF how to stretch table vertically and horizontally?
How to stretch ADF table vertically to fill maximum available vertical space in browser? Answer: Put table into af:panelStretchLayout component center facet. Put dimensionsFrom=”parent” attribute into af:panelStretchLayout (parent of af:panelStretchLayout component must stretch its children) How to stretch ADF table horizontally to fill maximum available horizontal space in browser? Answer: Put table into af:panelStretchLayout component center facet. Add styleClass=”AFStretchWidth” attribute to af:panelStretchLayout Example: <af:panelStretchLayout…
ADF java.lang.ClassCastException: …ViewRowImpl cannot be cast to …ViewRow ?
For example: java.lang.ClassCastException: model.DepartmentsViewRowImpl cannot be cast to model.common.DepartmentsViewRow JDeveloper, when generating View Object Row client interface sometimes goes wrong with class definition. Such error can be displayed when implementation of class is not defined. In particular error sample – “implements DepartmentsViewRow” is missing in DepartmentsViewRowImpl class: public class DepartmentsViewRowImpl extends ViewRowImpl implements DepartmentsViewRow { … }
ADF method for calling DB procedures, executing other SQL statements with input and output parameters
How to call DB procedure with input and output parameters. Here I provide an example of ADF method which can be used with any number of in/pout parameters used in any order: public void runStatement(String stt, boolean commit, ArrayList<Map<String, Object>> pars) { CallableStatement st = this.getDBTransaction().createCallableStatement((stt), 0); …