Skip to main content

Posts

Showing posts from July, 2014

Exposing View Objects from ADF Library as Web Service

While working on large projects, you may split business components among multiple projects to improve the modularity and re-usability of the code. Obviously you can share business components between multiple model projects by packaging them in ADF library. While doing so, you may want to expose view objects from an ADF library as web service through an application module that reside in a consuming project. Though this is pretty straight forward task, you need to be aware of one point while packaging view objects in ADF library that may be later exposed as web service from another project. The point here is that,  you need to generate Service Data Object for view object  in the owning project itself. In other words you cannot expose view objects from ADF library as web service  if the view objects in ADF library are not having Service Data Object generated.
To generate SDO for a view object:

Go to the project that you want to share as ADF library.Open the view object in the editor. Cho…

Error while deploying MAF app to android - Cannot run program "adt-bundle-windows-x86_64-20140321\sdk\tools\zipalign"

In case, if you hit the below error while deploying MAF application to android device, this post is for you.

[12:11:31 PM] Cannot run program "xxx\adt-bundle-windows-x86_64-20140321\sdk\tools\zipalign"": CreateProcess error=2, The system cannot find the file specified
[12:11:31 PM] CreateProcess error=2, The system cannot find the file specified

When generating an deployable artifact(apk), JDeveloper uses zipalign.exe that comes with ADT. This used to be located in /sdk/tools, but (with latest ADT release) it is now located in /sdk/build-tools/ folder. A quick work around (till the fix is available in Jdev) for the above issue is to copy the appropriate  zipalign.exe to /sdk/tools folder.

af:codeEditor - ADF Faces Component for Displaying XML, Groovy, JavaScript and Text

I'm not really sure how many of you have noticed af:codeEditor component that comes with ADF Faces. If you have note, see this demo: http://jdevadf.oracle.com/adf-richclient-demo/faces/components/codeEditor.jspx
This UI component  allows you to view or edit content or program code in  text, xml, javascript or groovy at run time. It has also support for adding content validations. See the sample in Oracle ADF Faces Components Demo source ( see codeEditorMessaging.jspx and DemoCodeEditorMessagingBean.java ) which can be downloaded from here:
http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html

Enabling ADF Faces Application for Functional Testing

If you want to perform functional testing of ADF Faces application with tools such as Oracle Application Test Suite(see this blog), you may want to set few parameters in web.xml and one in trinidad-config .xml

Add the following context parameters in web. xml :
<context-param><param-name>oracle.adf.view.rich.automation.ENABLED</param-name><param-value>true</param-value></context-param><context-param><param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name><param-value>true</param-value></context-param><context-param><param-name>javax.faces.PROJECT_STAGE</param-name><param-value>SystemTest</param-value></context-param>
In trinidad-config. xml add the following:
<animation-enabled>false</animation-enabled>

Java Bean DC extension for JDeveloper with declarative search capability

A while back I blogged about extending Java Bean Data Control to add some useful  features such as declarative view criteria support. If you have not  seen it , here is the link: http://www.jobinesh.com/2014/01/customizing-pojo-based-bean-data.html

In this post I'm sharing the same solution as JDev extension. With  this extension, you can leverage the built-in editor support for building view criteria for a Bean DC (even if it's model is not backed up by JPA). You may also see the view criteria displayed in data control palette as in case of JPA based Bean DC.  In nutshell,this extension lifts your POJO based bean data control  to the level of JPA based bean DC.
What is the JDev version supported by BeanDCExtension?  This is built using 12.1.3.0.0 release.  How to use this extension? Step 1. Down load the extension https://svn.java.net/svn/adf-samples~jobinesh/zipped-src/BeanDCExtension.zip Ste 2: Open JDeveloper 12.1.3.0.0  Ste 3: Go to Help > Check for Updates. Choose Insta…