| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version |
| 2.0 (the "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 Unless required by |
| applicable law or agreed to in writing, software distributed under the |
| License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
| CONDITIONS OF ANY KIND, either express or implied. See the License for |
| the specific language governing permissions and limitations under the |
| License. |
| --> |
| <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"> |
| <h:head> |
| <title>JSF2 Ajax with OpenWebBeans Demo</title> |
| </h:head> |
| <h:body> |
| |
| <h3>JSF2 Ajax Demo :: Click <b>Count</b> button to inrease your count</h3> |
| |
| <h:form id="form"> |
| |
| <h:outputScript name="jsf.js" library="javax.faces" target="body"></h:outputScript> |
| |
| <div> |
| <h:commandButton id="button1" value="Count..." actionListener="#{helloBean.processAction}" |
| onclick="jsf.ajax.request(this,event, {execute:'form:button1',render:'form:status'});return false;"> |
| </h:commandButton> |
| |
| </div> |
| |
| <div> |
| <h:outputText value="Counter Number : " /> |
| <h:outputText value="#{helloBean.count}" id="status" /> |
| </div> |
| </h:form> |
| |
| </h:body> |
| </html> |