focus_4.xhtml
878 Bytes
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html" xmlns:focus="http://richfaces.org/sandbox/focus"
xmlns:rich="http://richfaces.org/rich">
<head>
<title>Focus sample</title>
</head>
<body>
<ui:include src="menu.xhtml"/>
<p>This example shows that focus can be put on non JSF control</p>
<h:panelGrid columns="3">
<h:outputLabel value="Non JSF control" for="option"/>
<input type="radio" id="option_1" name="option"/> 1
<input type="radio" id="option_2" name="option"/> 2
</h:panelGrid>
<focus:focus targetClientId="option_2"/>
<rich:insert src="/focus_4.xhtml" highlight="html"/>
</body>
</html>