]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/slc/web/components/XmlRenderer.js
1 qx
.Class
.define("org.argeo.slc.web.components.XmlRenderer",
3 extend
: qx
.ui
.table
.cellrenderer
.String
,
6 *****************************************************************************
8 *****************************************************************************
14 _getContentHtml : function(cellInfo
) {
15 var xmlNode
= cellInfo
.rowData
;
19 xPath
= "param[@name='testName']";
20 var nameParam
= qx
.xml
.Element
.selectSingleNode(xmlNode
, xPath
);
21 var value
= qx
.bom
.String
.escape(qx
.dom
.Node
.getText(nameParam
) || "Not Found");
24 xPath
= "param[@name='date']";
25 var nameParam
= qx
.xml
.Element
.selectSingleNode(xmlNode
, xPath
);
26 var value
= qx
.bom
.String
.escape(qx
.dom
.Node
.getText(nameParam
) || 0);
27 var splits
= value
.split(".");
28 var dateFormat
= new qx
.util
.format
.DateFormat("yyyy-MM-dd HH:mm:ss");
30 var date
= dateFormat
.parse(splits
[0]);
31 var dateFormat2
= new qx
.util
.format
.DateFormat("MMM d, yy HH:mm:ss");
32 return dateFormat2
.format(date
);
34 qx
.log
.Logger
.info(e
);
46 _getCellClass : function(cellInfo
) {
47 return this.base(arguments
, cellInfo
);