Showing posts with label ADF. Show all posts
Showing posts with label ADF. Show all posts

Thursday, January 16, 2014

ADF Exception Handling - Taskflow, Controller, Model

Exception handling in ADF can be done at following three places:
a. Taskflow Exception Handler
b. Extending Controller level ExceptionHandler - for controller level exceptions
c. Extending DCErrorHandlerImpl- for model

  • Whenever there is an exception in model layer it is being handled by custom class extending DCErrorHandlerImpl.
  • Exception in ADF Controller can be handled by creating a custom class extending Controller level ExceptionHandler.
  • If an exception rethrown from above, it can be handled at TaskFlow level exception handler which can be a view activity, router or a method call.
One by one let`s discuss all of them:

Sunday, January 5, 2014

ADF integration with Jasper Report

In this post i am just posting a few important steps and code snippet which can be helpful to integrate with Jasper Reports for generating a pdf or an excel.


You need add the following jars from /modules/ext folder of Jasper Reports in your ADF project(fonts related jar need to be added if you are using some specific fonts in your jrxml):

Make sure to add above jars from Add Jar/Directory and not through Add Library, otherwise you will get the following error:
<ActionListenerImpl> <processAction> java.lang.ClassCircularityError: net/sf/jasperreports/engine/JRException
javax.faces.el.EvaluationException: java.lang.ClassCircularityError: net/sf/jasperreports/engine/JRException

Wednesday, December 25, 2013

ADF - Java Mail with attachments

First create a mail session in weblogic server. In Weblogic server under "Services" you can find Mail sessions. Create a new Mail Session. Give following information:
Name - test
JNDI Name - mail/test
Java Mail Properties
mail.smtp.password=[password]
mail.debug=false
mail.smtp.user=[user name]
mail.from=xx-do-not-reply@abc.com
mail.smtp.host=[host name or IP of exchange server]
mail.smtp.auth=false
mail.smtp.port=25
mail.verbose=false
mail.disable=false
mail.transport.protocol=smtp


The following java method can be called to send mail with attachments

destination - array of email addresses to which mail has to be sent
subject - subject of mail
content - body of mail
data - list containing byte[] of the files to be attached in the email
fileNames - names of the attachement
contentTypes - content types of the attachments


ADF - setting default value for Range Slider

When using a range slider if you put minimum=0 and maximum=10000 then it will look like this :

            <af:inputRangeSlider value="#{bindings.area.inputValue}"
                                 shortDesc="#{bindings.area.hints.tooltip}"
                                 label="#{bindings.area.hints.label}"
                                 required="#{bindings.area.hints.mandatory}"
                                 id="irs1" autoSubmit="true" majorIncrement="-1"
                                 minorIncrement="-1" minimumIncrement="100"
                                 maximum="10000" partialTriggers="cil3" styleClass="selectField"
                                 animationInterval="0"
                                />



ADF - Showing UCM Images in carousel

I had an interesting requirement where we are showing all the available properties in a list view(new feature in 11.1.1.7). Each row of a list view has a carousel. Carousel will show images of the concerned property. The images are residing in UCM. Whenever a new image is uploaded in UCM automatically the carousel will include the new image as well.




Now i will explain how we have implemented the same.

ADF mobile - Setting Up

ADF Mobile – Setting up
1.     Downloads:
  • ADF Mobile support is available from Jdeveloper 11.1.2.3.0 onwards. It can be downloaded from here. Download Jdev 11.1.2.4
  • ADF Mobile Developer`s guide can be downloaded from here.                                                                       
  • Android SDK can be downloaded from here. Android SDK contains a set of API libraries and tools to build test and develop Android Apps.