XForms Tutorial > I-6.2.2. The output Element

이 폼 컨트롤은 업무 화면에서 표현하고자 하는 데이터가 단순히 보여주는 형식의 텍스트 데이터인 경우 사용되는 컨트롤로서 조회용 업무인 경우 유용하게 사용될 수 있다. 일반적으로 생각하는 Label 엘리먼트와 동일하게 생각될 수 있으나 XForms Additional Elements의 Label과는 다르다. 그 차이점은 output 컨트롤은 컨테이너 엘리먼트 없이 사용될 수 있으나, label 컨트롤은 컨테이너 엘리먼트 없이 일반적으로 사용되지 않는다는 점이다.

Common Attributes

  • Common, Single Node Binding(optional)
Special Attributes
  • appearance, value
value
  • 값을 구하는 XPath 표현이며, 그 결과는 Form Control에 의하여 표현된다
  • XPath Expression에 의하여 Form Control에 반영된다
Data Binding Restrictions
  • Binds to any simpleContent
Sample
…(생략)...
<xforms:model>
 <xforms:instance>
  <root>
   <code>
    <id> 1951614 </id>
    <desc> 에스엠아이티 </desc>
   </code>
  </root>
 </xforms:instance>
</xforms:model>


</head>

<body>
 <xforms:output ref="code/id"> 
  <xforms:label> 코 드: </xforms:label>
 </xforms:output>
 <br/>
 <xforms:output ref="code/desc">  
  <xforms:label> 코드명: </xforms:label>
 </xforms:output> 
</body>
...(생략)...
  • output 컨트롤은 데이터 수정 불가능하며, 단지 inline 데이터 랜더링 역할.
  • ref 바인딩에 따라 코드 : 1951614 와 코드명 : 에스엠아이티를 출력한다.

댓글 없음: