PDA

View Full Version : CDF Dinamyc build



rhaces
09-08-2009, 01:19 PM
Hi, I'm creating a set of DIAL charts in CDF, the problem that I have is that I need it dynamically built with today's date. I need to know what day of the week is, and build as many DIALS as days of the week (If its Friday, I need a Dial for Monday, Tuesdaym, Wednesday, Thursday and Friday).

I was thinking of doing it with a jsp as a template but CDF doesn't parse the jsp commands. Then I thought of doing it with javascript, actually this could work, the problem is that javascript is parsed at clients comp. so it uses clients date and if they have a mistaken date, the dashboard will be wrong.

any ideas?

thansk
Rodrigo

pmalves
09-08-2009, 01:46 PM
Use the UTC methods you have on the javascript date object to get the UTC date regardless of client timezone

Then file an improvement for CDF in jira so that we implmement a component that gets the server-side date.

That's important.

rhaces
09-08-2009, 02:11 PM
Use the UTC methods you have on the javascript date object to get the UTC date regardless of client timezone

Then file an improvement for CDF in jira so that we implmement a component that gets the server-side date.

That's important.

With the UTC I will continue having the same problem, since the date is taken from the client, it will tell me the UTC from the client and lets say there could be a time when a client has 1 year delay on his computer, or 5 years delay or whatever, it doesn't matter if I get the UTC or just the date from him, it will be mistaken.

Shure, I'll post it at JIRA, I also would like to post at JIRA for an improvement that let us code in jsp, do you think this is factible? or since the architecture will not allow it?

Thanks for your quick reply!!!

pmalves
09-08-2009, 02:49 PM
Nothing that "allows you to code in jsp" will ever be an improvement! :p

What if we had a component that allowed you to drop code that would be executed server side? Like BSH expressions or server-side javascript code

rhaces
09-08-2009, 03:02 PM
Nothing that "allows you to code in jsp" will ever be an improvement! :p

What if we had a component that allowed you to drop code that would be executed server side? Like BSH expressions or server-side javascript code

LOL!!! Any serverside expression or "coding" would be great. Let me explain what I need. I need that depending of the day of the week, I have as many dial charts as the number of days, so if today is friday, i have Mon. Tues. Wed. Thurs. Frid. All this can be done with javascript but I face 2 problems
1) the date problem I have already asked (JIRA Case already there: http://jira.pentaho.com/browse/CDF-61 )
2) the javascript is parsed at client, so if client has a slow machine he will complain about slow dashboards so i want to be able to do this server side!!!

So, Should I create the JIRA for a "sever-side" scripting capabilities???