blob: e1f6f16617e7228afa5e24ac4c7c9aa3d5df05db [file] [log] [blame]
<!--">
<#assign licensePrefix = "">
<#assign licenseLast = "-->
<!--<#assign licenseFirst = "-->
<!--">
<#include "${project.licensePath}">
-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>${TR_displayName}</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div>
<section data-bind="step: { 'id' : 'init', text : 'Initial Page'}" >
<p>
在可移植 HTML 中编写 UI 并且在 NetBeans 或 Web 上显示! 阅读<a href="http://wiki.netbeans.org/HtmlUIForTemplates">我们的 wiki</a> 以了解详细信息...
</p>
</section>
<section data-bind="step: 'info'" >
<p>
使用 <a href="http://knockoutjs.com">knockout.js</a> 绑定以将您的视图模型与 HTML 页的实际外观分隔开。将您的视图绑定到使用 Java 或 JavaScript 编写的模型。
</p>
<h3>是否一切正常?</h3>
<input type="checkbox" data-bind="checked: ok"/>
<h3>您感觉如何?</h3>
<input type='text' data-bind="textInput: msg"/>
</section>
<section data-bind="step: 'targetChooser'">
<!-- placeholder section for providing default location chooser
you can also use "step: 'targetChooser:java'" to request
chooser showing list of packages
-->
</section>
<section data-bind="step: { 'id' : 'summary' }" >
<p>
您觉得<span data-bind="text: msg"></span>! 现在我们继续创建文件, 该文件将使用 <a href="http://freemarker.org/">Freemarker</a> 模板引擎以及在此向导中填充的值来表现出您的真实感受。
</p>
</section>
</div>
<#if HTML4J> <#else>
<script>
function init() {
var msg = ko.observable();
var current = ko.observable();
var ok = ko.observable();
return {
'current' : current,
'errorCode': ko.computed(function() {
if (current() === 'info') {
// checking the input fields
if (!ok()) return 1;
if (!msg()) return 2;
}
// no errors
return 0;
}),
'ok' : ok,
'msg' : msg
};
}
</script>
</#if>
<!-- display the error message -->
<div data-bind="visible: errorCode() === 1" style="color: red">
请选中“确定”复选框!
</div>
<div data-bind="visible: errorCode() === 2" style="color: red">
请填写输入字段!
</div>
</body>
</html>