Pages

Tuesday, August 5, 2014

Uploading Large Files to UCM - af:inputFile Component

This post covers uploading large files to UCM using inputFile Component.

JDeveloper Version : Studio Edition Version 11.1.1.7.0

Recently I was working with af:inputFile Component trying to upload files to UCM. I hit an issue when trying to upload files larger than 2MB. I am going to share my findings :

1. InputFile component gets stuck if trying to upload large file... and it doesn't even allow to select other small file once it is stuck. I searched google and found this :

Andrejusb Blog - Oracle UCM 11g uploading large files


Set this parameter "org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE" = 20971520 in  web.xml for upload up to 20 MB.{ maximum file upload size to 20971520 bytes, or divided by 1024 and one more time by 1024 - 20 MB }

2. Now again question is - what happens after that 20MB file ... inputFile Component gets stuck. Further digging found that it is component bug and patch is available.

Dowload and apply Patch : 15931140 

Enjoy !!

Wednesday, May 28, 2014

Error Message html formatting

How to apply HTML formatting to error message

In my earlier post, I explained how to show error messages programmatically. This post covers how to apply HTML formatting to error messages. Credits to Ashish Awasthi's blog for this one. 




Enjoy...

Monday, March 31, 2014

Showing Error Message programmatically

How to show error message programmatically


ADF Faces uses the standard JSF messaging API. JSF supports a built-in framework for messaging by allowing FacesMessage instances to be added to the FacesContext object using the addMessage(java.lang.String clientId, FacesMessage message) method. 

Error Message can be shown inline using af:messages and setting inline property to false.

Code to show error Message :

Following types of error messages can be shown : 


Component-Level Message : 
These messages are associated to a specific component based on the clientID parameter passed to addMessage method. 

Global-Level Message : 
These messages are not associated to any component and null is passed for clientID parameter to addMessage method. 

Sample app can be download from here.  Enjoy !!!