The encoding is actually done in the FTL file. By default all "String"
objects are encoded for reasons of security and so that special
characters don't get interpreted as HTML.
In cases like this where we don't want encoding the easiest way around
it is to change it to not be a String object and there is a little
utility method for that: StringUtil.wrapString(). Basically just do
something like the following:
${StringUtil.wrapString(productPromo.promoText?if_exists)}
-David
On Jun 29, 2009, at 1:22 AM, farouk alhassan wrote:
I have found out why the Gantt Chart does not work(in my revision
and on the 904demo)
The problem is that, OFBiz is generating Items like this out of the
tasklist in gantChart.ftl
g.AddTaskItem(new
JSGantt.TaskItem(9102,"task1","12/03/2007",
"12/05/2007","009900",
"/
;projectmgr/control/taskView?workEffortId=9102", 0 ,
"16.0 Hrs", 0 , 0, 9101, 1));
if I change the above statically to this
g.AddTaskItem(new JSGantt.TaskItem(9103,"task2","12/05/2007",
"12/16/2007","009900", "/projectmgr/control/
taskView?workEffortId=9103", 0 , "24.0 Hrs", 0 , 0, 9101, 1,
9102));
the, the chart displays nicely.
Tracking it back to the code, I found these in GantChart.groovy
taskInfo.estimatedStartDate =
UtilDateTime.toDateString(taskInfo.estimatedStartDate, "MM/dd/yyyy");
taskInfo.estimatedCompletionDate =
UtilDateTime.toDateString(taskInfo.estimatedCompletionDate, "MM/dd/
yyyy");
I however can't seem to find a method on UtilDateTime that will
avoid the encoding.
Whiles I can produce the patch, I think this is very trivial and
should be fixed by an OFBiz Committer so it can go into the right
branches and whatever is involved in making a change.
Regards
Farouk A
--- On Tue, 16/6/09, Torstein Hegbom <[email protected]> wrote:
From: Torstein Hegbom <[email protected]>
Subject: Gant-chart
To: [email protected]
Date: Tuesday, 16 June, 2009, 11:36 AM
I am testing the project manager application.
It seems to me that the project manager application gantt-diagram
does not
display correctly.
Am I wrong? It seems that the duration is not correctly calculated.
Look at the following link:
https://demo904.ofbiz.org/projectmgr/control/ganttChart?projectId=9000
Thanks,
Torstein Hegbom