Friday 17 February 2017

i18N report xls

i18N report.. obviously the name say the meaning.. but the task is simple, the header in the report will be in english, but that should come from database.

* Initially thought of hitting db and taking a query and have 3 classes, 1 with list<reportvalue>, reportHeaderObject putting this object into another object say ReportObj. This !dea suggested by my Tech Lead, thanks. very good suggestion. while implementing another !dea hit in mind.

* Instead of creating new classes, set the value directly into the model, when we creating a variable. Think, you didn't got my point. let me clarify..

we have a cron/scheduler which will run every 15/30 mins, hit the database and update the properties file, that file we are using for i18N translation. My !dea is, instead of hitting to the db again, take the value directly from this properties file. googled..




ResourceBundle rb = ResourceBundle.getBundle("test.bundletest.mybundle");
String value = rb.getString(key);
with this, half of my task was over.. 

the second half is, how to set this object in the UI ?

saw the code, implemented by my colleague(obviously, on leave, enjoying weekend). Njoy Ramesh :D

PURE JAVASCRIPT (O _ O), however understandble.. 

changed in some places, get my object, set that as column header, BiNgOoo



No comments:

Post a Comment