Author: ppitonak(a)redhat.com
Date: 2010-11-02 11:57:11 -0400 (Tue, 02 Nov 2010)
New Revision: 19897
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
https://jira.jboss.org/browse/RF-9178
* added one page for rich:calendar
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-11-02
15:48:32 UTC (rev 19896)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-11-02
15:57:11 UTC (rev 19897)
@@ -114,6 +114,7 @@
components.put("richAccordion", "Rich Accordion");
components.put("richAccordionItem", "Rich Accordion Item");
components.put("richAutocomplete", "Rich Autocomplete");
+ components.put("richCalendar", "Rich Calendar");
components.put("richCollapsiblePanel", "Rich Collapsible
Panel");
components.put("richColumn", "Rich Column");
components.put("richColumnGroup", "Rich Column Group");
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2010-11-02
15:57:11 UTC (rev 19897)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * 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.Date;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import org.richfaces.component.UICalendar;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:calendar.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richCalendarBean")
+@SessionScoped
+public class RichCalendarBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private Date date = new Date();
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UICalendar.class, getClass(),
false);
+
+ attributes.setAttribute("popup", true);
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("showFooter", true);
+ attributes.setAttribute("showInput", true);
+
+ // TODO has to be tested in another way
+ attributes.remove("converter");
+ attributes.remove("validator");
+ attributes.remove("valueChangeListener");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+}
Property changes on:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2010-11-02
15:57:11 UTC (rev 19897)
@@ -0,0 +1,42 @@
+<?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">
+
+ <!--
+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.
+ -->
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Calendar</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ Simple page containing <b>rich:calendar</b> and inputs for
all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2010-11-02
15:57:11 UTC (rev 19897)
@@ -0,0 +1,120 @@
+<?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:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <!--
+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.
+ -->
+
+ <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>
+ <script type="text/javascript">
+ testedComponentId =
"#{rich:clientId('calendar')}";
+ </script>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:calendar id="calendar"
+
boundaryDatesMode="#{richCalendarBean.attributes['boundaryDatesMode'].value}"
+
buttonClass="#{richCalendarBean.attributes['buttonClass'].value}"
+
buttonIcon="#{richCalendarBean.attributes['buttonIcon'].value}"
+
buttonIconDisabled="#{richCalendarBean.attributes['buttonIconDisabled'].value}"
+
buttonLabel="#{richCalendarBean.attributes['buttonLabel'].value}"
+
converterMessage="#{richCalendarBean.attributes['converterMessage'].value}"
+
currentDate="#{richCalendarBean.attributes['currentDate'].value}"
+
datePattern="#{richCalendarBean.attributes['datePattern'].value}"
+
dayEnabled="#{richCalendarBean.attributes['dayEnabled'].value}"
+
dayStyleClass="#{richCalendarBean.attributes['dayStyleClass'].value}"
+
defaultTime="#{richCalendarBean.attributes['defaultTime'].value}"
+
direction="#{richCalendarBean.attributes['direction'].value}"
+
disable="#{richCalendarBean.attributes['disable'].value}"
+
enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
+
firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
+
hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
+
horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
+
immediate="#{richCalendarBean.attributes['immediate'].value}"
+
inputClass="#{richCalendarBean.attributes['inputClass'].value}"
+
inputSize="#{richCalendarBean.attributes['inputSize'].value}"
+
inputStyle="#{richCalendarBean.attributes['inputStyle'].value}"
+
jointPoint="#{richCalendarBean.attributes['jointPoint'].value}"
+
locale="#{richCalendarBean.attributes['locale'].value}"
+
minDaysInFirstWeek="#{richCalendarBean.attributes['minDaysInFirstWeek'].value}"
+
monthLabels="#{richCalendarBean.attributes['monthLabels'].value}"
+
monthLabelsShort="#{richCalendarBean.attributes['monthLabelsShort'].value}"
+
oninputblur="#{richCalendarBean.attributes['oninputblur'].value}"
+
oninputchange="#{richCalendarBean.attributes['oninputchange'].value}"
+
oninputclick="#{richCalendarBean.attributes['oninputclick'].value}"
+
oninputdblclick="#{richCalendarBean.attributes['oninputdblclick'].value}"
+
oninputfocus="#{richCalendarBean.attributes['oninputfocus'].value}"
+
oninputkeydown="#{richCalendarBean.attributes['oninputkeydown'].value}"
+
oninputkeypress="#{richCalendarBean.attributes['oninputkeypress'].value}"
+
oninputkeyup="#{richCalendarBean.attributes['oninputkeyup'].value}"
+
oninputmousedown="#{richCalendarBean.attributes['oninputmousedown'].value}"
+
oninputmousemove="#{richCalendarBean.attributes['oninputmousemove'].value}"
+
oninputmouseout="#{richCalendarBean.attributes['oninputmouseout'].value}"
+
oninputmouseover="#{richCalendarBean.attributes['oninputmouseover'].value}"
+
oninputmouseup="#{richCalendarBean.attributes['oninputmouseup'].value}"
+
oninputselect="#{richCalendarBean.attributes['oninputselect'].value}"
+
popup="#{richCalendarBean.attributes['popup'].value}"
+
rendered="#{richCalendarBean.attributes['rendered'].value}"
+
required="#{richCalendarBean.attributes['required'].value}"
+
requiredMessage="#{richCalendarBean.attributes['requiredMessage'].value}"
+
resetTimeOnDateSelect="#{richCalendarBean.attributes['resetTimeOnDateSelect'].value}"
+
showApplyButton="#{richCalendarBean.attributes['showApplyButton'].value}"
+
showFooter="#{richCalendarBean.attributes['showFooter'].value}"
+
showHeader="#{richCalendarBean.attributes['showHeader'].value}"
+
showInput="#{richCalendarBean.attributes['showInput'].value}"
+
showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
+
showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
+
style="#{richCalendarBean.attributes['style'].value}"
+
tabindex="#{richCalendarBean.attributes['tabindex'].value}"
+
timeZone="#{richCalendarBean.attributes['timeZone'].value}"
+
todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
+
validatorMessage="#{richCalendarBean.attributes['validatorMessage'].value}"
+
value="#{richCalendarBean.attributes['value'].value}"
+
verticalOffset="#{richCalendarBean.attributes['verticalOffset'].value}"
+
weekDayLabels="#{richCalendarBean.attributes['weekDayLabels'].value}"
+
weekDayLabelsShort="#{richCalendarBean.attributes['weekDayLabelsShort'].value}"
+
zindex="#{richCalendarBean.attributes['zindex'].value}"
+ />
+
+ <br/><br/>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richCalendarBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file