Author: ppitonak(a)redhat.com
Date: 2010-12-16 08:44:29 -0500 (Thu, 16 Dec 2010)
New Revision: 20609
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java
Removed:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableToggleControlBean.java
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/components2.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTableToggler/simple.xhtml
Log:
* bean for collapsibleSubTable and collapsibleSubTableToggler renamed
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-12-16
13:02:05 UTC (rev 20608)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-12-16
13:44:29 UTC (rev 20609)
@@ -120,8 +120,8 @@
components.put("richAutocomplete", "Rich Autocomplete");
components.put("richCalendar", "Rich Calendar");
components.put("richCollapsiblePanel", "Rich Collapsible
Panel");
- components.put("richCollapsibleSubTable", "Rich Collapsible
Subtable");
- components.put("richCollapsibleSubTableToggler", "Rich Collapsible
Subtable Toggler");
+ components.put("richCollapsibleSubTable", "Rich Collapsible Sub
Table");
+ components.put("richCollapsibleSubTableToggler", "Rich Collapsible
Sub Table Toggler");
components.put("richColumn", "Rich Column");
components.put("richColumnGroup", "Rich Column Group");
components.put("richComponentControl", "Rich Component
Control");
Copied:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java
(from rev 20608,
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableBean.java)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java 2010-12-16
13:44:29 UTC (rev 20609)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * 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.tests.metamer.bean;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.component.UICollapsibleSubTable;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.Employee;
+import org.richfaces.tests.metamer.model.Employee.Sex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:collapsibleSubTable.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name="richSubTableBean")
+@SessionScoped
+public class RichCollapsibleSubTableBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ @ManagedProperty(value = "#{model.employees}")
+ private List<Employee> employees;
+ private List<List<Employee>> lists;
+ // true = model, false = empty table
+ private boolean state;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes =
Attributes.getComponentAttributesFromClass(UICollapsibleSubTable.class, getClass());
+
+ attributes.setAttribute("expandMode", "client");
+ attributes.setAttribute("expanded", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("rows", 5);
+
+ // TODO these attributes have to be tested in another way
+ attributes.remove("componentState");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+ attributes.remove("var");
+ attributes.remove("value");
+
+ List<Employee> men = new ArrayList<Employee>();
+ List<Employee> women = new ArrayList<Employee>();
+
+ for (Employee e : employees) {
+ if (e.getSex() == Sex.MALE) {
+ men.add(e);
+ } else {
+ women.add(e);
+ }
+ }
+
+ lists = new ArrayList<List<Employee>>();
+ lists.add(men);
+ lists.add(women);
+
+ state = true;
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<Employee> getEmployees() {
+ return employees;
+ }
+
+ public void setEmployees(List<Employee> employees) {
+ this.employees = employees;
+ }
+
+ public List<List<Employee>> getLists() {
+ return lists;
+ }
+
+ public void setLists(List<List<Employee>> lists) {
+ this.lists = lists;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+}
Copied:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java
(from rev 20608,
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableToggleControlBean.java)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java 2010-12-16
13:44:29 UTC (rev 20609)
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * 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.tests.metamer.bean;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.component.UICollapsibleSubTableToggleControl;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.model.Employee;
+import org.richfaces.tests.metamer.model.Employee.Sex;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:collapsibleSubTableToggler.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name="richSubTableTogglerBean")
+@SessionScoped
+public class RichCollapsibleSubTableTogglerlBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ @ManagedProperty(value = "#{model.employees}")
+ private List<Employee> employees;
+ private List<List<Employee>> lists;
+ // true = model, false = empty table
+ private boolean state;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes =
Attributes.getComponentAttributesFromClass(UICollapsibleSubTableToggleControl.class,
getClass());
+ attributes.setAttribute("event", "click");
+ attributes.setAttribute("rendered", true);
+ // TODO these attributes have to be tested in another way
+ attributes.remove("for");
+
+ List<Employee> men = new ArrayList<Employee>();
+ List<Employee> women = new ArrayList<Employee>();
+
+ for (Employee e : employees) {
+ if (e.getSex() == Sex.MALE) {
+ men.add(e);
+ } else {
+ women.add(e);
+ }
+ }
+
+ lists = new ArrayList<List<Employee>>();
+ lists.add(men);
+ lists.add(women);
+
+ state = true;
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public List<Employee> getEmployees() {
+ return employees;
+ }
+
+ public void setEmployees(List<Employee> employees) {
+ this.employees = employees;
+ }
+
+ public List<List<Employee>> getLists() {
+ return lists;
+ }
+
+ public void setLists(List<List<Employee>> lists) {
+ this.lists = lists;
+ }
+
+ public boolean isState() {
+ return state;
+ }
+
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+}
Deleted:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableBean.java 2010-12-16
13:02:05 UTC (rev 20608)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableBean.java 2010-12-16
13:44:29 UTC (rev 20609)
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * 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.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.SessionScoped;
-
-import org.richfaces.component.UICollapsibleSubTable;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Employee;
-import org.richfaces.tests.metamer.model.Employee.Sex;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:subTable.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richSubTableBean")
-@SessionScoped
-public class RichSubTableBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- @ManagedProperty(value = "#{model.employees}")
- private List<Employee> employees;
- private List<List<Employee>> lists;
- // true = model, false = empty table
- private boolean state;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes =
Attributes.getComponentAttributesFromClass(UICollapsibleSubTable.class, getClass());
-
- attributes.setAttribute("expandMode", "client");
- attributes.setAttribute("expanded", true);
- attributes.setAttribute("rendered", true);
- attributes.setAttribute("rows", 5);
-
- // TODO these attributes have to be tested in another way
- attributes.remove("componentState");
- attributes.remove("rowKeyVar");
- attributes.remove("stateVar");
- attributes.remove("var");
- attributes.remove("value");
-
- List<Employee> men = new ArrayList<Employee>();
- List<Employee> women = new ArrayList<Employee>();
-
- for (Employee e : employees) {
- if (e.getSex() == Sex.MALE) {
- men.add(e);
- } else {
- women.add(e);
- }
- }
-
- lists = new ArrayList<List<Employee>>();
- lists.add(men);
- lists.add(women);
-
- state = true;
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<Employee> getEmployees() {
- return employees;
- }
-
- public void setEmployees(List<Employee> employees) {
- this.employees = employees;
- }
-
- public List<List<Employee>> getLists() {
- return lists;
- }
-
- public void setLists(List<List<Employee>> lists) {
- this.lists = lists;
- }
-
- public boolean isState() {
- return state;
- }
-
- public void setState(boolean state) {
- this.state = state;
- }
-
-}
Deleted:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableToggleControlBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableToggleControlBean.java 2010-12-16
13:02:05 UTC (rev 20608)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSubTableToggleControlBean.java 2010-12-16
13:44:29 UTC (rev 20609)
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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.tests.metamer.bean;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.PostConstruct;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.SessionScoped;
-
-import org.richfaces.component.UICollapsibleSubTableToggleControl;
-import org.richfaces.tests.metamer.Attributes;
-import org.richfaces.tests.metamer.model.Employee;
-import org.richfaces.tests.metamer.model.Employee.Sex;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Managed bean for rich:subTableToggleControl.
- *
- * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
- * @version $Revision$
- */
-@ManagedBean(name = "richSubTableToggleControlBean")
-@SessionScoped
-public class RichSubTableToggleControlBean implements Serializable {
-
- private static final long serialVersionUID = -1L;
- private static Logger logger;
- private Attributes attributes;
- @ManagedProperty(value = "#{model.employees}")
- private List<Employee> employees;
- private List<List<Employee>> lists;
- // true = model, false = empty table
- private boolean state;
-
- /**
- * Initializes the managed bean.
- */
- @PostConstruct
- public void init() {
- logger = LoggerFactory.getLogger(getClass());
- logger.debug("initializing bean " + getClass().getName());
-
- attributes =
Attributes.getComponentAttributesFromClass(UICollapsibleSubTableToggleControl.class,
getClass());
- attributes.setAttribute("event", "click");
- attributes.setAttribute("rendered", true);
- // TODO these attributes have to be tested in another way
- attributes.remove("for");
-
- List<Employee> men = new ArrayList<Employee>();
- List<Employee> women = new ArrayList<Employee>();
-
- for (Employee e : employees) {
- if (e.getSex() == Sex.MALE) {
- men.add(e);
- } else {
- women.add(e);
- }
- }
-
- lists = new ArrayList<List<Employee>>();
- lists.add(men);
- lists.add(women);
-
- state = true;
- }
-
- public Attributes getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Attributes attributes) {
- this.attributes = attributes;
- }
-
- public List<Employee> getEmployees() {
- return employees;
- }
-
- public void setEmployees(List<Employee> employees) {
- this.employees = employees;
- }
-
- public List<List<Employee>> getLists() {
- return lists;
- }
-
- public void setLists(List<List<Employee>> lists) {
- this.lists = lists;
- }
-
- public boolean isState() {
- return state;
- }
-
- public void setState(boolean state) {
- this.state = state;
- }
-
-}
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/components2.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/components2.xhtml 2010-12-16
13:02:05 UTC (rev 20608)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/components2.xhtml 2010-12-16
13:44:29 UTC (rev 20609)
@@ -119,7 +119,7 @@
</rich:column>
<rich:column id="columnName">
<rich:inplaceInput id="nameInput"
value="#{item.name}" defaultLabel="Click here to edit">
- <a4j:ajax event="inputchange"
render="@this"/>
+ <a4j:ajax event="change"
render="@this"/>
</rich:inplaceInput>
</rich:column>
<rich:column id="columnTitle">
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTableToggler/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTableToggler/simple.xhtml 2010-12-16
13:02:05 UTC (rev 20608)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTableToggler/simple.xhtml 2010-12-16
13:44:29 UTC (rev 20609)
@@ -39,7 +39,7 @@
<ui:define name="outOfTemplateBefore">
<br/>
<h:outputText value="Show data in table: " />
- <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableToggleControlBean.state}">
+ <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableTogglerBean.state}">
<a4j:ajax render="richDataTable"/>
</h:selectBooleanCheckbox>
<br/><br/>
@@ -47,7 +47,7 @@
<ui:define name="component">
- <rich:dataTable id="richDataTable"
value="#{richSubTableToggleControlBean.lists}" var="list">
+ <rich:dataTable id="richDataTable"
value="#{richSubTableTogglerBean.lists}" var="list">
<f:facet name="header">
<rich:columnGroup>
<rich:column id="columnHeaderEmployees"
colspan="3">
@@ -67,12 +67,12 @@
<rich:column id="columnTC" colspan="3">
<rich:collapsibleSubTableToggler id="richSTTControl"
-
collapseIcon="#{richSubTableToggleControlBean.attributes['collapseIcon'].value}"
-
collapseLabel="#{richSubTableToggleControlBean.attributes['collapseLabel'].value}"
-
event="#{richSubTableToggleControlBean.attributes['event'].value}"
-
expandIcon="#{richSubTableToggleControlBean.attributes['expandIcon'].value}"
-
expandLabel="#{richSubTableToggleControlBean.attributes['expandLabel'].value}"
-
rendered="#{richSubTableToggleControlBean.attributes['rendered'].value}"
+
collapseIcon="#{richSubTableTogglerBean.attributes['collapseIcon'].value}"
+
collapseLabel="#{richSubTableTogglerBean.attributes['collapseLabel'].value}"
+
event="#{richSubTableTogglerBean.attributes['event'].value}"
+
expandIcon="#{richSubTableTogglerBean.attributes['expandIcon'].value}"
+
expandLabel="#{richSubTableTogglerBean.attributes['expandLabel'].value}"
+
rendered="#{richSubTableTogglerBean.attributes['rendered'].value}"
for="richSubTable"/>
<h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
</rich:column>
@@ -81,7 +81,7 @@
expandMode="client"
expanded="true"
rows="5"
-
value="#{richSubTableToggleControlBean.state ? list : null}"
+ value="#{richSubTableTogglerBean.state ?
list : null}"
var="item">
<f:facet name="header">
@@ -114,7 +114,7 @@
</ui:define>
<ui:define name="outOfTemplateAfter">
- <metamer:attributes
value="#{richSubTableToggleControlBean.attributes}" id="attributes"
/>
+ <metamer:attributes
value="#{richSubTableTogglerBean.attributes}" id="attributes" />
</ui:define>
</ui:composition>