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.
How to get LOV value instead of index when it is used in “selectOneChoice” component in the table row?
When using LOV’s, a common issue in ADF is to get selected value instead of index when LOV is used to render for example “selectOneChoice” component. I’ve faced it when “selectOneChoice” was used in table. That means every row in table can have different selection of LOV values. Thus we can’t rely on iterators current row and simply to access…
How to make selectManyShuttle component work with nested table?
ADF can pretty easy handle Oracle DB nested tables in its components. In this post I will describe how it works with selectManyShuttle. Probably a similar behaviour can be used with other list components as well. I will use departments and employees tables of HR schema. Will create new column in departments with type of nested table. Then fill-in this…
JBO-25058: Definition vc_temp_1 of type Variable is not found in …
“JBO-25058: Definition vc_temp_1 of type Variable is not found in …”. What can be the reason? ADF creates/reuses application module (AM) instance for each user request. It is passivated (saved) after each HTTP request (if configured accordingly). When in application there are used some queries with view criteria, filter variables are passivated for according AM as well. During the next…
How to create XMLIndex? When its worth to use it?
How to create XML index? Very general way with all default applied as follows: create index index_name on table_name (xmltype_column) indextype is xdb.xmlindex; Check the name of PATH table select path_table_name from user_xml_indexes where table_name = ‘table_name’ and index_name = ‘index_name’; Check what secondary indexes are used select c.index_name, c.column_name, c.column_position, e.column_expression from user_ind_columns c left outer join user_ind_expressions…
How to enable tracing in Oracle DB? How to read trace files?
There are many ways to enable tracing in Oracle DB, some are legacy and deprecated. One of latest and recommended method for 11gR2 – use of DBMS_MONITOR (find out more about it in Oracle reference) package. To enable whole instance tracing: execute dbms_monitor.database_trace_enable(waits => true, binds => true, instance_name => ‘instance_name’); To disable whole instance tracing: execute dbms_monitor.database_trace_disable(instance_name => ‘instance_name’);…
ADF “Select many shuttle” (af:selectManyShuttle) component does not show all items in the leading list
ADF “Select many shuttle” does not populate all items available in binded iterator. I don’t know whether this is a bug or some other reason, but af:selectManyShuttle in the leading list populates just no more items then defined in the “RangeSize” property of iterator. To my mind it supposed to fetch all items in iterator in bunches of %RangeSize%…
How to escape special symbols in Oracle SQL, PL/SQL (i.e. “&”)?
For escaping “&” or other special symbols in SQL or PL/SQL use function utl_i18n.escape_reference(string_needed_to_escape): select UTL_I18N.ESCAPE_REFERENCE(‘Here is my special symbol: ‘||chr(38)) from dual Example returns “Here is my special symbol: &“