setTree 아웃라인바옵션추가.xrw 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <treetest>
  11. <list>
  12. <level>1</level>
  13. <name>학교1</name>
  14. <code>001</code>
  15. </list>
  16. <list>
  17. <level>2</level>
  18. <name>학교2</name>
  19. <code>002</code>
  20. </list>
  21. <list>
  22. <level>3</level>
  23. <name>학교3</name>
  24. <code>003</code>
  25. </list>
  26. <list>
  27. <level>3</level>
  28. <name>학교3</name>
  29. <code>003</code>
  30. </list>
  31. <list>
  32. <level>1</level>
  33. <name>학교11</name>
  34. <code>011</code>
  35. </list>
  36. <list>
  37. <level>2</level>
  38. <name>학교22</name>
  39. <code>022</code>
  40. </list>
  41. <list>
  42. <level>2</level>
  43. <name>학교22</name>
  44. <code>022</code>
  45. </list>
  46. </treetest>
  47. </main>
  48. <option1/>
  49. </root>
  50. </instance>
  51. </model>
  52. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  53. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  54. </xhtml:head>
  55. <xhtml:body>
  56. <select1 id="radio1" ref="/root/option1" overflow="visible" scroll="auto" appearance="full" direction="acrossdown" style="left:480px; top:90px; width:100px; height:320px; border-style:none; ">
  57. <choices>
  58. <item>
  59. <label>옵션 0</label>
  60. <value>0</value>
  61. </item>
  62. <item>
  63. <label>옵션 1</label>
  64. <value>1</value>
  65. </item>
  66. <item>
  67. <label>옵션 2</label>
  68. <value>2</value>
  69. </item>
  70. <item>
  71. <label>옵션 3</label>
  72. <value>3</value>
  73. </item>
  74. <item>
  75. <label>옵션 4</label>
  76. <value>4</value>
  77. </item>
  78. <item>
  79. <label>옵션 5</label>
  80. <value>5</value>
  81. </item>
  82. </choices>
  83. <script type="javascript" ev:event="xforms-value-changed">
  84. <![CDATA[
  85. setTree(datagrid1, 0, 1, false, model.getValue("/root/option1"));
  86. model.refresh();
  87. ]]>
  88. </script>
  89. </select1>
  90. <datagrid id="datagrid1" nodeset="/root/main/treetest/list" caption="caption1^caption2^caption3" colsep="^" colwidth="100, 156, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:50px; top:85px; width:415px; height:415px; ">
  91. <col ref="level"/>
  92. <col ref="name"/>
  93. <col ref="code"/>
  94. </datagrid>
  95. <caption id="caption1" style="left:60px; top:30px; width:532px; height:20px; ">common.js 의 setTree() 함수의 5번째 인자값 테스트 : 0 에서 5까지 인자값에 따라 형태가 바뀐다.</caption>
  96. </xhtml:body>
  97. </xhtml:html>