svg-template1.xaction 2.02 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

<action-sequence>

	<name>svg-template1.xaction</name>
	<version>1</version>
	<title>Test of template component</title>
	<logging-level>debug</logging-level>
	<documentation>
		<author>James Dixon</author>
		<description></description>
		<help></help>
	</documentation>

	<inputs>
	</inputs>

	<outputs>
		<output type="string"/>
	</outputs>
	<resources> 
		<template>
			<solution-file>
				<location>world-map-template.svg</location>
				<mime-type>text/xml</mime-type>
			</solution-file>
		</template>
	</resources>
  
  <actions>
      <action-definition>
        <component-name>JavascriptRule</component-name>
      	<action-inputs/>
        <action-outputs>
          	<regions type="list"/>
        </action-outputs>
        
        <action-type>rule</action-type>
      	<component-definition>
      		<script><![CDATA[ 
			      function getRegions( ) {
			      	var results = new JavaScriptResultSet();
			      	results.setColumnHeaders( new Array( 'country', 'value', 'color' ) );
		      		results.addRow( new Array( 'Germany', '120000', '#008000' ) );
		      		results.addRow( new Array( 'Italy', '120000', '#ffff00' ) );
		      		results.addRow( new Array( 'Thailand', '120000', '#80ff00' ) );
		      		results.addRow( new Array( 'France', '120000', '#ff8000' ) );
		      		results.addRow( new Array( 'China', '120000', '#ff8000' ) );
		      		results.addRow( new Array( 'Brazil', '120000', '#88ff00' ) );
		      		results.addRow( new Array( 'United States', '120000', '#808000' ) );
			      	return results;
			      }
			    getRegions( ); 
		      ]]>
		      </script>
        </component-definition>
      </action-definition>
      <action-definition>
      	<action-inputs>
			<regions type="list"/>
      	</action-inputs>
        <action-outputs>
          	<output type="string"/>
        </action-outputs>
        
        <component-name>TemplateComponent</component-name>
        <action-type>rule</action-type>
      	<component-definition>
        </component-definition>
      </action-definition>
  </actions>
</action-sequence>