除了currentTasks
和workflowHistory
表格之外,我还想添加另外两个表格。我在workflow-form.get.html.ftl
和workflow-form.js
的两个小部件中添加了两个块。我还在.properties
文件中添加了标签映射。工作流程详细信息页面中的自定义表格
的问题是,我的表是在页面的底部总是显示,他们有没有标题:
我也注意到,在历史表的块(与当前表,也有)有一个ID,如:
page_x002e_data-form_x002e_workflow-details_x0023_default-workflowHistory-form-section
我的表没有这样的ID。他们简单地放置在容器是这样的:
<div class="form-element-background-color yui-dt">
我workflow-form.get.html.ftl
的部分:
...
<#-- I added this div for additional table -->
<div id="${el}-finishedBpAttachmentsDetails-form-section" class="workflow-attachments-details">
<h3>${msg("header.finishedBpAttachmentsDetails")}</h3>
<div class="form-element-background-color"></div>
</div>
<#-- And also this div -->
<div id="${el}-finishedBpDetails-form-section" class="workflow-details">
<h3>${msg("header.finishedBpDetails")}</h3>
<div class="form-element-background-color"></div>
</div>
<#-- Will be inserted below "Items" in the form after its been loaded through ajax -->
<div id="${el}-currentTasks-form-section" class="current-tasks">
<a name="current-tasks"></a>
<h3>${msg("header.currentTasks")}</h3>
<div class="form-element-background-color"></div>
</div>
<#-- Will be inserted in the bottom of the form after its been loaded through ajax -->
<div id="${el}-workflowHistory-form-section" class="workflow-history">
<h3>${msg("header.history")}</h3>
<div class="form-element-background-color"></div>
</div>
...
我workflow-form.js
的部分:
...
var finishedBpDetailsDS = new YAHOO.util.DataSource(dsRes,
{
responseType: YAHOO.util.DataSource.TYPE_JSARRAY
});
var finishedBpDetailsContainerEl = Dom.get(this.id + "-finishedBpDetails-form-section"),
finishedBpDetailsTasksEl = Selector.query("div", finishedBpDetailsContainerEl, true);
var finishedBpDetailsColumnDefinitions = [
...
];
this.widgets.finishedBpDetailsTasksDataTable = new YAHOO.widget.DataTable(finishedBpDetailsTasksEl,
finishedBpDetailsColumnDefinitions, finishedBpDetailsDS,
{
MSG_EMPTY: this.msg("label.noTasks")
});
var finishedBpAttachmentsDetailsColumnDefinitions = [
...
];
var finishedBpAttachmentsDetailsDS = new YAHOO.util.DataSource(this.dsAttachmentRes,
{
responseType: YAHOO.util.DataSource.TYPE_JSARRAY
});
var finishedBpAttachmentsDetailsContainerEl = Dom.get(this.id + "-finishedBpAttachmentsDetails-form-section"),
finishedBpAttachmentsDetailsTasksEl = Selector.query("div", finishedBpAttachmentsDetailsContainerEl, true);
this.widgets.finishedBpAttachmentsDetailsTasksDataTable = new YAHOO.widget.DataTable(finishedBpAttachmentsDetailsTasksEl,
finishedBpAttachmentsDetailsColumnDefinitions, finishedBpAttachmentsDetailsDS,
{
MSG_EMPTY: this.msg("label.noTasks")
});
Selector.query(".form-fields", this.id, true).appendChild(finishedBpAttachmentsDetailsTasksEl);
Selector.query(".form-fields", this.id, true).appendChild(finishedBpDetailsTasksEl);
...
如何设置的位置和标题给我表格?..例如,我希望在包含常规信息的块后面显示我的表格。
是否有可能?..
我将非常感激这些信息。谢谢大家。
好极了! # –
这也适用 - 'Selector.query(“.ui-us”,this.id,true).appendChild(...);' –