SSISO Community

시소당

TrustForm - Progress Bar 구현하기

Progress Bar 넘오래된 개념인데 TrustForm에서는 구현하기가 쉽지 않다.

이런거 조차 안된다는게 정말 인내의 한계를 느끼지만 어떻게 하랴..

 

MS Progress Bar 6.0을 활용하여 구현한 방식이다.

 

[Form Source]

<xhtml:html xmlns="http://www.w3.org/2002/01/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" xmlns:cs="http://www.comsquare.co.kr/xforms" xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:ev="http://www.w3.org/2001/xml-events">
 <xhtml:head>
  <xhtml:title>Untitle</xhtml:title>
  <model>
   <instance>
    <root xmlns="">
     <example>Sample</example>
    </root>
   </instance>
  </model>
 </xhtml:head>
 <xhtml:body>
  <object id="object1" clsid="{35053a22-8589-11d1-b16a-00c0f0283628}" left="12" top="16" width="609" height="23">
   <param value="0" name="Appearance"/>
   <param value="0 = ccOrientationHorizontal" name="Orientation"/>
   <param value="0 = ccScrollingStandard" name="Scrolling"/>
  </object>
  <button id="button2" style="left:544px; top:48px; width:75px; height:20px;">
   <caption>
    <![CDATA[Progress]]>
   </caption>
   <script type="javascript" ev:event="xforms-activate">
    <![CDATA[           
            var obj = model.getObject("object1");
            var m_Loop = 500000; 
            obj.max = m_Loop;
            obj.min = 0;
            
            var m_Cnt = 0;
            for (var iCnt = 1; iCnt <= m_Loop; iCnt++){
                  m_Cnt = iCnt % 1000;
                  if ( m_Cnt == 0) {                   
                     obj.Value = iCnt;
                     obj.refresh();
                  }
           } 
    ]]>
   </script>
  </button>
 </xhtml:body>
</xhtml:html>

 

 

구현된 예)


1329 view

4.0 stars