Friday, October 7, 2016

Access input file filename in MEC Map


One of my customer had a requirement to add condition inside MEC mapper depending on the name of the file received. I have checked existing classes provided by MEC and observe that MEC has  a function as getManifestInfo() to retrieve metadata information.



Code example:

String fileName  =  getManifestInfo(ManifestConstants.COM_FILENAME);

cat.info("File Name" + fileName);

Sunday, July 17, 2016

How to disable DatePicker using Jscript

My friend had a requirement disable a DatePicker, He has tried several options

image

But this property only disable DatePicker textbox. User can change date using calendar dropdown.

There is a property CanEdit. Developer can use CanEdit property to disable.

image

image

 

1. Sample Code :

image

2. With Readonly property

image

var content : Object = controller.RenderEngine.Content;
// TODO Add your code here
var wapudt =  ScriptUtil.FindChild(content, "WAPUDT");
wapudt.IsReadOnly = true;

3. With CanEdit,CanSelect property

var content : Object = controller.RenderEngine.Content;
// TODO Add your code here
var wapudt =  ScriptUtil.FindChild(content, "WAPUDT");
wapudt.CanEdit = false;
wapudt.CanSelect = false;

 

Technorati Tags: ,,,,