1
fr : datbe는 Orbeon XForms 4.0에서 더 이상 사용되지 않으며 버전 4.5에서 릴리스 노트에 따라 제거되었습니다. 우리는 정렬 가능한 테이블을 생성하기위한 구조에 정확히 의존합니다. 그리고 하나의 단일 값보다는 유용한 XML 요소를 얻는 것이 쉬운 곳에서 이벤트를 포착하기 때문에 더욱 강화 된 이벤트가 필요합니다.fr : datatable in Orbeon XForms 버전> = 4.5
fr : 데이터 테이블의 권장 대안은 무엇입니까? 보기 사용 :
<fr:datatable width="100%" scrollable="vertical" height="300px">
<xhtml:thead>
<xhtml:tr>
<xhtml:th fr:sortable="true" fr:sortKey="number(tokenize(@id,'\.')[last()])" fr:sortType="number" fr:resizeable="true">
<xforms:output ref="$resources/id"/>
</xhtml:th>
<xhtml:th fr:sortable="true" fr:resizeable="true">
<xforms:output ref="$resources/issue"/>
</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="@currentStatusCode" fr:resizeable="true">
<xforms:output ref="$resources/status"/>
</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="@priority" fr:resizeable="true">
<xforms:output ref="$resources/priority"/>
</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="@type" fr:resizeable="true">
<xforms:output ref="$resources/type"/>
</xhtml:th>
<xhtml:th fr:sortable="true" fr:resizeable="true">
<xforms:output ref="$resources/date"/>
</xhtml:th>
<xhtml:th fr:sortable="true" fr:sorted="ascending" fr:resizeable="true">
<xforms:output ref="$resources/assigned-to"/>
</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="(assignment|tracking)[1]/string(@labels)" fr:resizeable="true">
<xforms:output ref="$resources/label"/>
</xhtml:th>
</xhtml:tr>
</xhtml:thead>
<xhtml:tbody>
<xhtml:tr repeat-nodeset="instance('issues-instance')/issue[if (string-length(instance('selected-issue-id'))>0) then (tokenize(@id,'\.')[last()]=instance('selected-issue-id')) else (@currentStatusCode=tokenize(instance('selected-status-codes'),' ') and @type=tokenize(instance('selected-issue-types'),' ') and (instance('selected-issue-priorities')='' or @priority=tokenize(instance('selected-issue-priorities'),' ')) and (instance('selected-issue-labels')='' or tokenize(@currentLabels,'\s')=tokenize(instance('selected-issue-labels'),'\s')) and (instance('selected-issue-assignee')='' or (instance('selected-issue-assignee')='#UNASSIGNED#' and string-length(@lastAssignment)=0) or @lastAssignment=instance('selected-issue-assignee')) and @id=instance('issue-search-results')/issue/@id)]" id="open-issue-table">
<xxforms:variable name="type" select="@type"/>
<xhtml:td>
<xforms:output ref="tokenize(@id,'\.')[last()]"/>
</xhtml:td>
<xhtml:td>
<xforms:output ref="@displayName"/>
</xhtml:td>
<xhtml:td>
<xxforms:variable name="currentStatusCode" select="@currentStatusCode"/>
<xforms:output ref="instance('decor-types')/IssueStatusCodeLifeCycle/enumeration[@value=$currentStatusCode]/label[@language=$resources/@xml:lang]"/>
</xhtml:td>
<xhtml:td>
<xxforms:variable name="priority" select="@priority"/>
<xforms:output ref="instance('decor-types')/IssuePriority/enumeration[@value=$priority]/label[@language=$resources/@xml:lang]"/>
</xhtml:td>
<xhtml:td>
<xxforms:variable name="itype" select="@type"/>
<xforms:output ref="instance('decor-types')/IssueType/enumeration[@value=$itype]/label[@language=$resources/@xml:lang]"/>
</xhtml:td>
<xhtml:td>
<xforms:output ref="@lastDate" xxforms:format="format-dateTime(.,'[Y]-[M01]-[D01]',(),(),())"/>
</xhtml:td>
<xhtml:td>
<xforms:output ref="@lastAssignment"/>
</xhtml:td>
<xhtml:td>
<!--xforms:output ref="tracking/@labels[1]"/-->
<xforms:repeat nodeset="tokenize(@currentLabels, '\s')" class="not-selectable">
<xxforms:variable name="selectedLabelCode" select="."/>
<xxforms:variable name="selectedLabelColor" select="instance('project-instance')/labels/label[@code=$selectedLabelCode]/@color"/>
<xxforms:variable name="selectedLabelName" select="instance('project-instance')/labels/label[@code=$selectedLabelCode]/@name"/>
<xhtml:div class="labelouterbox" title="{$selectedLabelName}">
<xhtml:div style="background-color:{$selectedLabelColor}; padding-left: 7px; float: left;"> </xhtml:div>
<xhtml:div style="background-color: white;float: left;">
<xforms:output ref="concat(' ',$selectedLabelCode,' ')"/>
</xhtml:div>
</xhtml:div>
</xforms:repeat>
</xhtml:td>
</xhtml:tr>
</xhtml:tbody>
<xforms:action ev:event="fr-selection-changed">
<xforms:setvalue ref="instance('selected-issue')/selected" value="event('selected')/@id"/>
<xforms:send submission="get-issue-details-submission"/>
</xforms:action>
</fr:datatable>