Hi,
I have the following function, and I would like to write to the page instead of the println. How can I do that? I need a table with that information in my page, But I did't find any information about that, I saw how to write collections to the page, but I would rather prefer write to the page on the fly.
Thanks in advance and I hope for your response.
def tablaAmortizacion(xhtml:NodeSeq,monto:Double,amort:Double,start:java.util.Calendar) {
var formatter = new java.text.SimpleDateFormat("dd/MM/yyyy")
var end = new java.util.GregorianCalendar()
end.setTime(start.getTime)
end.add(java.util.Calendar.MONTH,1)
var difference = Math.abs(start.getTimeInMillis - end.getTimeInMillis)
var days = difference / (1000 * 60 * 60 * 24)
println("Monto sal: " + monto + " Amortizacion: " + amort + " Start: " + formatter.format(start.getTime) + " End: " + formatter.format(end.getTime) + " Days: " + days)
if (monto > amort) {
tablaAmortizacion(xhtml,monto-amort,amort,end)
}
}
Fernando Avalos.