JBoss Rich Faces SVN: r2477 - in trunk/ui/simpleTogglePanel/src/main: java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-08-24 10:00:50 -0400 (Fri, 24 Aug 2007)
New Revision: 2477
Added:
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/taglib/
trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/taglib/SimpleTogglePanelListenerTagHandler.java
Modified:
trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
Log:
http://jira.jboss.com/jira/browse/RF-682
Modified: trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml 2007-08-24 13:34:04 UTC (rev 2476)
+++ trunk/ui/simpleTogglePanel/src/main/config/component/simpleTogglePanel.xml 2007-08-24 14:00:50 UTC (rev 2477)
@@ -26,6 +26,12 @@
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
</tag>
+ <taghandler generate="true">
+ <classname>org.richfaces.taglib.SimpleTogglePanelTagHandler</classname>
+ <superclass>
+ org.richfaces.taglib.SimpleTogglePanelListenerTagHandler
+ </superclass>
+ </taghandler>
&ui_component_attributes;
&html_events;
Added: trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/taglib/SimpleTogglePanelListenerTagHandler.java
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/taglib/SimpleTogglePanelListenerTagHandler.java (rev 0)
+++ trunk/ui/simpleTogglePanel/src/main/java/org/richfaces/taglib/SimpleTogglePanelListenerTagHandler.java 2007-08-24 14:00:50 UTC (rev 2477)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.taglib;
+
+import javax.faces.component.UIComponent;
+import javax.faces.el.MethodBinding;
+
+import org.richfaces.event.SimpleToggleEvent;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+public class SimpleTogglePanelListenerTagHandler extends ComponentHandler {
+ private final static String COLLAPSED_EXPANDED_LISTENER = "collapsedExpandedListener";
+
+ public SimpleTogglePanelListenerTagHandler(ComponentConfig config) {
+ super(config);
+ }
+
+ protected MetaRuleset createMetaRuleset(Class clazz) {
+ MetaRuleset ruleset = super.createMetaRuleset(clazz);
+
+ ruleset.addRule(new MetaRule() {
+
+ public Metadata applyRule(String name, final TagAttribute attribute, MetadataTarget metadataTarget) {
+ if (COLLAPSED_EXPANDED_LISTENER.equals(name)) {
+ return new Metadata() {
+ public void applyMetadata(FaceletContext context, Object object) {
+ MethodBinding binding = context.getFacesContext().getApplication().createMethodBinding(attribute.getValue(), new Class[] {SimpleToggleEvent.class});
+ ((UIComponent) object).getAttributes().put(COLLAPSED_EXPANDED_LISTENER, binding);
+ }
+ };
+ }
+ return null;
+ }
+ });
+
+ return ruleset;
+ }
+
+}
+
18 years, 8 months
JBoss Rich Faces SVN: r2476 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-24 09:34:04 -0400 (Fri, 24 Aug 2007)
New Revision: 2476
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
fixed some errors
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-24 13:25:53 UTC (rev 2475)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-24 13:34:04 UTC (rev 2476)
@@ -134,7 +134,7 @@
</itemizedlist>
<para> By default, the <emphasis>
<property>"direction"</property>
- </emphasis> attribute is set to "auto".</para>
+ </emphasis> attribute is set to "bottom-right".</para>
<para>The possible values for the <emphasis>
<property>"jointPoint"</property>
</emphasis> are: </para>
@@ -147,7 +147,7 @@
</itemizedlist>
<para> By default, the <emphasis>
<property>"jointPoint"</property>
- </emphasis> attribute is set to "auto".</para>
+ </emphasis> attribute is set to "bottom-left".</para>
<para>The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component provides to use <emphasis>
18 years, 8 months
JBoss Rich Faces SVN: r2475 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2007-08-24 09:25:53 -0400 (Fri, 24 Aug 2007)
New Revision: 2475
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
typos
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-08-24 13:16:54 UTC (rev 2474)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-08-24 13:25:53 UTC (rev 2475)
@@ -665,7 +665,7 @@
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.FastFilter</filter-class>
</filter>]]></programlisting>
- <para>This <property>filter</property> is based on the Nekko pacer. In this case an
+ <para>This <property>filter</property> is based on the Neko parser. In this case an
output xhtml code isn't strictly verified and it also could cause
lot's of errors and corrupt a layout as a result. Though if you
sure that your application markup is really strict for this filter, the
18 years, 8 months
JBoss Rich Faces SVN: r2474 - trunk/test-applications/jsp/src/main/webapp/DataFilterSlider.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-08-24 09:16:54 -0400 (Fri, 24 Aug 2007)
New Revision: 2474
Modified:
trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DFS.jsp
Log:
update
Modified: trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DFS.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DFS.jsp 2007-08-24 13:15:03 UTC (rev 2473)
+++ trunk/test-applications/jsp/src/main/webapp/DataFilterSlider/DFS.jsp 2007-08-24 13:16:54 UTC (rev 2474)
@@ -128,14 +128,8 @@
</f:facet>
<h:outputText value="#{category.mileage}" />
</h:column>
-
</h:dataTable>
-
-
</a4j:outputPanel>
-
-
-
</a4j:region>
<h:commandLink value="Back" action="main"></h:commandLink>
</a4j:form>
18 years, 8 months
JBoss Rich Faces SVN: r2473 - in trunk/test-applications/jsp/src/main: webapp/Calendar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-08-24 09:15:03 -0400 (Fri, 24 Aug 2007)
New Revision: 2473
Added:
trunk/test-applications/jsp/src/main/java/calendar/Bean.java
Modified:
trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
Log:
http://jira.jboss.com/jira/browse/RF-697
Added: trunk/test-applications/jsp/src/main/java/calendar/Bean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/Bean.java (rev 0)
+++ trunk/test-applications/jsp/src/main/java/calendar/Bean.java 2007-08-24 13:15:03 UTC (rev 2473)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package calendar;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+}
Modified: trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-08-24 13:14:21 UTC (rev 2472)
+++ trunk/test-applications/jsp/src/main/java/calendar/CalendarBean.java 2007-08-24 13:15:03 UTC (rev 2473)
@@ -29,24 +29,30 @@
/**
* 20/07/2007
- * @author Alexej Kushunin
- * @mailto: akushunin(a)exadel.com
- *
+ *
+ * @author Alexej Kushunin
+ * @mailto: akushunin(a)exadel.com
+ *
*/
public class CalendarBean {
-
- private static final String[] WEEK_DAY_LABELS = new String[] {"Sun *", "Mon +", "Tue +", "Wed +", "Thu +", "Fri +", "Sat *"};
+
+ private static final String[] WEEK_DAY_LABELS = new String[] { "Sun *",
+ "Mon +", "Tue +", "Wed +", "Thu +", "Fri +", "Sat *" };
private Locale locale;
-
+
private boolean popup;
+ private boolean readonly;
+ private boolean showInput;
+ private boolean enableManualInput;
private String pattern;
private Date currentDate;
private Date selectedDate;
private String jointPoint;
private String direction;
-
+ private String boundary;
+
private boolean useCustomDayLabels;
-
+
public Locale getLocale() {
return locale;
}
@@ -55,7 +61,6 @@
this.locale = locale;
}
-
public boolean isPopup() {
return popup;
}
@@ -63,7 +68,6 @@
public void setPopup(boolean popup) {
this.popup = popup;
}
-
public String getPattern() {
return pattern;
@@ -74,21 +78,50 @@
}
public CalendarBean() {
-
+
locale = Locale.US;
popup = true;
pattern = "MMM d, yyyy";
jointPoint = "bottom-left";
direction = "bottom-right";
+ readonly = true;
+ enableManualInput=false;
+ showInput=true;
+ boundary = "inactive";
}
- public void selectLocale(ValueChangeEvent event){
-
+
+ public boolean isShowInput() {
+ return showInput;
+ }
+
+ public void setShowInput(boolean showInput) {
+ this.showInput = showInput;
+ }
+
+ public boolean isEnableManualInput() {
+ return enableManualInput;
+ }
+
+ public void setEnableManualInput(boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(boolean readonly) {
+ this.readonly = readonly;
+ }
+
+ public void selectLocale(ValueChangeEvent event) {
+
String tLocale = (String) event.getNewValue();
if (tLocale != null) {
- String lang = tLocale.substring(0,2);
+ String lang = tLocale.substring(0, 2);
String country = tLocale.substring(3);
- locale = new Locale(lang,country,"");
+ locale = new Locale(lang, country, "");
}
}
@@ -99,7 +132,7 @@
public void setUseCustomDayLabels(boolean useCustomDayLabels) {
this.useCustomDayLabels = useCustomDayLabels;
}
-
+
public Object getWeekDayLabelsShort() {
if (isUseCustomDayLabels()) {
return WEEK_DAY_LABELS;
@@ -111,9 +144,10 @@
public String getCurrentDateAsText() {
Date currentDate = getCurrentDate();
if (currentDate != null) {
- return DateFormat.getDateInstance(DateFormat.FULL).format(currentDate);
+ return DateFormat.getDateInstance(DateFormat.FULL).format(
+ currentDate);
}
-
+
return null;
}
@@ -132,23 +166,37 @@
public void setSelectedDate(Date selectedDate) {
this.selectedDate = selectedDate;
}
-
+
public String getJointPoint() {
return jointPoint;
}
+
public void setJointPoint(String jointPoint) {
this.jointPoint = jointPoint;
}
- public void selectJointPoint(ValueChangeEvent event){
+
+ public void selectJointPoint(ValueChangeEvent event) {
jointPoint = (String) event.getNewValue();
}
+
public String getDirection() {
return direction;
}
+
public void setDirection(String direction) {
this.direction = direction;
}
- public void selectDirection(ValueChangeEvent event){
+
+ public void selectDirection(ValueChangeEvent event) {
direction = (String) event.getNewValue();
}
-}
\ No newline at end of file
+
+ public String getBoundary() {
+ return boundary;
+ }
+
+ public void setBoundary(String boundary) {
+ this.boundary = boundary;
+ }
+
+}
Modified: trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-08-24 13:14:21 UTC (rev 2472)
+++ trunk/test-applications/jsp/src/main/webapp/Calendar/Calendar.jsp 2007-08-24 13:15:03 UTC (rev 2473)
@@ -1,14 +1,15 @@
-<%@ page pageEncoding="UTF-8"%>
+<%@ page pageEncoding="UTF-8" %>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-<f:view>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
-<head>
-<title></title>
-<style type="text/css">
+ <head>
+ <title></title>
+ <style type="text/css">
.smallText {
font-size: xx-small;
}
@@ -20,103 +21,113 @@
background-color: #0087FF;
}
</style>
-</head>
-<f:subview id="Calendar">
- <a4j:outputPanel ajaxRendered="true">
- <h:messages />
- </a4j:outputPanel>
- <h:form>
-
- <rich:calendar id="calendar" data="#{calendarDataModel}"
- locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
- datePattern="#{calendarBean.pattern}"
- weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
- value="#{calendarBean.selectedDate}"
- currentDate="#{calendarBean.currentDate}"
- jointPoint="#{calendarBean.jointPoint}"
- direction="#{calendarBean.direction}" buttonLabel="PopUp">
-
- <f:validator validatorId="org.richfaces.CalendarValidator" />
-
- <h:panelGrid columns="2">
- <f:verbatim>
- <p style="padding: 2px;"<%-- class="largeText"--%>>{day}</p>
- </f:verbatim>
- <%-- h:panelGrid>
+ </head>
+ <body>
+ <f:view>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages />
+ </a4j:outputPanel>
+ <h:form>
+ <rich:calendar
+ id="calendar"
+ data="#{calendarDataModel}"
+ locale="#{calendarBean.locale}"
+ popup="#{calendarBean.popup}"
+ datePattern="#{calendarBean.pattern}"
+ weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
+ value="#{calendarBean.selectedDate}"
+ currentDate="#{calendarBean.currentDate}"
+ jointPoint="#{calendarBean.jointPoint}"
+ direction="#{calendarBean.direction}"
+ buttonLabel="PopUp"
+ enableManualInput="#{calendarBean.enableManualInput}"
+ showInput="#{calendarBean.showInput}"
+ boundaryDatesMode="#{calendarBean.boundary}">
+ <f:facet name="optionalHeader">
+ <h:outputText value="optionalHeader Facet" />
+ </f:facet>
+ <f:facet name="optionalFooter">
+ <h:outputText value="optionalFooter Facet" />
+ </f:facet>
+ <f:validator validatorId="org.richfaces.CalendarValidator" />
+
+ <h:panelGrid columns="2">
+ <f:verbatim><p style="padding: 2px;" <%-- class="largeText"--%>>{day}</p></f:verbatim>
+ <%-- h:panelGrid>
<h:outputText styleClass="smallText" value="{data.enLabel}" />
<h:outputText styleClass="smallText" value="{data.frLabel}" />
<h:outputText styleClass="smallText" value="{data.deLabel}" />
</h:panelGrid--%>
- </h:panelGrid>
- </rich:calendar>
+ </h:panelGrid>
+ </rich:calendar>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Select Locale:" />
+ <h:selectOneRadio onchange="submit()" value="en/US" valueChangeListener="#{calendarBean.selectLocale}">
+ <f:selectItem itemLabel="US" itemValue="en/US"/>
+ <f:selectItem itemLabel="DE" itemValue="de/DE"/>
+ <f:selectItem itemLabel="FR" itemValue="fr/FR"/>
+ <f:selectItem itemLabel="RU" itemValue="ru/RU"/>
+ </h:selectOneRadio>
+ <h:outputText value="Popup Mode:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.popup}" onclick="submit()"/>
+ <h:outputText value="Custom day labels:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}" onclick="submit()"/>
+ <h:outputText value="Select Date Pattern:"/>
+ <h:selectOneMenu value="#{calendarBean.pattern}" onchange="submit()">
+ <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy"/>
+ <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy"/>
+ <f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y"/>
+ <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy"/>
+ </h:selectOneMenu>
+ <h:inputText id="selectdate"/><h:commandButton type="button" value="Select Date" onclick="$(this.form.id+':calendar').component.selectDate(this.form[this.form.id+':selectdate'].value);"/>
+ <h:outputText value="Select Popup Joint Point:" />
+ <h:selectOneRadio onchange="submit()" value="#{calendarBean.jointPoint}" valueChangeListener="#{calendarBean.selectJointPoint}">
+ <f:selectItem itemLabel="bottom-right" itemValue="bottom-right"/>
+ <f:selectItem itemLabel="bottom-left" itemValue="bottom-left"/>
+ <f:selectItem itemLabel="top-right" itemValue="top-right"/>
+ <f:selectItem itemLabel="top-left" itemValue="top-left"/>
+ </h:selectOneRadio>
+ <h:outputText value="Select Popup Direction:" />
+ <h:selectOneRadio onchange="submit()" value="#{calendarBean.direction}" valueChangeListener="#{calendarBean.selectDirection}">
+ <f:selectItem itemLabel="bottom-right" itemValue="bottom-right"/>
+ <f:selectItem itemLabel="bottom-left" itemValue="bottom-left"/>
+ <f:selectItem itemLabel="top-right" itemValue="top-right"/>
+ <f:selectItem itemLabel="top-left" itemValue="top-left"/>
+ <f:selectItem itemLabel="auto" itemValue="auto"/>
+ </h:selectOneRadio>
+ <h:outputText value="BoundaryDatesMode:" />
+ <h:selectOneRadio onclick="submit()" value="#{calendarBean.boundary}">
+ <f:selectItem itemLabel="inactive" itemValue="inactive"/>
+ <f:selectItem itemLabel="select" itemValue="select"/>
+ <f:selectItem itemLabel="scroll" itemValue="scroll"/>
+ </h:selectOneRadio>
+ <h:outputText value="EnableManualInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.enableManualInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+ <h:outputText value="ShowInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.showInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+
+
- <h:panelGrid columns="2">
- <h:outputText value="Select Locale:" />
- <h:selectOneRadio onchange="submit()" value="en/US"
- valueChangeListener="#{calendarBean.selectLocale}">
- <f:selectItem itemLabel="US" itemValue="en/US" />
- <f:selectItem itemLabel="DE" itemValue="de/DE" />
- <f:selectItem itemLabel="FR" itemValue="fr/FR" />
- <f:selectItem itemLabel="RU" itemValue="ru/RU" />
- </h:selectOneRadio>
- <h:outputText value="Popup Mode:" />
- <h:selectBooleanCheckbox value="#{calendarBean.popup}"
- onclick="submit()" />
- <h:outputText value="Custom day labels:" />
- <h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}"
- onclick="submit()" />
- <h:outputText value="Select Date Pattern:" />
- <h:selectOneMenu value="#{calendarBean.pattern}" onchange="submit()">
- <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy" />
- <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy" />
- <f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y" />
- <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy" />
- </h:selectOneMenu>
- <h:inputText id="selectdate" />
- <h:commandButton type="button" value="Select Date"
- onclick="$(this.form.id+':calendar').component.selectDate(this.form[this.form.id+':selectdate'].value);" />
- <h:outputText value="Select Popup Joint Point:" />
- <h:selectOneRadio onchange="submit()"
- value="#{calendarBean.jointPoint}"
- valueChangeListener="#{calendarBean.selectJointPoint}">
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- </h:selectOneRadio>
- <h:outputText value="Select Popup Direction:" />
- <h:selectOneRadio onchange="submit()"
- value="#{calendarBean.direction}"
- valueChangeListener="#{calendarBean.selectDirection}">
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- <f:selectItem itemLabel="auto" itemValue="auto" />
- </h:selectOneRadio>
-
- <%-- <h:commandButton id="calendarPopup" type="button" value="popup" onclick="$(this.form.id+':calendar').component.doSwitch();"/>
- --%>
- </h:panelGrid>
-
- <h:outputText value="Current date: " />
- <h:outputText value="#{calendarBean.currentDateAsText}" />
- <f:verbatim>
- <br />
- </f:verbatim>
- <h:outputText value="Selected date: " />
- <h:outputText value="#{calendarBean.selectedDate}" />
- <f:verbatim>
- <br />
- </f:verbatim>
-
- <h:commandButton value="Submit" />
-
- </h:form>
- <h:form>
- <h:commandLink value="Back" action="main"></h:commandLink>
- </h:form>
-</f:subview>
-</html>
-</f:view>
-
+ <%-- <h:commandButton id="calendarPopup" type="button" value="popup" onclick="$(this.form.id+':calendar').component.doSwitch();"/>
+ --%> </h:panelGrid>
+
+ <h:outputText value="Current date: "/>
+ <h:outputText value="#{calendarBean.currentDateAsText}" />
+ <f:verbatim><br /></f:verbatim>
+ <h:outputText value="Selected date: "/>
+ <h:outputText value="#{calendarBean.selectedDate}" />
+ <f:verbatim><br /></f:verbatim>
+
+ <h:commandButton value="Submit"/>
+ </h:form>
+ <h:form>
+ <h:commandLink value="Back" action="main"></h:commandLink>
+ </h:form>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
18 years, 8 months
JBoss Rich Faces SVN: r2472 - in trunk/test-applications/facelets/src/main: webapp/Calendar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-08-24 09:14:21 -0400 (Fri, 24 Aug 2007)
New Revision: 2472
Added:
trunk/test-applications/facelets/src/main/java/calendar/Bean.java
Modified:
trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-697
Added: trunk/test-applications/facelets/src/main/java/calendar/Bean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/Bean.java (rev 0)
+++ trunk/test-applications/facelets/src/main/java/calendar/Bean.java 2007-08-24 13:14:21 UTC (rev 2472)
@@ -0,0 +1,29 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package calendar;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+}
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-08-24 13:14:17 UTC (rev 2471)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-08-24 13:14:21 UTC (rev 2472)
@@ -29,24 +29,30 @@
/**
* 20/07/2007
- * @author Alexej Kushunin
- * @mailto: akushunin(a)exadel.com
- *
+ *
+ * @author Alexej Kushunin
+ * @mailto: akushunin(a)exadel.com
+ *
*/
public class CalendarBean {
-
- private static final String[] WEEK_DAY_LABELS = new String[] {"Sun *", "Mon +", "Tue +", "Wed +", "Thu +", "Fri +", "Sat *"};
+
+ private static final String[] WEEK_DAY_LABELS = new String[] { "Sun *",
+ "Mon +", "Tue +", "Wed +", "Thu +", "Fri +", "Sat *" };
private Locale locale;
-
+
private boolean popup;
+ private boolean readonly;
+ private boolean showInput;
+ private boolean enableManualInput;
private String pattern;
private Date currentDate;
private Date selectedDate;
private String jointPoint;
private String direction;
-
+ private String boundary;
+
private boolean useCustomDayLabels;
-
+
public Locale getLocale() {
return locale;
}
@@ -55,7 +61,6 @@
this.locale = locale;
}
-
public boolean isPopup() {
return popup;
}
@@ -63,7 +68,6 @@
public void setPopup(boolean popup) {
this.popup = popup;
}
-
public String getPattern() {
return pattern;
@@ -74,21 +78,50 @@
}
public CalendarBean() {
-
+
locale = Locale.US;
popup = true;
pattern = "MMM d, yyyy";
jointPoint = "bottom-left";
direction = "bottom-right";
+ readonly = true;
+ enableManualInput=false;
+ showInput=true;
+ boundary = "inactive";
}
- public void selectLocale(ValueChangeEvent event){
-
+
+ public boolean isShowInput() {
+ return showInput;
+ }
+
+ public void setShowInput(boolean showInput) {
+ this.showInput = showInput;
+ }
+
+ public boolean isEnableManualInput() {
+ return enableManualInput;
+ }
+
+ public void setEnableManualInput(boolean enableManualInput) {
+ this.enableManualInput = enableManualInput;
+ }
+
+ public boolean isReadonly() {
+ return readonly;
+ }
+
+ public void setReadonly(boolean readonly) {
+ this.readonly = readonly;
+ }
+
+ public void selectLocale(ValueChangeEvent event) {
+
String tLocale = (String) event.getNewValue();
if (tLocale != null) {
- String lang = tLocale.substring(0,2);
+ String lang = tLocale.substring(0, 2);
String country = tLocale.substring(3);
- locale = new Locale(lang,country,"");
+ locale = new Locale(lang, country, "");
}
}
@@ -99,7 +132,7 @@
public void setUseCustomDayLabels(boolean useCustomDayLabels) {
this.useCustomDayLabels = useCustomDayLabels;
}
-
+
public Object getWeekDayLabelsShort() {
if (isUseCustomDayLabels()) {
return WEEK_DAY_LABELS;
@@ -111,9 +144,10 @@
public String getCurrentDateAsText() {
Date currentDate = getCurrentDate();
if (currentDate != null) {
- return DateFormat.getDateInstance(DateFormat.FULL).format(currentDate);
+ return DateFormat.getDateInstance(DateFormat.FULL).format(
+ currentDate);
}
-
+
return null;
}
@@ -132,23 +166,37 @@
public void setSelectedDate(Date selectedDate) {
this.selectedDate = selectedDate;
}
-
+
public String getJointPoint() {
return jointPoint;
}
+
public void setJointPoint(String jointPoint) {
this.jointPoint = jointPoint;
}
- public void selectJointPoint(ValueChangeEvent event){
+
+ public void selectJointPoint(ValueChangeEvent event) {
jointPoint = (String) event.getNewValue();
}
+
public String getDirection() {
return direction;
}
+
public void setDirection(String direction) {
this.direction = direction;
}
- public void selectDirection(ValueChangeEvent event){
+
+ public void selectDirection(ValueChangeEvent event) {
direction = (String) event.getNewValue();
}
-}
\ No newline at end of file
+
+ public String getBoundary() {
+ return boundary;
+ }
+
+ public void setBoundary(String boundary) {
+ this.boundary = boundary;
+ }
+
+}
Modified: trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-08-24 13:14:17 UTC (rev 2471)
+++ trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-08-24 13:14:21 UTC (rev 2472)
@@ -9,17 +9,18 @@
<head>
<title></title>
<style type="text/css">
- .smallText {
- font-size: xx-small;
- }
- .largeText {
- font-size: xx-large;
- }
-
- .Selecteddayclass {
- background-color: #0087FF;
- }
- </style>
+.smallText {
+ font-size: xx-small;
+}
+
+.largeText {
+ font-size: xx-large;
+}
+
+.Selecteddayclass {
+ background-color: #0087FF;
+}
+</style>
</head>
<body>
@@ -35,11 +36,20 @@
value="#{calendarBean.selectedDate}"
currentDate="#{calendarBean.currentDate}"
jointPoint="#{calendarBean.jointPoint}"
- direction="#{calendarBean.direction}" buttonLabel="PopUp">
-
+ direction="#{calendarBean.direction}" buttonLabel="PopUp"
+ enableManualInput="#{calendarBean.enableManualInput}"
+ showInput="#{calendarBean.showInput}"
+ boundaryDatesMode="#{calendarBean.boundary}">
+ <f:facet name="optionalHeader">
+ <h:outputText value="optionalHeader Facet" />
+ </f:facet>
+ <f:facet name="optionalFooter">
+ <h:outputText value="optionalFooter Facet" />
+ </f:facet>
<f:validator validatorId="org.richfaces.CalendarValidator" />
<h:panelGrid columns="2">
+
<f:verbatim>
<p style="padding: 2px;" class="largeText">{day}</p>
</f:verbatim>
@@ -95,24 +105,40 @@
<f:selectItem itemLabel="top-left" itemValue="top-left" />
<f:selectItem itemLabel="auto" itemValue="auto" />
</h:selectOneRadio>
+ <h:outputText value="BoundaryDatesMode:" />
+ <h:selectOneRadio onclick="submit()" value="#{calendarBean.boundary}">
+ <f:selectItem itemLabel="inactive" itemValue="inactive" />
+ <f:selectItem itemLabel="select" itemValue="select" />
+ <f:selectItem itemLabel="scroll" itemValue="scroll" />
+ </h:selectOneRadio>
+ <h:outputText value="EnableManualInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.enableManualInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+ <h:outputText value="ShowInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.showInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
<!-- <h:commandButton id="calendarPopup" type="button" value="popup" onclick="$(this.form.id+':calendar').component.doSwitch();"/>-->
-
+
</h:panelGrid>
<h:outputText value="Current date: " />
<h:outputText value="#{calendarBean.currentDateAsText}" />
+
<f:verbatim>
<br />
</f:verbatim>
+
<h:outputText value="Selected date: " />
<h:outputText value="#{calendarBean.selectedDate}" />
+
<f:verbatim>
<br />
</f:verbatim>
<h:commandButton value="Submit" />
-
</h:form>
<h:form>
18 years, 8 months
JBoss Rich Faces SVN: r2471 - in trunk/ui/calendar/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-24 09:14:17 -0400 (Fri, 24 Aug 2007)
New Revision: 2471
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
RF-649 fixed
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-24 13:01:53 UTC (rev 2470)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-24 13:14:17 UTC (rev 2471)
@@ -196,7 +196,14 @@
<classname>java.lang.String</classname>
<description></description>
</property>
-
+ <property>
+ <name>zindex</name>
+ <classname>int</classname>
+ <description>
+ Attribute is similar to the standard HTML attribute and can specify window placement relative to the content
+ </description>
+ <defaultvalue>3</defaultvalue>
+ </property>
</component>
</components>
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-24 13:01:53 UTC (rev 2470)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-24 13:14:17 UTC (rev 2471)
@@ -14,7 +14,7 @@
<h:styles>/org/richfaces/renderkit/html/css/calendar.xcss</h:styles>
<div id="#{clientId}"
- style="#{component.attributes['style']}"
+ style="z-index:#{component.attributes['zindex']}; #{component.attributes['style']}"
class="#{component.attributes['styleClass']}"
x:passThruWithExclusions="value,name,type,id"><script
type="text/javascript">
18 years, 8 months
JBoss Rich Faces SVN: r2470 - trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-08-24 09:01:53 -0400 (Fri, 24 Aug 2007)
New Revision: 2470
Modified:
trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
Log:
fix RF-688
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-08-24 12:38:52 UTC (rev 2469)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-08-24 13:01:53 UTC (rev 2470)
@@ -165,9 +165,11 @@
if (label == null || label.length() == 0) {
label = " ";
+ writer.write(label);
+ }else{
+ writer.writeText(label,null);
}
-
- writer.write(label);
+
}
}
18 years, 8 months
JBoss Rich Faces SVN: r2469 - in trunk/ui/scrollableDataTable/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-08-24 08:38:52 -0400 (Fri, 24 Aug 2007)
New Revision: 2469
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx
Log:
RF-690
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-08-24 12:07:27 UTC (rev 2468)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-08-24 12:38:52 UTC (rev 2469)
@@ -86,9 +86,9 @@
writer.startElement("col", column);
getUtils().writeAttribute(writer, "width", column.getAttributes().get("width"));
getUtils().writeAttribute(writer, "style", column.getAttributes().get("style"));
- int cell_index = state.getCellIndex();
- Object columnClass = state.getColumnClass(cell_index);
- if(columnClass!=null) getUtils().writeAttribute(writer, "class", columnClass);
+ //int cell_index = state.getCellIndex();
+ //Object columnClass = state.getColumnClass(cell_index);
+ //if(columnClass!=null) getUtils().writeAttribute(writer, "class", columnClass);
writer.endElement("col");
}
@@ -119,10 +119,14 @@
state.setSepOffset(new Integer(sepOffset));
}
+
+
variables.setVariable("client_id", client_id);
variables.setVariable("cell_index", new Integer(cell_index));
variables.setVariable("sepOffset", new Integer(sepOffset));
-
+ variables.setVariable("headerColumnClass", state.getColumnClass());
+ //variables.setVariable("headerCellClass", state.get);
+
headerCellTemplate.encodeBegin(context, column);
headerRenderer.visit(context, column, writer, state);
headerCellTemplate.encodeEnd(context, column);
@@ -209,6 +213,7 @@
ComponentVariables variables = ComponentsVariableResolver.getVariables(footerCellTemplate, column);
variables.setVariable("client_id", client_id);
variables.setVariable("cell_index", new Integer(cell_index));
+ variables.setVariable("footerColumnClass", state.getColumnClass());
UIComponent component = column.getFacet(FOOTER_PART);
@@ -237,7 +242,7 @@
variables.setVariable("cell_id",cell_id);
variables.setVariable("client_id", client_id);
variables.setVariable("cell_index", new Integer(cell_index));
- variables.setVariable("columnClass", state.getColumnClass(cell_index));
+ variables.setVariable("columnClass", state.getColumnClass());
cellTemplate.encodeBegin(context, column);
if(!state.isFake()) {
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java 2007-08-24 12:07:27 UTC (rev 2468)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java 2007-08-24 12:38:52 UTC (rev 2469)
@@ -392,6 +392,15 @@
this.fake = fake;
}
+ public String getColumnHeaderClass() {
+ return "";
+ }
+
+
+ public String getColumnClass() {
+ return getColumnClass(getCellIndex());
+ }
+
public String getColumnClass(int index) {
if(columnClasses != null) {
return columnClasses[index % columnClassesSize];
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx 2007-08-24 12:07:27 UTC (rev 2468)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-cell.jspx 2007-08-24 12:38:52 UTC (rev 2469)
@@ -11,7 +11,7 @@
component="javax.faces.component.UIComponent"
>
- <td class="dr-sdt-bc rich-sdt-column-cell #{component.attributes['styleClass']}" id="#{client_id}:c_#{cell_id}">
+ <td class="dr-sdt-bc rich-sdt-column-cell #{columnClass} #{component.attributes['styleClass']}" id="#{client_id}:c_#{cell_id}">
<div id="#{client_id}:bc_#{cell_id}" class="dr-sdt-bcbody #{component.attributes['cellClass']}" style="#{component.attributes['cellStyle']}">
<vcp:body/>
</div>
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx 2007-08-24 12:07:27 UTC (rev 2468)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-footer-cell.jspx 2007-08-24 12:38:52 UTC (rev 2469)
@@ -11,7 +11,7 @@
component="javax.faces.component.UIComponent"
>
- <th class="dr-sdt-fc rich-sdt-footer-cell #{component.attributes['footerClass']}">
+ <th class="dr-sdt-fc rich-sdt-footer-cell #{footerColumnClass} #{component.attributes['footerClass']}">
<span id="#{client_id}:fc_#{cell_index}" class="dr-sdt-fcbody1">
<span class="dr-sdt-fcbody">
<vcp:body/>
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx 2007-08-24 12:07:27 UTC (rev 2468)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx 2007-08-24 12:38:52 UTC (rev 2469)
@@ -12,7 +12,7 @@
component="javax.faces.component.UIComponent"
>
- <th class="dr-sdt-hc rich-sdt-header-cell" id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}" sortable="#{component.attributes['sortable']}">
+ <th class="dr-sdt-hc rich-sdt-header-cell #{headerColumnClass}" id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}" sortable="#{component.attributes['sortable']}">
<vcp:body/>
18 years, 8 months
JBoss Rich Faces SVN: r2468 - /.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-08-24 08:07:27 -0400 (Fri, 24 Aug 2007)
New Revision: 2468
Added:
rich-faces/
Log:
Initial import.
18 years, 8 months