Tuesday, June 25, 2019

Get Property values using JSP code in IBM Sterling

Get Property values using JSP code

String viewProperty1   = YFCConfigurator.getInstance().getProperty("yfs.ui.MaxRecords");
String viewProperty2   = YFCConfigurator.getInstance().getProperty("yfs.file.encoding");
String viewProperty3   = YFCConfigurator.getInstance().getProperty("yantra.app.maxrecords");
String viewProperty4   = YFCConfigurator.getInstance().getProperty("yfs.uidev.refreshResources");
String viewProperty5   = YFCConfigurator.getInstance().getProperty("yantra.statistics.collect");
String viewProperty6   = YFCConfigurator.getInstance().getProperty("yfs.heartbeat.refresh.interval");
String viewProperty7   = YFCConfigurator.getInstance().getProperty("yfc.ui.ListPageSize");
String viewProperty8  = YFCConfigurator.getInstance().getProperty("yfs.bundleProperties.multipleLoad");
String viewProperty9  = com.yantra.yfc.ui.backend.util.Util.getInstance().getProperty("yfs.bundleProperties.multipleLoad");

System.out.println("yfs.ui.MaxRecords:"+viewProperty1);
System.out.println("yfs.file.encoding:"+viewProperty2);
System.out.println("yantra.app.maxrecords:"+viewProperty3);
System.out.println("yfs.uidev.refreshResources:"+viewProperty4);
System.out.println("yantra.statistics.collect:"+viewProperty5);
System.out.println("yfs.heartbeat.refresh.interval:"+viewProperty6);
System.out.println("yfc.ui.ListPageSize:"+viewProperty7);
System.out.println("yfs.bundleProperties.multipleLoad:"+viewProperty8);
System.out.println("yfs.bundleProperties.multipleLoad:"+viewProperty9);

viewProperty8  & viewProperty9 fetch same value in two different ways.
i. YFCConfigurator.getInstance().getProperty
ii. com.yantra.yfc.ui.backend.util.Util.getInstance().getProperty

Output:
yfs.ui.MaxRecords:300
yfs.file.encoding:UTF-8
yantra.app.maxrecords:5000
yfs.uidev.refreshResources:Y
yantra.statistics.collect:Y
yfs.heartbeat.refresh.interval:10m
yfc.ui.ListPageSize:35
yfs.bundleProperties.multipleLoad:Y

yfs.bundleProperties.multipleLoad:Y

No comments:

Post a Comment

Popular Posts