JavaServerFaces: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K (hat „JSF“ nach „JavaServerFaces“ verschoben) |
|||
Zeile 1: | Zeile 1: | ||
[[Kategorie:Framework]] | [[Kategorie:Framework]] | ||
[[IceFaces]] | |||
==Einbinden von JS-Dateien== | ==Einbinden von JS-Dateien== | ||
Dateibaum: | Dateibaum: | ||
Zeile 12: | Zeile 13: | ||
<body< | <body< | ||
<h:outputScript library="js" name="myice.js" /> | <h:outputScript library="js" name="myice.js" /> | ||
</pre> | |||
== Dump eines DOM-Knotens == | |||
<pre> | |||
function dumpNode(node, level){ | |||
var indent = ""; | |||
for (var ii = 1; ii <= level; ii++) | |||
indent = indent + " "; | |||
var rc = indent + "Tag: " + node.tagName + "\n"; | |||
if (node && node.hasChildNodes()){ | |||
var child = node.firstChild; | |||
while(child){ | |||
rc = rc + indent + dumpNode(child, level + 1); | |||
child = child.nextSibling; | |||
} | |||
} | |||
while(node){ | |||
node = node.nextSibling; | |||
if (node) | |||
rc = rc + dumpNode(node, level); | |||
} | |||
return rc; | |||
} | |||
</pre> | </pre> |
Version vom 23. Januar 2013, 23:03 Uhr
Einbinden von JS-Dateien
Dateibaum:
- webapp
- WEB-INF
- resources
- js
- common.js
- js
XML-Code:
<body< <h:outputScript library="js" name="myice.js" />
Dump eines DOM-Knotens
function dumpNode(node, level){ var indent = ""; for (var ii = 1; ii <= level; ii++) indent = indent + " "; var rc = indent + "Tag: " + node.tagName + "\n"; if (node && node.hasChildNodes()){ var child = node.firstChild; while(child){ rc = rc + indent + dumpNode(child, level + 1); child = child.nextSibling; } } while(node){ node = node.nextSibling; if (node) rc = rc + dumpNode(node, level); } return rc; }