<?xml-stylesheet type="text/xsl" href="/xforms-tests/xsltforms/xsltforms.xsl"?>
<html xmlns:my="http://commerce.example.com/payment" xmlns:txs="http://sourceforge.net/projects/txs" xmlns="http://www.w3.org/1999/xhtml" xmlns:req="http://www.agencexml.com/requests" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  	<head>
    	<title>10.7.a setfocus element</title>
    	<link rel="stylesheet" href="../../driverPages/forms/TestSuite11.css" type="text/css"/>
    	<xforms:model>
       		<xforms:instance xmlns="">
       			<cart>
					<items>
						<item name="brake pad"/>
						<item name="spare tire"/>
						<item name="fan belt"/>
					</items>
					<shipping/>
				</cart>
       		</xforms:instance>
    	</xforms:model>
  	</head>
  	<body>
  		<xforms:group>
	  		<xforms:label class="title">10.7.a setfocus element</xforms:label>
	  	</xforms:group>
  		<xforms:group>
  			<xforms:label>
  			  The triggers below must shift the focus to the proper form controls when activated. The Set Focus To 
  			  Shipping trigger 
  			  must place the focus into the empty input control labeled Shipping. The Set Focus To 
  			  First Item trigger must must place the focus into the input control containing the value 
  			  "brake pad". The Set Focus To Third Item trigger must must place the focus into 
  			  the input control containing the value "fan belt". 
			</xforms:label>
  		</xforms:group>
		<xforms:input id="shipping_input" ref="/cart/shipping">
			<xforms:label>Shipping:</xforms:label>
		</xforms:input>
		<xforms:repeat id="lineset" nodeset="/cart/items/item" startindex="1">
			<xforms:input ref="@name" id="repeat_input">
				<xforms:label>Item Name:</xforms:label>
			</xforms:input>
		</xforms:repeat>
		<xforms:trigger>
			<xforms:label>Set Focus To Shipping</xforms:label>
			<xforms:action ev:event="DOMActivate">
				<xforms:setfocus control="shipping_input"/>
			</xforms:action>
		</xforms:trigger>
		<xforms:trigger>
			<xforms:label>Set Focus To First Item</xforms:label>
			<xforms:action ev:event="DOMActivate">
				<xforms:setfocus control="repeat_input"/>
			</xforms:action>
		</xforms:trigger>
		<xforms:trigger>
			<xforms:label>Set Focus To Third Item</xforms:label>
			<xforms:action ev:event="DOMActivate">
				<xforms:setindex repeat="lineset" index="3"/>
				<xforms:setfocus control="repeat_input"/>
				<xforms:setindex repeat="lineset" index="1"/>
			</xforms:action>
		</xforms:trigger>

  </body>
</html>
