AnsweredAssumed Answered

usage of model in ftl

Question asked by jeyaa on Dec 8, 2010
Latest reply on Dec 9, 2010 by jeyaa
Hi all,
I am a newbie and working in javascript/ftl. I have written some code in javascript where it get the contents according to its created date. Now in my ftl, i have to show up date wise.

importPackage(Packages.java.util);
importPackage(Packages.com.kpub.web.bean.action);

var report = new ReportGeneration();
var curDate = new Date();

var fdate = report.getFromDate()+"T00:00:00";
var tdate = report.getToDate()+"T00:00:00";

//var spath="'+PATH:\"/app:company_home//*\" + ";

var qdate = "@cm\\:created:[" + fdate + " TO " + tdate +"]'";
var node = search.luceneSearch(qdate);
var nodeList = report.count(node);

model.resultset = node;
model.status = nodeList;

Now I have to create a array of dates from fdate to tdate. And i have to pass it to ftl.

How do i send it to ftl?. Which model attribute I should set for that array?.
Since i don have enough documentation to go through this,
I need to know what are all the attributes present in "model"??.

Outcomes