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…
Author: Danas Tarnauskas
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); …
How to output text with line breaks in ADF ?
Problem Suppose you have multinline (i.e. af:inputText) text field. User fills form by entering some multiple lines in there. Later on you have to display this text in readonly form. You can do this for sure by just adding attribute readonly=”true” or using af:outputText component. Just one issue pops out – there is no multiple lines which user entered –…
How to pass parameter to method using expression language (EL) in ADF?
Apparently there is not possible to pass a parameter to java method using expression language. But there is a workaround! It is possible to use Map as a return type for method. Here is sample how we play around this requirement by using Map: Suppose that we need to print text with line break symbols replaced with HTML <br> tags…
Introduction to ADF. Mindmap of major topics.
Recently had a pleasure to introduce Oracle ADF to participants of Kaunas Java Users Group. Mindmap of major topics presented can be downloaded here.