Author: ppitonak(a)redhat.com
Date: 2010-07-20 11:11:58 -0400 (Tue, 20 Jul 2010)
New Revision: 18160
Added:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java
root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties
root/tests/metamer/trunk/application/src/main/webapp/components/richList/
root/tests/metamer/trunk/application/src/main/webapp/components/richList/list.xhtml
root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml
root/tests/metamer/trunk/application/src/main/webapp/resources/css/richList.css
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
* component rich:list added
Modified:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
---
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-07-20
13:33:16 UTC (rev 18159)
+++
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-07-20
15:11:58 UTC (rev 18160)
@@ -106,6 +106,7 @@
components.put("richDataScroller", "Rich Data Scroller");
components.put("richDataTable", "Rich Data Table");
components.put("richExtendedDataTable", "Rich Extended Data
Table");
+ components.put("richList", "Rich List");
}
private void createSkinList() {
Added:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java
===================================================================
---
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java
(rev 0)
+++
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java 2010-07-20
15:11:58 UTC (rev 18160)
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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 javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+import org.richfaces.component.UIList;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:list.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richListBean")
+@ViewScoped
+public class RichListBean implements Serializable {
+
+ private static final long serialVersionUID = 4008175400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UIList.class, getClass());
+
+ attributes.setAttribute("type", "ordered");
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("rows", 20);
+
+ // TODO has to be tested in other way
+ attributes.remove("componentState");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+ attributes.remove("value");
+ attributes.remove("var");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+}
Property changes on:
root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichListBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added:
root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties
===================================================================
---
root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties
(rev 0)
+++
root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichListBean.properties 2010-07-20
15:11:58 UTC (rev 18160)
@@ -0,0 +1,6 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.none=
+attr.type.ordered=ordered
+attr.type.unordered=unordered
+attr.type.definitions=definitions
\ No newline at end of file
Added:
root/tests/metamer/trunk/application/src/main/webapp/components/richList/list.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richList/list.xhtml
(rev 0)
+++
root/tests/metamer/trunk/application/src/main/webapp/components/richList/list.xhtml 2010-07-20
15:11:58 UTC (rev 18160)
@@ -0,0 +1,41 @@
+<!--
+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.
+-->
+
+<!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>Rich List</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+ </h:head>
+
+ <h:body>
+
+ <h:link outcome="simple" value="Simple"
styleClass="link" />
+ <div class="description">Simple page that contains
<b>rich:list</b> (with model containing capitals) and
+ input boxes for all its attributes.</div>
+
+ </h:body>
+</html>
\ No newline at end of file
Added:
root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml
(rev 0)
+++
root/tests/metamer/trunk/application/src/main/webapp/components/richList/simple.xhtml 2010-07-20
15:11:58 UTC (rev 18160)
@@ -0,0 +1,95 @@
+<!--
+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.
+-->
+
+<!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"
xmlns:rich="http://richfaces.org/rich"
+
xmlns:it="http://richfaces.org/iteration">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ <h:outputStylesheet library="css" name="richList.css"
/>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <it:list id="richList"
+ dir="#{richListBean.attributes['dir'].value}"
+ first="#{richListBean.attributes['first'].value}"
+
iterationState="#{richListBean.attributes['iterationState'].value}"
+
iterationStatusVar="#{richListBean.attributes['iterationStatusVar'].value}"
+
keepSaved="#{richListBean.attributes['keepSaved'].value}"
+ lang="#{richListBean.attributes['lang'].value}"
+
onclick="#{richListBean.attributes['onclick'].value}"
+
ondblclick="#{richListBean.attributes['ondblclick'].value}"
+
onkeydown="#{richListBean.attributes['onkeydown'].value}"
+
onkeypress="#{richListBean.attributes['onkeypress'].value}"
+
onkeyup="#{richListBean.attributes['onkeyup'].value}"
+
onmousedown="#{richListBean.attributes['onmousedown'].value}"
+
onmousemove="#{richListBean.attributes['onmousemove'].value}"
+
onmouseout="#{richListBean.attributes['onmouseout'].value}"
+
onmouseover="#{richListBean.attributes['onmouseover'].value}"
+
onmouseup="#{richListBean.attributes['onmouseup'].value}"
+
relativeRowIndex="#{richListBean.attributes['relativeRowIndex'].value}"
+
rendered="#{richListBean.attributes['rendered'].value}"
+
rowAvailable="#{richListBean.attributes['rowAvailable'].value}"
+
rowClass="#{richListBean.attributes['rowClass'].value}"
+
rowClasses="#{richListBean.attributes['rowClasses'].value}"
+
rowCount="#{richListBean.attributes['rowCount'].value}"
+
rowData="#{richListBean.attributes['rowData'].value}"
+
rowIndex="#{richListBean.attributes['rowIndex'].value}"
+
rowKey="#{richListBean.attributes['rowKey'].value}"
+
rowKeyConverter="#{richListBean.attributes['rowKeyConverter'].value}"
+ rows="#{richListBean.attributes['rows'].value}"
+ style="#{richListBean.attributes['style'].value}"
+
styleClass="#{richListBean.attributes['styleClass'].value}"
+ value="#{model.employees}"
+ var="item"
+ term="#{richListBean.attributes['term'].value}"
+ title="#{richListBean.attributes['title'].value}"
+
type="#{richListBean.attributes['type'].value}">
+ <f:facet name="term">
+ <h:outputText id="term" value="#{item.title}"
style="font-weight: bold"/>
+ </f:facet>
+
+ #{item.name}
+ </it:list>
+
+ <it:dataScroller for="richList" />
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{richListBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/application/src/main/webapp/resources/css/richList.css
===================================================================