2014-04-11 8 views
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'))&gt;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;">&#160;</xhtml:div> 
         <xhtml:div style="background-color: white;float: left;"> 
          <xforms:output ref="concat('&#160;',$selectedLabelCode,'&#160;')"/> 
         </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> 

답변

1

현재 fr:datatable과 실물은 동일하지 않습니다. 나는 현실성의 순서대로 :

  1. 데이터 테이블이 당신을 위해 작동한다면, 그것을 계속 사용하십시오. 코드가 Orbeon Forms와 함께 제공되지 않더라도 4.4에서 datatable directory을 되돌려 주면됩니다. 그런 다음 빌드를 다시 만들 수 있습니다.이를 방지하려면 해당 파일을 자신의 jar 파일에 넣고 WEB-INF/lib 아래에 파일을 넣을 수도 있습니다. (후자를 수행하는 경우 CoffeeScript 파일을 .js으로 컴파일해야한다고 생각합니다. 보통이 빌드로 수행되기 때문에이 파일을 작성해야합니다.)
  2. 현재 fr:grid에있는 기능을 사용할 수 있다면 다음을 사용할 수 있습니다. 그 구성 요소 대신. 이는 반복되는 격자를 포함하여 모든 테이블을 처리하기 위해 Form Builder에서 사용하는 구성 요소입니다. 그러나 오베곤 (Orbeon)이 가까운 장래에 추가 할 생각 중 일부는 데이터 베타 (페이징, 정렬, 크기 조정 가능 열 ...)와 비교하여 로트가 많습니다.
  3. 만족스러운 써드 파티 컴포넌트를 사용하고 XBL을 사용하여 자신 만의 "XForms와 바인딩"을 구현하십시오. 분명히, 이것은 특히 XBL에 익숙하지 않은 경우에 꽤 관련 될 수 있습니다.