ADF, Continuous Query Notification, JDeveloper

Override inputListOfValues component model and Continuous Query Notification sample in ADF

Requirement: Standard ADF inputListOfValues component should behave like this: When pressed “Search”, action should stop and wait untill any change happen in DB table being searched When change happen in DB table, search should resume among updated data. If no change happen it should resume after 10 seconds timeout In addition – search input field validation should happen on “Search”…

Continue Reading

ADF

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…

Continue Reading

ADF, JDeveloper

How to iterate through all view object rows irrespective of specified range size and without impact to current rowset?

ProblemImagine 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 ! DCIteratorBinding it = (DCIteratorBinding)BindingContext.getCurrent().getCurrentBindingsEntry().get(“EmployeesViewIterator”);RowSetIterator rsi = it.getViewObject().createRowSetIterator(null);   while (rsi.hasNext()) {     Row row = rsi.next());   …

Continue Reading

ADF

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…

Continue Reading

ADF, ADF Exceptions

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, Database, SQL and PL/SQL

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);      …

Continue Reading

ADF

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 –…

Continue Reading