Author: ppitonak(a)redhat.com
Date: 2011-11-22 05:58:06 -0500 (Tue, 22 Nov 2011)
New Revision: 22969
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/image.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml
Log:
added new sample for a4j:commandButton
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java 2011-11-22
10:01:57 UTC (rev 22968)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JCommandButtonBean.java 2011-11-22
10:58:06 UTC (rev 22969)
@@ -62,8 +62,6 @@
attributes.setAttribute("action", "first6CharsAction");
attributes.setAttribute("actionListener",
"toUpperCaseActionListener");
- attributes.setAttribute("disabled", false);
- attributes.get("disabled").setType(Boolean.class);
attributes.setAttribute("render", "output1 output2
output3");
attributes.setAttribute("rendered", true);
attributes.setAttribute("value", "command button");
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/image.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/image.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/image.xhtml 2011-11-22
10:58:06 UTC (rev 22969)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <h:panelGrid id="panel" columns="2">
+ <h:inputText id="input"
value="#{a4jButtonBean.input}" />
+
+ <a4j:commandButton id="a4jCommandButton"
+ action="#{a4jButtonBean.attributes.action}"
+
actionListener="#{a4jButtonBean.attributes.actionListener}"
+
bypassUpdates="#{a4jButtonBean.attributes['bypassUpdates'].value}"
+
data="#{a4jButtonBean.attributes['data'].value}"
+
disabled="#{a4jButtonBean.attributes['disabled'].value}"
+
execute="#{a4jButtonBean.attributes['execute'].value}"
+ image="/resources/images/star.png"
+
immediate="#{a4jButtonBean.attributes['immediate'].value}"
+
limitRender="#{a4jButtonBean.attributes['limitRender'].value}"
+
onbeforedomupdate="#{a4jButtonBean.attributes['onbeforedomupdate'].value}"
+
onbegin="#{a4jButtonBean.attributes['onbegin'].value}"
+
onclick="#{a4jButtonBean.attributes['onclick'].value}"
+
oncomplete="#{a4jButtonBean.attributes['oncomplete'].value}"
+
ondblclick="#{a4jButtonBean.attributes['ondblclick'].value}"
+
onkeydown="#{a4jButtonBean.attributes['onkeydown'].value}"
+
onkeypress="#{a4jButtonBean.attributes['onkeypress'].value}"
+
onkeyup="#{a4jButtonBean.attributes['onkeyup'].value}"
+
onmousedown="#{a4jButtonBean.attributes['onmousedown'].value}"
+
onmousemove="#{a4jButtonBean.attributes['onmousemove'].value}"
+
onmouseout="#{a4jButtonBean.attributes['onmouseout'].value}"
+
onmouseover="#{a4jButtonBean.attributes['onmouseover'].value}"
+
onmouseup="#{a4jButtonBean.attributes['onmouseup'].value}"
+
render="#{a4jButtonBean.attributes['render'].value}"
+
rendered="#{a4jButtonBean.attributes['rendered'].value}"
+
status="#{a4jButtonBean.attributes['status'].value}"
+
style="#{a4jButtonBean.attributes['style'].value}"
+
styleClass="#{a4jButtonBean.attributes['styleClass'].value}"
+
title="#{a4jButtonBean.attributes['title'].value}"
+
type="#{a4jButtonBean.attributes['type'].value}"
+
value="#{a4jButtonBean.attributes['value'].value}"
+ />
+ </h:panelGrid>
+
+ <h:panelGrid id="outputs" columns="2">
+ output: <h:outputText value="#{a4jButtonBean.input}"
id="output1" />
+ action: <h:outputText value="#{a4jButtonBean.input2}"
id="output2" />
+ action listener:<h:outputText
value="#{a4jButtonBean.input3}" id="output3" />
+ </h:panelGrid>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{a4jButtonBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml 2011-11-22
10:01:57 UTC (rev 22968)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml 2011-11-22
10:58:06 UTC (rev 22969)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!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:metamer="http://java.sun.com/jsf/composite/metamer">
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
- <!--
+<!--
JBoss, Home of Professional Open Source
Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
@@ -25,18 +25,22 @@
02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-->
- <ui:composition template="/templates/list.xhtml">
+<ui:composition template="/templates/list.xhtml">
- <ui:define name="pageTitle">A4J Command Button</ui:define>
+ <ui:define name="pageTitle">A4J Command Button</ui:define>
- <ui:define name="links">
+ <ui:define name="links">
- <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
Simple page that contains <b>a4j:commandButton</b> and input
boxes for all its attributes.
- </metamer:testPageLink>
+ </metamer:testPageLink>
- </ui:define>
+ <metamer:testPageLink id="image" outcome="image"
value="Image">
+ Simple page that contains <b>a4j:commandButton</b> with image
and input boxes for all its attributes.
+ </metamer:testPageLink>
- </ui:composition>
+ </ui:define>
+</ui:composition>
+
</html>