Tag Archives: JDeveloper

How To in Jdeveloper ADF Tutorials – get the selected table rows


This is a useful handy code to get the selected rows for the table.

What it does:

  • Get handle to the table using the JSFUtils find component method with the table id passed as a parameter
  • Get the selectedRowKeys for the table
  • Iterate through the rowkeys
  • Get the rowkey from the iterator
  • Add the rowkeys into a list
  • return the list to the caller

This method takes the table id as the parameter


private List getSelectedList(String tableName) {
RichTable rt = (RichTable)JSFUtils.findComponentInRoot(tableName);
RowKeySet keySet = rt.getSelectedRowKeys();
Iterator iter = keySet.iterator();
iter = keySet.iterator();
List list = new ArrayList();
while (iter.hasNext()) {
list.add(iter.next());
}
return list;
}

Usage:

This method is used to check if any rows are selected for the particular table. The method returns the rowkeys of the rows selected if there are any rows selected for the table

How to in Jdeveloper ADF Tutorials – Parameters for Jdeveloper ADF


Ever wonder what are this entries that gets added to the adf url in the addressbar like

afrWindowId=null&afrWindowMode=0&_adf.ctrl-state=qkx3a0o59

These are all the parameters for adf that to maintain the user session

_afrLoop – This is a unique identifier which is used to determine if the current window is new or not. This is used by ADF Faces Javascript. This entry is used as a token for the Loop Script

_afrWindowMode – This is a unique identifier which is used to determine if the current window is new or a dialog. This is used by ADF Faces intself to identify the mode

_afrWindowID – unique identifier assigned by the WindowIdProvider for ADF Faces to identify the current borwser window on the client and server For adf applications, ADF contoller supplies the WindowIdProvider

_adf.ctrl-state – This is the token provided by ADF controller to identify the current user state. This token is used to retrieve the user state within the task flow.

jsessionid – This is a cookie provided by the Weblogic Application server to uniquely identify the HTTP Session. This is passed as a token intially and stored in the cookie later

How to in Jdeveloper ADF Tutorials – UCM connection from Jdeveloper


When you connect to ucm from jdeveloper if you face problem in connecting then its worth to check the ip filter of the ucm connection in em console.

How to in Jdeveloper ADF Tutorials- Add your own Tip


Have your own Tip in jdeveloper

if you want to add your own tip to Jdeveloper then follow

close Jdeveloper
1) go this location – ${MIDDLEWARE_HOME}\jdeveloper\jdev\doc\studio_doc\ohj\tip.jar


2) create a html file – tip_11_0460.html (just increase the number for eg : tip_11_0470.html)
3) create an image file in images folder if you want to refer this in your html tip – tip_11_0470.gif
4) have your html registered in – tip_map.smp

 <map>
 <mapID target="tip_11_0470_html" url="tip_11_0470.html"/>
 </map>

open Jdeveloper

How to in Jdeveloper ADF Tutorials- Get the taskflowBinding in the code



BindingContext bctx = BindingContext.getCurrent();

DCBindingContainer binding= (DCBindingContainer) bctx.getCurrentBindingsEntry();

DCTaskFlowBinding tf = (DCTaskFlowBinding) binding.findExecutableBinding("taskflow1");

How to in Jdeveloper ADF Tutorials- Solve No JDBC Connection Error


If you happen to get the JDBC Connection error when you run the Application Module then make sure to check the adf-config.xml property jbo.SQLBuilder which should point to the correct database.

Also check the jbo.sql92.driverclass property for the AM Configuration to refer the class relevant to the DB

ADF Resources and Learning


ADF Resources to learn
https://blogs.oracle.com/shay/entry/how_do_i_start_learning_oracle_adf_and_jdeveloper
also
http://download.oracle.com/tutorials/jtcd3/ecourse_adf_part1/html/temp_frameset/index.htm
http://www.oracle.com/technetwork/indexes/samplecode/index.html
http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm
http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html

Jdeveloper Design Time issue fix


In Jdeveloper 11.1.2 we often see that the designer is going off and looks clumsy without the ‘WYSIWYG’ feature during the design time. The jspx or jsff designer in Jdeveloper will show as

To fix this we directly go and delete this directory o.j2ee.jsplib in

C:\Documents and Settings\ USER_NAME\ApplicationData \JDeveloper\system11.1.2.0.38.60.17

Thanks to the blogger

For other version, if the file or folder does not exist then go to o.j2ee and delete or move – jsp-faces-tags-cache.xml and jsp-libraries.xml. Also delete .wlLib folder if it exists. If nothing works delete the system folder.

also make sure that the ‘Execute Tags in JSP Visual Editor’ is checked for adf components

updates from a collegue
If you have a class reference in your application folder that cannot be loaded this problem might occur

possible fixes

change

oracle.adf.view.rich.security.FRAME_BUSTING
<param-value>differentDomain</param-value>

To:

<param-name>org.apache.myfaces.trinidad.security.FRAME_BUSTING</param-name>
<param-value>differentOrigin</param-value>

or

change the class .adf/META-INF/services/oracle.adf.view.rich.context.ExceptionHandler
or rename this file oracle.adf.view.rich.context.ExceptionHandler

Jdeveloper 11.1.1.6 released


Jdeveloper 11.1.1.6 released..

http://www.oracle.com/technetwork/developer-tools/jdev/index-088099.html

Referring custom libraries in jdev 10.1.3.4


I recently happened to work on jdeveloper 10.1.3.4 and was given a task of bringing up the server. The project was using the custom libraries which the embedded oc4j was complaining that it could not find saying

Caused by: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.ibm.as400.access.AS400JDBCDriver
 at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:283)
 at oracle.oc4j.sql.DataSourceConnectionPoolImpl.<init>(DataSourceConnectionPoolImpl.java:108)
 at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:99)
 … 13 more

This was very challenging for me because this is the first time I ran an ADF application on Jdeveloper 10g. I searched on the forum with this error and could easily find that the fix is to copy the library to

..\jdevstudio10134\j2ee\home\applib

This is just for information as this could be helpful for newbie who is still working with Jdeveloper 10g