Author: lfryc(a)redhat.com
Date: 2010-07-10 14:15:26 -0400 (Sat, 10 Jul 2010)
New Revision: 17820
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JCommandButtonBean.properties
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/CommandButtonBean.properties
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/simple.xhtml
root/tests/metamer/trunk/src/main/webapp/components/commandButton/
root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/commandButton/simple.xhtml
root/tests/metamer/trunk/src/main/webapp/resources/css/a4jCommandButton.css
root/tests/metamer/trunk/src/main/webapp/resources/css/commandButton.css
root/tests/metamer/trunk/src/main/webapp/resources/css/list.css
root/tests/metamer/trunk/src/main/webapp/resources/testapp/css/
root/tests/metamer/trunk/src/main/webapp/resources/testapp/css/attributes.css
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JCommandLinkBean.properties
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/simple.xhtml
root/tests/metamer/trunk/src/main/webapp/resources/css/a4jCommandLink.css
root/tests/metamer/trunk/src/main/webapp/resources/css/common.css
root/tests/metamer/trunk/src/main/webapp/resources/testapp/attributes.xhtml
root/tests/metamer/trunk/src/main/webapp/templates/blue_div.xhtml
root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml
root/tests/metamer/trunk/src/main/webapp/templates/red_div.xhtml
root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml
Log:
https://jira.jboss.org/jira/browse/RFPL-466
* added a4j:commandButton and h:commandButton
* added css to all xhtml files
* templates refactored
* fixed bug in template selector
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.
+ *******************************************************************************/
+
+package org.richfaces.testapp.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.event.ActionEvent;
+import org.richfaces.component.html.HtmlCommandButton;
+
+import org.richfaces.testapp.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:commandButton.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jButtonBean")
+@SessionScoped
+public class A4JCommandButtonBean implements Serializable {
+
+ private static final long serialVersionUID = -2556026843426776944L;
+ private static final int ACTION_STRING_LENGTH = 6;
+ private static Logger logger;
+ private Attributes attributes;
+ private String input;
+ private String input2;
+ private String input3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(A4JCommandButtonBean.class);
+ logger.info("initializing bean " + getClass().getName());
+
+ attributes = new Attributes(HtmlCommandButton.class, getClass());
+
+ attributes.put("value", "command button");
+ attributes.put("rendered", "true");
+ attributes.put("disabled", "false");
+ attributes.putAttributeClass("disabled", Boolean.class);
+ attributes.put("render", "output1 output2 output3");
+
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component
is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the
component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for input.
+ *
+ * @return value entered by a user
+ */
+ public String getInput() {
+ return input;
+ }
+
+ /**
+ * Getter for input2.
+ *
+ * @return value entered by a user modified by selected action
+ */
+ public String getInput2() {
+ return input2;
+ }
+
+ /**
+ * Getter for input3.
+ *
+ * @return value entered by a user modified by selected action listener
+ */
+ public String getInput3() {
+ return input3;
+ }
+
+ /**
+ * Setter for input.
+ *
+ * @param input
+ * value which user entered into text input on the page
+ */
+ public void setInput(String input) {
+ this.input = input;
+ }
+
+ /**
+ * An action that takes the first six characters from input and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String first6CharsAction() {
+ logger.info("action invoked");
+ if (input == null) {
+ return "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ?
ACTION_STRING_LENGTH : input.length();
+ input2 = (String) input.subSequence(0, endIndex);
+ return null;
+ }
+ }
+
+ /**
+ * An action that takes user's input, doubles it and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String doubleStringAction() {
+ if (input == null) {
+ input2 = "";
+ } else {
+ input2 = input.concat(input);
+ }
+
+ return null;
+ }
+
+ /**
+ * An action that takes user's input, converts it to upper case and stores it to
input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String toUpperCaseAction() {
+ if (input == null) {
+ return "";
+ } else {
+ input2 = input.toUpperCase();
+ return null;
+ }
+ }
+
+ /**
+ * An action listener that takes the first six characters from input and stores it to
input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not
used)
+ */
+ public void first6CharsActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ?
ACTION_STRING_LENGTH : input.length();
+ input3 = (String) input.subSequence(0, endIndex);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, doubles it and stores it to
input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not
used)
+ */
+ public void doubleStringActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.concat(input);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, converts it to upper case and
stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not
used)
+ */
+ public void toUpperCaseActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.toUpperCase();
+ }
+ }
+
+}
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, 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.
+ *******************************************************************************/
+
+package org.richfaces.testapp.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.component.html.HtmlCommandButton;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.testapp.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for h:commandButton.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "buttonBean")
+@SessionScoped
+public class CommandButtonBean implements Serializable {
+
+ private static final long serialVersionUID = -2576526843426776944L;
+ private static final int ACTION_STRING_LENGTH = 6;
+ private static Logger logger;
+ private Attributes attributes;
+ private String input;
+ private String input2;
+ private String input3;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(CommandButtonBean.class);
+ logger.info("initializing bean " + getClass().getName());
+
+ attributes = new Attributes(HtmlCommandButton.class, getClass());
+
+ attributes.put("value", "command button");
+ attributes.put("rendered", "true");
+ attributes.put("render", "output1 output2 output3");
+ attributes.put("action", "first6CharsAction");
+ attributes.put("actionListener",
"toUpperCaseActionListener");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component
is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the
component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for input.
+ *
+ * @return value entered by a user
+ */
+ public String getInput() {
+ return input;
+ }
+
+ /**
+ * Getter for input2.
+ *
+ * @return value entered by a user modified by selected action
+ */
+ public String getInput2() {
+ return input2;
+ }
+
+ /**
+ * Getter for input3.
+ *
+ * @return value entered by a user modified by selected action listener
+ */
+ public String getInput3() {
+ return input3;
+ }
+
+ /**
+ * Setter for input.
+ *
+ * @param input
+ * value which user entered into text input on the page
+ */
+ public void setInput(String input) {
+ this.input = input;
+ }
+
+ /**
+ * An action that takes the first six characters from input and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String first6CharsAction() {
+ if (input == null) {
+ return "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ?
ACTION_STRING_LENGTH : input.length();
+ input2 = (String) input.subSequence(0, endIndex);
+ return null;
+ }
+ }
+
+ /**
+ * An action that takes user's input, doubles it and stores it to input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String doubleStringAction() {
+ if (input == null) {
+ input2 = "";
+ } else {
+ input2 = input.concat(input);
+ }
+
+ return null;
+ }
+
+ /**
+ * An action that takes user's input, converts it to upper case and stores it to
input2.
+ *
+ * @return null since no navigation should be performed
+ */
+ public String toUpperCaseAction() {
+ if (input == null) {
+ return "";
+ } else {
+ input2 = input.toUpperCase();
+ return null;
+ }
+ }
+
+ /**
+ * An action listener that takes the first six characters from input and stores it to
input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not
used)
+ */
+ public void first6CharsActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ int endIndex = input.length() > ACTION_STRING_LENGTH ?
ACTION_STRING_LENGTH : input.length();
+ input3 = (String) input.subSequence(0, endIndex);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, doubles it and stores it to
input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not
used)
+ */
+ public void doubleStringActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.concat(input);
+ }
+ }
+
+ /**
+ * An action listener that takes user's input, converts it to upper case and
stores it to input3.
+ *
+ * @param event
+ * an event representing the activation of a user interface component (not
used)
+ */
+ public void toUpperCaseActionListener(ActionEvent event) {
+ if (input == null) {
+ input3 = "";
+ } else {
+ input3 = input.toUpperCase();
+ }
+ }
+
+}
Modified: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
18:13:32 UTC (rev 17819)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
18:15:26 UTC (rev 17820)
@@ -90,9 +90,7 @@
components.put("a4jCommandLink", "A4J Command Link");
components.put("a4jCommandButton", "A4J Command Button");
- components.put("hCommandLink", "Command Link");
- components.put("progressBar", "Progress Bar");
- components.put("richDataTable", "Rich Data Table");
+ components.put("commandButton", "JSF Command Button");
return components;
}
Added:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JCommandButtonBean.properties
===================================================================
Modified:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JCommandLinkBean.properties
===================================================================
---
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JCommandLinkBean.properties 2010-07-10
18:13:32 UTC (rev 17819)
+++
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JCommandLinkBean.properties 2010-07-10
18:15:26 UTC (rev 17820)
@@ -7,4 +7,4 @@
attr.actionListener.first6CharsActionListener=first6CharsActionListener
attr.actionListener.doubleStringActionListener=doubleStringActionListener
-attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
\ No newline at end of file
+attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
Copied:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/CommandButtonBean.properties
(from rev 17819,
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JCommandLinkBean.properties)
===================================================================
---
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/CommandButtonBean.properties
(rev 0)
+++
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/CommandButtonBean.properties 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,13 @@
+attr.action.first6CharsAction=first6CharsAction
+attr.action.doubleStringAction=doubleStringAction
+attr.action.toUpperCaseAction=toUpperCaseAction
+
+attr.actionListener.first6CharsActionListener=first6CharsActionListener
+attr.actionListener.doubleStringActionListener=doubleStringActionListener
+attr.actionListener.toUpperCaseActionListener=toUpperCaseActionListener
+
+attr.styleClass.red=red
+attr.styleClass.blue=blue
+attr.styleClass.big=big
+attr.styleClass.wide=wide
+attr.styleClass.none=
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/list.xhtml 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,18 @@
+<!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:c="http://java.sun.com/jsp/jstl/core">
+
+ <h:head>
+ <title>A4J Command Button</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+ </h:head>
+
+ <h:body>
+
+ <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
+ <div>Simple page that contains ajax command button and input boxes for all
its attributes.</div>
+
+ </h:body>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/simple.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandButton/simple.xhtml 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,61 @@
+<!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:ta="http://java.sun.com/jsf/composite/testapp">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="template"
value="#{templateBean.templateId}">
+ <f:converter converterId="templateNameConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <h:outputStylesheet library="css"
name="a4jCommandButton.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </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}"
+
disabled="#{a4jButtonBean.attributes['disabled']}"
+
immediate="#{a4jButtonBean.attributes['immediate']}"
+
onclick="#{a4jButtonBean.attributes['onclick']}"
+
ondblclick="#{a4jButtonBean.attributes['ondblclick']}"
+
onkeydown="#{a4jButtonBean.attributes['onkeydown']}"
+
onkeypress="#{a4jButtonBean.attributes['onkeypress']}"
+
onkeyup="#{a4jButtonBean.attributes['onkeyup']}"
+
onmousedown="#{a4jButtonBean.attributes['onmousedown']}"
+
onmousemove="#{a4jButtonBean.attributes['onmousemove']}"
+
onmouseout="#{a4jButtonBean.attributes['onmouseout']}"
+
onmouseover="#{a4jButtonBean.attributes['onmouseover']}"
+
onmouseup="#{a4jButtonBean.attributes['onmouseup']}"
+
render="#{a4jButtonBean.attributes['render']}"
+
rendered="#{a4jButtonBean.attributes['rendered']}"
+
style="#{a4jButtonBean.attributes['style']}"
+
styleClass="#{a4jButtonBean.attributes['styleClass']}"
+
value="#{a4jButtonBean.attributes['value']}"
+ execute="@form" />
+ </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">
+ <ta:attributes value="#{a4jButtonBean.attributes}"
id="attributes" render="panel"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml 2010-07-10
18:13:32 UTC (rev 17819)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml 2010-07-10
18:15:26 UTC (rev 17820)
@@ -6,13 +6,13 @@
<h:head>
<title>A4J Command Link</title>
<meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
- <!-- <h:outputStylesheet library="css" name="common.css"
/>-->
+ <h:outputStylesheet library="css" name="list.css" />
</h:head>
<h:body>
<h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
- <div>Simple page that contain command link and input boxes for all its
attributes.</div>
+ <div>Simple page that contains ajax command link and input boxes for all its
attributes.</div>
</h:body>
</html>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/simple.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/simple.xhtml 2010-07-10
18:13:32 UTC (rev 17819)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/simple.xhtml 2010-07-10
18:15:26 UTC (rev 17820)
@@ -1,124 +1,62 @@
<!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:rich="http://java.sun.com/jsf/composite/rich"
-
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp">
-<ui:composition template="/templates/template.xhtml">
+ <ui:composition template="/templates/template.xhtml">
- <ui:define name="head">
- <style>
-table.attributes {
- border-width: 0px;
- border-collapse: collapse;
-}
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="template"
value="#{templateBean.templateId}">
+ <f:converter converterId="templateNameConverter" />
+ </f:viewParam>
+ </f:metadata>
-.attributes-first-column {
- border-width: 1px;
- padding: 10px;
- border-style: dotted;
- border-color: blue;
- border-right: none;
-}
+ <h:outputStylesheet library="css"
name="a4jCommandLink.css"/>
+ </ui:define>
-.attributes-second-column {
- border-width: 1px;
- padding: 10px;
- padding-left: 0px;
- border-style: dotted;
- border-color: blue;
- border-left: none;
-}
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
-.attributes-second-column table input {
- margin-left: 0px;
-}
-</style>
- </ui:define>
+ <ui:define name="component">
- <ui:define name="viewParams">
- <f:metadata>
- <f:viewParam name="template"
value="#{templateBean.templateId}">
- <f:converter converterId="templateNameConverter" />
- </f:viewParam>
- </f:metadata>
- </ui:define>
+ <h:panelGrid id="panel" columns="2">
+ <h:inputText id="input"
value="#{a4jLinkBean.input}" />
- <ui:define name="outOfTemplateBefore">
- </ui:define>
+ <a4j:commandLink id="a4jCommandLink"
+ action="#{a4jLinkBean.attributes.action}"
+
actionListener="#{a4jLinkBean.attributes.actionListener}"
+
disabled="#{a4jLinkBean.attributes['disabled']}"
+
immediate="#{a4jLinkBean.attributes['immediate']}"
+
onclick="#{a4jLinkBean.attributes['onclick']}"
+
ondblclick="#{a4jLinkBean.attributes['ondblclick']}"
+
onkeydown="#{a4jLinkBean.attributes['onkeydown']}"
+
onkeypress="#{a4jLinkBean.attributes['onkeypress']}"
+
onkeyup="#{a4jLinkBean.attributes['onkeyup']}"
+
onmousedown="#{a4jLinkBean.attributes['onmousedown']}"
+
onmousemove="#{a4jLinkBean.attributes['onmousemove']}"
+
onmouseout="#{a4jLinkBean.attributes['onmouseout']}"
+
onmouseover="#{a4jLinkBean.attributes['onmouseover']}"
+
onmouseup="#{a4jLinkBean.attributes['onmouseup']}"
+
render="#{a4jLinkBean.attributes['render']}"
+
rendered="#{a4jLinkBean.attributes['rendered']}"
+
style="#{a4jLinkBean.attributes['style']}"
+
styleClass="#{a4jLinkBean.attributes['styleClass']}"
+
value="#{a4jLinkBean.attributes['value']}"
+ execute="@form" />
- <ui:define name="component">
- <!-- <h:outputStylesheet library="css"
name="a4jCommandLink.css" target="head"/> -->
+ </h:panelGrid>
- <h:panelGrid id="panel" columns="2">
- <h:inputText id="input" value="#{a4jLinkBean.input}"
/>
+ <h:panelGrid id="outputs" columns="2">
+ output: <h:outputText value="#{a4jLinkBean.input}"
id="output1" />
+ action: <h:outputText value="#{a4jLinkBean.input2}"
id="output2" />
+ action listener:<h:outputText value="#{a4jLinkBean.input3}"
id="output3" />
+ </h:panelGrid>
+ </ui:define>
- <a4j:commandLink id="a4jCommandLink"
accesskey="#{a4jLinkBean.attributes['accesskey']}"
- action="#{a4jLinkBean.attributes.action}"
actionListener="#{a4jLinkBean.attributes.actionListener}"
- charset="#{a4jLinkBean.attributes['charset']}"
coords="#{a4jLinkBean.attributes['coords']}"
- dir="#{a4jLinkBean.attributes['dir']}"
disabled="#{a4jLinkBean.attributes['disabled']}"
- hreflang="#{a4jLinkBean.attributes['hreflang']}"
immediate="#{a4jLinkBean.attributes['immediate']}"
- lang="#{a4jLinkBean.attributes['lang']}"
onblur="#{a4jLinkBean.attributes['onblur']}"
- onclick="#{a4jLinkBean.attributes['onclick']}"
ondblclick="#{a4jLinkBean.attributes['ondblclick']}"
- onfocus="#{a4jLinkBean.attributes['onfocus']}"
onkeydown="#{a4jLinkBean.attributes['onkeydown']}"
- onkeypress="#{a4jLinkBean.attributes['onkeypress']}"
onkeyup="#{a4jLinkBean.attributes['onkeyup']}"
- onmousedown="#{a4jLinkBean.attributes['onmousedown']}"
- onmousemove="#{a4jLinkBean.attributes['onmousemove']}"
- onmouseout="#{a4jLinkBean.attributes['onmouseout']}"
- onmouseover="#{a4jLinkBean.attributes['onmouseover']}"
- onmouseup="#{a4jLinkBean.attributes['onmouseup']}"
rel="#{a4jLinkBean.attributes['rel']}"
- render="#{a4jLinkBean.attributes['render']}"
rendered="#{a4jLinkBean.attributes['rendered']}"
- rev="#{a4jLinkBean.attributes['rev']}"
shape="#{a4jLinkBean.attributes['shape']}"
- style="#{a4jLinkBean.attributes['style']}"
styleClass="#{a4jLinkBean.attributes['styleClass']}"
- tabindex="#{a4jLinkBean.attributes['tabindex']}"
target="#{a4jLinkBean.attributes['target']}"
- title="#{a4jLinkBean.attributes['title']}"
type="#{a4jLinkBean.attributes['type']}"
- value="#{a4jLinkBean.attributes['value']}"
execute="@form" />
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{a4jLinkBean.attributes}"
id="attributes" render="panel"/>
+ </ui:define>
- </h:panelGrid>
-
- <h:panelGrid id="outputs" columns="2">
- output: <h:outputText value="#{a4jLinkBean.input}"
id="output1" />
- action: <h:outputText value="#{a4jLinkBean.input2}"
id="output2" />
- action listener:<h:outputText value="#{a4jLinkBean.input3}"
id="output3" />
- </h:panelGrid>
- </ui:define>
-
- <ui:define name="outOfTemplateAfter">
- <h:panelGrid id="attributes" columns="4"
styleClass="attributes" columnClasses="attributes-first-column,
attributes-second-column, attributes-first-column, attributes-second-column">
- <c:forEach items="#{a4jLinkBean.attributes}"
var="entry">
-
- <h:panelGroup layout="block">
- <h:outputLabel id="#{entry.key}Label"
value="#{entry.key}" style="margin-right: 5px;" />
- <h:graphicImage value="/resources/images/help.png"
- title="#{a4jLinkBean.attributes.getHelp(entry.key)}"
- rendered="#{a4jLinkBean.attributes.getHelp(entry.key) !=
null}" height="28px;"
- style="vertical-align: middle;" />
- </h:panelGroup>
-
- <c:choose>
- <c:when
test="#{a4jLinkBean.attributes.isBoolean(entry.key)}">
- <h:selectBooleanCheckbox id="#{entry.key}Input"
value="#{a4jLinkBean.attributes[entry.key]}">
- <a4j:ajax event="change"
render="panel" />
- </h:selectBooleanCheckbox>
- </c:when>
-
- <c:when
test="#{a4jLinkBean.attributes.hasSelectOptions(entry.key)}">
- <h:selectOneRadio id="#{entry.key}Input"
value="#{a4jLinkBean.attributes[entry.key]}"
- layout="pageDirection">
- <f:selectItems
value="#{a4jLinkBean.attributes.getSelectOptions(entry.key)}" />
- <a4j:ajax event="change"
render="panel" />
- </h:selectOneRadio>
- </c:when>
-
- <c:otherwise>
- <h:inputText id="#{entry.key}Input"
value="#{a4jLinkBean.attributes[entry.key]}" style="width:
200px;">
- <a4j:ajax event="blur" render="panel"
/>
- </h:inputText>
- </c:otherwise>
- </c:choose>
-
- </c:forEach>
- </h:panelGrid>
- </ui:define>
-
-</ui:composition>
+ </ui:composition>
</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/commandButton/list.xhtml 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,18 @@
+<!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:c="http://java.sun.com/jsp/jstl/core">
+
+ <h:head>
+ <title>JSF Command Button</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+ </h:head>
+
+ <h:body>
+
+ <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
+ <div>Simple page that contains standard JSF command button and input boxes
for all its attributes.</div>
+
+ </h:body>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/commandButton/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/commandButton/simple.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/commandButton/simple.xhtml 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,61 @@
+<!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:ta="http://java.sun.com/jsf/composite/testapp">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="template"
value="#{templateBean.templateId}">
+ <f:converter converterId="templateNameConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <h:outputStylesheet library="css"
name="commandButton.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <h:panelGrid id="panel" columns="2">
+ <h:inputText id="input"
value="#{buttonBean.input}" />
+
+ <h:commandButton id="commandButton"
+ action="#{buttonBean.attributes.action}"
+
actionListener="#{buttonBean.attributes.actionListener}"
+
disabled="#{buttonBean.attributes['disabled']}"
+
immediate="#{buttonBean.attributes['immediate']}"
+
onclick="#{buttonBean.attributes['onclick']}"
+
ondblclick="#{buttonBean.attributes['ondblclick']}"
+
onkeydown="#{buttonBean.attributes['onkeydown']}"
+
onkeypress="#{buttonBean.attributes['onkeypress']}"
+
onkeyup="#{buttonBean.attributes['onkeyup']}"
+
onmousedown="#{buttonBean.attributes['onmousedown']}"
+
onmousemove="#{buttonBean.attributes['onmousemove']}"
+
onmouseout="#{buttonBean.attributes['onmouseout']}"
+
onmouseover="#{buttonBean.attributes['onmouseover']}"
+
onmouseup="#{buttonBean.attributes['onmouseup']}"
+
render="#{buttonBean.attributes['render']}"
+
rendered="#{buttonBean.attributes['rendered']}"
+
style="#{buttonBean.attributes['style']}"
+
styleClass="#{buttonBean.attributes['styleClass']}"
+
value="#{buttonBean.attributes['value']}"
+ execute="@form" />
+ </h:panelGrid>
+
+ <h:panelGrid id="outputs" columns="2">
+ output: <h:outputText value="#{buttonBean.input}"
id="output1" />
+ action: <h:outputText value="#{buttonBean.input2}"
id="output2" />
+ action listener:<h:outputText value="#{buttonBean.input3}"
id="output3" />
+ </h:panelGrid>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{buttonBean.attributes}"
id="attributes" render="panel"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/resources/css/a4jCommandButton.css
===================================================================
Modified: root/tests/metamer/trunk/src/main/webapp/resources/css/a4jCommandLink.css
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/css/a4jCommandLink.css 2010-07-10
18:13:32 UTC (rev 17819)
+++ root/tests/metamer/trunk/src/main/webapp/resources/css/a4jCommandLink.css 2010-07-10
18:15:26 UTC (rev 17820)
@@ -1,7 +0,0 @@
-.red {
- color: red;
-}
-
-.big {
- font-size: xx-large;
-}
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/resources/css/commandButton.css
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/css/commandButton.css
(rev 0)
+++ root/tests/metamer/trunk/src/main/webapp/resources/css/commandButton.css 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,16 @@
+.red {
+ color: red;
+}
+
+.blue {
+ color: blue;
+}
+
+.big {
+ height: 40px;
+ width: 200px;
+}
+
+.wide {
+ width: 200px;
+}
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/resources/css/common.css
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/css/common.css 2010-07-10 18:13:32
UTC (rev 17819)
+++ root/tests/metamer/trunk/src/main/webapp/resources/css/common.css 2010-07-10 18:15:26
UTC (rev 17820)
@@ -2,3 +2,17 @@
width: 100px;
height: 21px;
}
+
+.header .external-table {
+ border-width: 0px;
+ border-collapse: collapse;
+ padding-bottom: 30px;
+}
+
+.header-column {
+ border-width: 1px;
+ padding: 5px;
+ border-style: dotted;
+ border-color: grey;
+}
+
Added: root/tests/metamer/trunk/src/main/webapp/resources/css/list.css
===================================================================
Modified: root/tests/metamer/trunk/src/main/webapp/resources/testapp/attributes.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/testapp/attributes.xhtml 2010-07-10
18:13:32 UTC (rev 17819)
+++ root/tests/metamer/trunk/src/main/webapp/resources/testapp/attributes.xhtml 2010-07-10
18:15:26 UTC (rev 17820)
@@ -1,54 +1,56 @@
<!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:rich="http://java.sun.com/jsf/composite/rich"
-
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core"
-
xmlns:composite="http://java.sun.com/jsf/composite">
+
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core"
+
xmlns:composite="http://java.sun.com/jsf/composite">
-<h:body>
- <composite:interface>
- <composite:attribute name="id" type="java.util.String"
/>
- <composite:attribute name="value"
type="org.richfaces.testapp.Attributes" required="true"
- shortDescription="Representation of attributes of a component."
/>
- <composite:attribute name="render" />
- <composite:attribute name="columns" default="2"
type="int" shortDescription="some description for columns" />
- </composite:interface>
+ <h:body>
+ <composite:interface>
+ <composite:attribute name="id" type="java.util.String"
/>
+ <composite:attribute name="value"
type="org.richfaces.testapp.Attributes" required="true"
+ shortDescription="Representation of attributes of a
component." />
+ <composite:attribute name="render" />
+ <composite:attribute name="columns" default="2"
type="int" shortDescription="some description for columns" />
+ </composite:interface>
- <composite:implementation>
- <h:panelGrid id="#{cc.attrs.id}" columns="#{cc.attrs.columns *
2}" styleClass="attributes"
- columnClasses="attributes-first-column, attributes-second-column,
attributes-first-column, attributes-second-column">
- <c:forEach items="#{cc.attrs.value}" var="entry">
+ <composite:implementation>
- <h:panelGroup layout="block">
- <h:outputLabel id="#{entry.key}Label"
value="#{entry.key}" style="margin-right: 5px;" />
- <h:graphicImage value="/resources/images/help.png"
title="#{cc.attrs.value.getHelp(entry.key)}"
- rendered="#{cc.attrs.value.getHelp(entry.key) != null}"
height="28px;"
- style="vertical-align: middle;"
styleClass="attribute-help" />
- </h:panelGroup>
+ <h:outputStylesheet library="testapp/css"
name="attributes.css" />
- <c:choose>
- <c:when
test="#{cc.attrs.value.isBoolean(entry.key)}">
- <h:selectBooleanCheckbox id="#{entry.key}Input"
value="#{cc.attrs.value[entry.key]}">
- <a4j:ajax event="change"
render="#{cc.attrs.render}" />
- </h:selectBooleanCheckbox>
- </c:when>
+ <h:panelGrid id="#{cc.attrs.id}"
columns="#{cc.attrs.columns * 2}" styleClass="attributes"
+ columnClasses="attributes-first-column,
attributes-second-column, attributes-first-column, attributes-second-column">
+ <c:forEach items="#{cc.attrs.value}"
var="entry">
- <c:when
test="#{cc.attrs.value.hasSelectOptions(entry.key)}">
- <h:selectOneRadio id="#{entry.key}Input"
value="#{cc.attrs.value[entry.key]}"
- layout="pageDirection">
- <f:selectItems
value="#{cc.attrs.value.getSelectOptions(entry.key)}" />
- <a4j:ajax event="change"
render="#{cc.attrs.render}" />
- </h:selectOneRadio>
- </c:when>
+ <h:panelGroup layout="block">
+ <h:outputLabel id="#{entry.key}Label"
value="#{entry.key}" style="margin-right: 5px;" />
+ <h:graphicImage value="/resources/images/help.png"
title="#{cc.attrs.value.getHelp(entry.key)}"
+
rendered="#{cc.attrs.value.getHelp(entry.key) != null}"
height="28px;"
+ style="vertical-align: middle;"
styleClass="attribute-help" />
+ </h:panelGroup>
- <c:otherwise>
- <h:inputText id="#{entry.key}Input"
value="#{cc.attrs.value[entry.key]}" style="width: 200px;">
- <a4j:ajax event="blur"
render="#{cc.attrs.render}" />
- </h:inputText>
- </c:otherwise>
- </c:choose>
+ <c:choose>
+ <c:when
test="#{cc.attrs.value.isBoolean(entry.key)}">
+ <h:selectBooleanCheckbox id="#{entry.key}Input"
value="#{cc.attrs.value[entry.key]}">
+ <a4j:ajax event="change"
render="#{cc.attrs.render}" />
+ </h:selectBooleanCheckbox>
+ </c:when>
- </c:forEach>
- </h:panelGrid>
- </composite:implementation>
-</h:body>
+ <c:when
test="#{cc.attrs.value.hasSelectOptions(entry.key)}">
+ <h:selectOneRadio id="#{entry.key}Input"
value="#{cc.attrs.value[entry.key]}"
+ layout="pageDirection">
+ <f:selectItems
value="#{cc.attrs.value.getSelectOptions(entry.key)}" />
+ <a4j:ajax event="change"
render="#{cc.attrs.render}" />
+ </h:selectOneRadio>
+ </c:when>
+
+ <c:otherwise>
+ <h:inputText id="#{entry.key}Input"
value="#{cc.attrs.value[entry.key]}" style="width: 200px;">
+ <a4j:ajax event="blur"
render="#{cc.attrs.render}" />
+ </h:inputText>
+ </c:otherwise>
+ </c:choose>
+
+ </c:forEach>
+ </h:panelGrid>
+ </composite:implementation>
+ </h:body>
</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/resources/testapp/css/attributes.css
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/testapp/css/attributes.css
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/resources/testapp/css/attributes.css 2010-07-10
18:15:26 UTC (rev 17820)
@@ -0,0 +1,26 @@
+.attributes {
+ border-width: 0px;
+ border-collapse: collapse;
+}
+
+.attributes-first-column {
+ border-width: 1px;
+ padding: 10px;
+ border-style: dotted;
+ border-color: grey;
+ border-right: none;
+}
+
+.attributes-second-column {
+ border-width: 1px;
+ padding: 10px;
+ padding-left: 0px;
+ border-style: dotted;
+ border-color: grey;
+ border-left: none;
+}
+
+.attributes-second-column table input {
+ margin-left: 0px;
+}
+
Modified: root/tests/metamer/trunk/src/main/webapp/templates/blue_div.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/templates/blue_div.xhtml 2010-07-10 18:13:32
UTC (rev 17819)
+++ root/tests/metamer/trunk/src/main/webapp/templates/blue_div.xhtml 2010-07-10 18:15:26
UTC (rev 17820)
@@ -5,7 +5,7 @@
<ui:composition>
- <div style="border: 3px blue dotted; padding: 10px; margin-top: 10px;
margin-bottom: 10px;"><ui:include
+ <div style="border: 2px blue dotted; padding: 10px; margin-top: 10px;
margin-bottom: 10px;"><ui:include
src="#{templateBean.nextTemplate}.xhtml" /></div>
</ui:composition>
Modified: root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml 2010-07-10 18:13:32
UTC (rev 17819)
+++ root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml 2010-07-10 18:15:26
UTC (rev 17820)
@@ -1,70 +1,70 @@
<ui:composition
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:rich="http://java.sun.com/jsf/composite/rich"
-
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://java.sun.com/jsf/composite/rich"
+
xmlns:c="http://java.sun.com/jsp/jstl/core">
- <h:form id="headerForm" style="padding-bottom: 30px;"
prependId="false">
- <h:panelGrid columns="6" border="1">
+ <h:panelGrid id="headerTable" columns="6" border="1"
styleClass="external-table" columnClasses="header-column, header-column,
header-column, header-column, header-column, header-column">
- <h:panelGrid columns="1">
- <h:commandLink id="goHomeLink"
action="/index?faces-redirect=true" value="Home" />
- <a4j:commandLink render="commonGrid" value="Rerender
all" id="reRenderAllLink" />
- </h:panelGrid>
+ <h:panelGrid columns="1">
+ <h:commandLink id="goHomeLink"
action="/index?faces-redirect=true" value="Home" />
+ <a4j:commandLink render="commonGrid" value="Rerender
all" id="reRenderAllLink" />
+ </h:panelGrid>
- <h:panelGrid columns="2" style="width: 180px;">
- <h:outputLabel id="a4jLogLabel"
for="a4jLogCheckbox" value="a4j:log" />
- <h:selectBooleanCheckbox id="a4jLogCheckbox"
value="#{richBean.log}">
- <a4j:ajax event="change" execute="@this"
render="a4jLogPanel" />
- </h:selectBooleanCheckbox>
- <h:outputLabel id="a4jStatusLabel" for="a4jStatus"
value="a4j:status" />
- <a4j:status id="a4jStatus">
- <f:facet name="start">
- <h:outputText value="WORKING" style="color:
red;" />
- </f:facet>
- </a4j:status>
- </h:panelGrid>
+ <h:panelGrid columns="2" width="180px">
+ <h:outputLabel id="a4jLogLabel" for="a4jLogCheckbox"
value="Display log" />
+ <h:selectBooleanCheckbox id="a4jLogCheckbox"
value="#{richBean.log}">
+ <a4j:ajax event="change" execute="@this"
render="a4jLogPanel" />
+ </h:selectBooleanCheckbox>
- <h:panelGrid columns="2">
- <h:outputLabel id="reTestsCheckboxLabel" value="Display
tests" for="reTestsCheckbox" />
- <h:selectBooleanCheckbox id="reTestsCheckbox"
value="#{richBean.reTests}" onchange="submit();"
- disabled="true" />
+ <h:outputLabel id="a4jStatusLabel" for="a4jStatus"
value="Status" />
+ <a4j:status id="a4jStatus">
+ <f:facet name="start">
+ <h:outputText value="WORKING" style="color:
red;" />
+ </f:facet>
+ </a4j:status>
+ </h:panelGrid>
- <h:outputLabel id="reComponentCheckboxLabel"
value="Display component" for="reComponentCheckbox" />
- <h:selectBooleanCheckbox id="reComponentCheckbox"
value="#{richBean.reComponent}" onchange="submit();" />
- </h:panelGrid>
+ <h:panelGrid columns="2">
+ <h:outputLabel id="reTestsCheckboxLabel" value="Display
tests" for="reTestsCheckbox" />
+ <h:selectBooleanCheckbox id="reTestsCheckbox"
value="#{richBean.reTests}" onchange="submit();"
+ disabled="true" />
- <h:panelGrid columns="1">
- <h:outputLabel id="skinSelectLabel" value="Select skin:
" for="skinSelect" />
+ <h:outputLabel id="reComponentCheckboxLabel" value="Display
component" for="reComponentCheckbox" />
+ <h:selectBooleanCheckbox id="reComponentCheckbox"
value="#{richBean.reComponent}" onchange="submit();" />
+ </h:panelGrid>
- <h:selectOneMenu id="skinSelect"
value="#{richBean.skin}" style="width: 130px;">
- <f:selectItems value="#{richBean.skins}" />
- </h:selectOneMenu>
+ <h:panelGrid columns="1">
+ <h:outputLabel id="skinSelectLabel" value="Select skin:
" for="skinSelect" />
- <h:selectOneMenu id="skinningSelect"
value="#{richBean.skinning}" style="width: 130px;">
- <f:selectItems value="#{richBean.skinningList}" />
- </h:selectOneMenu>
- </h:panelGrid>
+ <h:selectOneMenu id="skinSelect"
value="#{richBean.skin}" style="width: 130px;">
+ <f:selectItems value="#{richBean.skins}" />
+ </h:selectOneMenu>
- <h:panelGrid id="templatesSelector" columns="1">
- <h:outputText id="templateSelectMenuLabel"
value="Template:" />
+ <h:selectOneMenu id="skinningSelect"
value="#{richBean.skinning}" style="width: 130px;">
+ <f:selectItems value="#{richBean.skinningList}" />
+ </h:selectOneMenu>
+ </h:panelGrid>
- <ui:repeat var="var"
value="#{templateBean.templates}" varStatus="status">
- <h:selectOneMenu
value="#{templateBean.templates[status.index]}" id="templateSelect"
- style="width: 150px;">
- <f:selectItems
value="#{templateBean.availableTemplates}" />
- <f:converter converterId="templateNameConverter"
/>
- <a4j:ajax event="change"
render="headerForm" />
- </h:selectOneMenu>
- <br />
- </ui:repeat>
+ <h:panelGrid id="templatesSelector" columns="1">
+ <h:outputText id="templateSelectMenuLabel"
value="Template:" />
- <h:commandLink id="loadTemplate" value="Load"
render="commonGrid" />
+ <ui:repeat var="var" value="#{templateBean.templates}"
varStatus="status">
+ <h:selectOneMenu
value="#{templateBean.templates[status.index]}" id="templateSelect"
+ style="width: 150px;">
+ <f:selectItems
value="#{templateBean.availableTemplates}" />
+ <f:converter converterId="templateNameConverter" />
+ <a4j:ajax event="change" render="headerTable"
/>
+ </h:selectOneMenu>
+ <br />
+ </ui:repeat>
- </h:panelGrid>
+ <h:commandLink id="loadTemplate" value="Load"
render="commonGrid" />
- <h:panelGrid columns="1">
- <h:commandButton action="#{richBean.invalidateSession}"
value="Invalidate Session" />
- </h:panelGrid>
</h:panelGrid>
- </h:form>
+
+ <h:panelGrid columns="1">
+ <h:commandButton action="#{richBean.invalidateSession}"
value="Invalidate Session" />
+ </h:panelGrid>
+ </h:panelGrid>
+
</ui:composition>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/webapp/templates/red_div.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/templates/red_div.xhtml 2010-07-10 18:13:32
UTC (rev 17819)
+++ root/tests/metamer/trunk/src/main/webapp/templates/red_div.xhtml 2010-07-10 18:15:26
UTC (rev 17820)
@@ -5,7 +5,7 @@
<ui:composition>
- <div style="border: 3px red solid; padding: 10px; margin-top: 10px;
margin-bottom: 10px;"><ui:include
+ <div style="border: 2px red solid; padding: 10px; margin-top: 10px;
margin-bottom: 10px;"><ui:include
src="#{templateBean.nextTemplate}.xhtml" /></div>
</ui:composition>
Modified: root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml 2010-07-10 18:13:32
UTC (rev 17819)
+++ root/tests/metamer/trunk/src/main/webapp/templates/template.xhtml 2010-07-10 18:15:26
UTC (rev 17820)
@@ -1,44 +1,40 @@
<!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:rich="http://java.sun.com/jsf/composite/rich">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j">
-<h:head>
- <title><ui:insert name="pageTitle">Testing
Application</ui:insert></title>
- <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
-<!-- <h:outputStylesheet library="css" name="common.css"
/>-->
- <ui:insert name="viewParams"/>
- <ui:insert name="head"/>
-</h:head>
+ <h:head>
+ <title><ui:insert name="pageTitle">Testing
Application</ui:insert></title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="common.css" />
+ <ui:insert name="head"/>
+ </h:head>
-<h:body>
+ <h:body>
+ <h:form id="form">
+ <div class="header"><ui:include
src="/templates/header.xhtml" /></div>
- <div class="header"><ui:include
src="/templates/header.xhtml" /></div>
+ <div class="content">
+ <div class="messages"><h:messages /></div>
- <div class="content">
- <div class="messages"><rich:messages /></div>
+ <h:panelGroup id="commonGrid" layout="block"
rendered="#{richBean.reComponent}">
+ <div>
+ <div style="margin-bottom: 20px;"><ui:insert
name="outOfTemplateBefore" /></div>
+ <ui:include
src="/templates/#{templateBean.firstTemplate}.xhtml" />
+ <div style="margin-top: 20px;"><ui:insert
name="outOfTemplateAfter" /></div>
+ </div>
+ </h:panelGroup> <br />
- <h:panelGroup id="commonGrid" layout="block"
rendered="#{richBean.reComponent}">
- <div><b>Status: </b> <input style="border: 0px; color:
black; width: 700px" readonly="true"
- id="statusMessage" /></div>
- <br />
- <div><h:form id="componentForm">
- <div style="margin-bottom: 20px;"><ui:insert
name="outOfTemplateBefore" /></div>
- <ui:include src="/templates/#{templateBean.firstTemplate}.xhtml"
/>
- <div style="margin-top: 20px;"><ui:insert
name="outOfTemplateAfter" /></div>
- </h:form></div>
- </h:panelGroup> <br />
+ </div>
- </div>
+ <h:panelGroup id="a4jLogPanel" layout="block">
+ <a4j:log id="a4jLog" height="300px"
rendered="#{richBean.log}" />
+ </h:panelGroup>
- <h:panelGroup id="a4jLogPanel" layout="block">
- <a4j:log id="a4jLog" height="300px"
rendered="#{richBean.log}" />
- </h:panelGroup>
+ <div id="footer"><ui:insert name="footer">
+ <hr />
+ RichFaces #{a4j.version}
+ </ui:insert></div>
- <div id="footer"><ui:insert name="footer">
- <hr />
- RichFaces #{a4j.version}
- </ui:insert></div>
-</h:body>
-
+ </h:form>
+ </h:body>
</html>