定义路由规则
<navigation-rule>
<from-view-id>/page1.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/page2.jsp</to-view-id>
</navigation-case>
</navigation-rule>
定义bean
<managed-bean>
<managed-bean-name>sayHelloPage</managed-bean-name>
<managed-bean-class>demo.SayHelloPage</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
定义事件绑定规则
<f:view>
<h:form id="mainForm">
<h:outputLabel for="enterName" value="Enter Name"/>
<h:inputText id="enterName" value="#{sayHelloPage.name}"/>
<h:commandButton value="Say Hello" action="#{sayHelloPage.sayHello}"/>
</h:form>
</f:view>