JBoss Rich Faces SVN: r2587 - trunk/test-applications/jsp/src/main/webapp/TogglePanel.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-08-29 13:44:09 -0400 (Wed, 29 Aug 2007)
New Revision: 2587
Modified:
trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp
Log:
http://jira.jboss.com/jira/browse/RF-754
Modified: trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp 2007-08-29 16:13:48 UTC (rev 2586)
+++ trunk/test-applications/jsp/src/main/webapp/TogglePanel/TogglePanel.jsp 2007-08-29 17:44:09 UTC (rev 2587)
@@ -54,7 +54,10 @@
</rich:panel>
</f:facet>
</rich:togglePanel>
- <br /><br />
+
+ <f:verbatim>
+ <br /><br />
+ </f:verbatim>
<rich:togglePanel id="panel2" switchType="#{togglePanel.switchType}" initialState="#{togglePanel.initialState}"
stateOrder="#{togglePanel.stateOrder}">
@@ -143,7 +146,10 @@
</f:facet>
</rich:togglePanel>
- <br /><br />
+ <f:verbatim>
+ <br /><br />
+ </f:verbatim>
+
<rich:separator height="5px" width="500px" />
<h:panelGrid columns="2" cellpadding="5px" cellspacing="5px">
@@ -167,7 +173,7 @@
<f:selectItem itemLabel="client" itemValue="client" />
<f:selectItem itemLabel="server" itemValue="server" />
<f:selectItem itemLabel="ajax" itemValue="ajax" />
- <a4j:support event="onclick" reRender="panle1,panel2"></a4j:support>
+ <a4j:support event="onclick" reRender="panel1,panel2"></a4j:support>
</h:selectOneRadio>
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
17 years, 4 months
JBoss Rich Faces SVN: r2586 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-29 12:13:48 -0400 (Wed, 29 Aug 2007)
New Revision: 2586
Added:
trunk/docs/userguide/en/src/main/resources/images/calendar1.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
http://jira.jboss.com/jira/browse/RF-446
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-29 16:01:47 UTC (rev 2585)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-29 16:13:48 UTC (rev 2586)
@@ -218,7 +218,7 @@
...
]]></programlisting>
- <para>Also the discussion about this problem can be fobnd on the <ulink
+ <para>Also the discussion about this problem can be found on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#..."
>RichFaces Users Forum</ulink>.</para>
@@ -407,7 +407,191 @@
particular panel menus, it's possible to define your own CSS class. And then just
define it in the components class attribute. </para>
- </section-->
+</section-->
+
+ <section>
+ <title>Definition of Custom Style Classes</title>
+
+ <figure>
+ <title>Classes names</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/calendar1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the screenshot, there are classes names defining specified elements.</para>
+
+ <table>
+ <title>Classes names that define input field and button appearance</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>rich-calendar-input </entry>
+
+ <entry>Defines input field</entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-popupicon</entry>
+
+ <entry>Defines icon for button</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define days appearance</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>rich-calendar-days</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-Weekendclass</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-week</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-cell</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-holly</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-selected</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-hover</entry>
+
+ <entry></entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Classes names that define popup element</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Class name</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>rich-calendar-exterior</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-header-optional</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-footer-optional</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-header</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-footer</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-today</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-boundary-dates</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-btn</entry>
+
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>rich-calendar-current</entry>
+
+ <entry></entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>In order to redefine the style for all calendars on a page using CSS,
+ it's enough to create classes with the same names and define the necessary properties
+ in them.</para>
+
+ <para>To change the style of particular calendars define your own style
+ classes in the corresponding calendar attributes. </para>
+ </section>
<section>
<title>Relevant resources links</title>
Added: trunk/docs/userguide/en/src/main/resources/images/calendar1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/calendar1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 4 months
JBoss Rich Faces SVN: r2585 - in trunk: ui/calendar/src/main/config/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-29 12:01:47 -0400 (Wed, 29 Aug 2007)
New Revision: 2585
Modified:
trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
RF-761 fixed
RF-685 fixed
RF-725 partial fix (ondateselect)
Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-08-29 15:59:36 UTC (rev 2584)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-08-29 16:01:47 UTC (rev 2585)
@@ -35,6 +35,7 @@
<br />
<br />
<calendar:calendar
+ ondateselect=""
id="calendar"
data="#{calendarDataModel}"
locale="#{calendarBean.locale}"
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-29 15:59:36 UTC (rev 2584)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-29 16:01:47 UTC (rev 2585)
@@ -323,35 +323,49 @@
</property>
<property>
- <name>onclick</name>
+ <name>ondateselect</name>
<classname>java.lang.String</classname>
<description>
- onClick event handler
+ onDateSelect event handler
</description>
</property>
<property>
- <name>onfocus</name>
+ <name>oncurrentdatechange</name>
<classname>java.lang.String</classname>
<description>
- onFocus event handler
+ onCurrentDateChange event handler
</description>
- </property>
+ </property>
<property>
- <name>onBlur</name>
+ <name>onexpand</name>
<classname>java.lang.String</classname>
<description>
- onBlur event handler
+ onExpand event handler
</description>
</property>
<property>
- <name>onChange</name>
+ <name>oncollapse</name>
<classname>java.lang.String</classname>
<description>
- onChange event handler
+ onCollapse event handler
</description>
</property>
-
<property>
+ <name>ondatemouseover</name>
+ <classname>java.lang.String</classname>
+ <description>
+ onDateMouseOver event handler
+ </description>
+ </property>
+ <property>
+ <name>ondatemouseout</name>
+ <classname>java.lang.String</classname>
+ <description>
+ onDateMouseOut event handler
+ </description>
+ </property>
+
+ <property>
<name>oninputchange</name>
<classname>java.lang.String</classname>
<description>
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-29 15:59:36 UTC (rev 2584)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-08-29 16:01:47 UTC (rev 2585)
@@ -451,7 +451,7 @@
var obj=$(id);
var htmlTextHeader = (!this.params.popup ? '<input id="'+this.INPUT_DATE_ID+'" name="'+this.INPUT_DATE_ID+'" type="hidden" style="display:none" value="'+this.getSelectedDateString(this.params.datePattern)+'"/>\n' : '') +
- '<input id="'+this.id+'InputCurrentDate" name="'+this.id+'InputCurrentDate" type="hidden" style="display:none" value="'+this.getCurrentDate().format("MM/y")+'"/>\n' +
+ '<input id="'+this.id+'InputCurrentDate" name="'+this.id+'InputCurrentDate" type="hidden" style="display:none" value="'+this.getCurrentDate().format("MM/yyyy")+'"/>\n' +
'<table border="0" cellpadding="0" cellspacing="0" class="rich-calendar-exterior"><tbody>\n';
var colspan = (this.params.showWeeksBar ? "8" : "7");
var htmlHeaderOptional = (this.params.headerOptionalMarkup) ? '<tr><td class="rich-calendar-header-optional" colspan="'+colspan+'" id="'+this.id+'HeaderOptional"></td></tr>' : '';
@@ -726,6 +726,43 @@
Event.stopObserving(obj, "mouseout", this.eventCellOnMouseOut, false);
},
+ invokeEvent: function(eventName, event, date) {
+ var eventScript = this.params['on'+eventName];
+ var result = true;
+
+ if (eventScript)
+ {
+ var props = {};
+ if (date) props.date = date;
+ var eventObj;
+
+ if (event)
+ {
+ eventObj = event;
+ }
+ else if( document.createEventObject )
+ {
+ eventObj = document.createEventObject();
+ }
+ else if( document.createEvent )
+ {
+ eventObj = document.createEvent();
+ eventObj.initEvent( e, true, false );
+ }
+
+ Object.extend(eventObj, props);
+
+ try
+ {
+ result = new Function("event", eventScript).call(this, eventObj);
+ }
+ catch (e) { LOG.warn("Exception: "+e.Message + "\n[on"+eventName + "]"); }
+
+ }
+
+ return result;
+ },
+
eventCellOnClick: function (e) {
var obj = Event.findElementByAttr(e, "TD", "id", this.DATE_ELEMENT_ID, true);
if (obj)
@@ -733,28 +770,37 @@
var daydata = this.days[parseInt(obj.id.substr(this.DATE_ELEMENT_ID.length),10)];
if (daydata._month==0)
{
- this.selectedDate=new Date(this.currentDate);
- this.selectedDate.setDate(obj.data);
- if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "rich-calendar-select");
- this.selectedDateElement = obj;
- Element.addClassName(obj, "rich-calendar-select");
+ var date=new Date(this.currentDate);
+ date.setDate(obj.data);
- $(this.INPUT_DATE_ID).value=this.getSelectedDateString(this.params.datePattern);
- this.renderHeader();
- this.renderFooter();
-
- // popup mode
- this.doCollapse();
+ if (this.invokeEvent("dateselect", e, date))
+ {
+ this.selectedDate=date;
+ if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "rich-calendar-select");
+ this.selectedDateElement = obj;
+ Element.addClassName(obj, "rich-calendar-select");
+
+ $(this.INPUT_DATE_ID).value=this.getSelectedDateString(this.params.datePattern);
+ this.renderHeader();
+ this.renderFooter();
+
+ // popup mode
+ this.doCollapse();
+ }
} else {
if (this.params.boundaryDatesMode == "scroll")
if (daydata._month==-1) this.prevMonth(); else this.nextMonth();
else if (this.params.boundaryDatesMode == "select")
{
- this.selectDate(new Date(this.currentDate.getFullYear(), this.currentDate.getMonth()+daydata._month, daydata.day), true);
- $(this.INPUT_DATE_ID).value=this.getSelectedDateString(this.params.datePattern);
- // popup mode
- this.doCollapse();
+ var date = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth()+daydata._month, daydata.day);
+ if (this.invokeEvent("dateselect", e, date))
+ {
+ this.selectDate(date, true);
+ $(this.INPUT_DATE_ID).value=this.getSelectedDateString(this.params.datePattern);
+ // popup mode
+ this.doCollapse();
+ }
}
}
}
@@ -1032,7 +1078,7 @@
onUpdate: function()
{
- var formattedDate = this.getCurrentDate().format("MM/y");
+ var formattedDate = this.getCurrentDate().format("MM/yyyy");
$(this.id+'InputCurrentDate').value=formattedDate;
if (this.submitFunction)
@@ -1121,9 +1167,12 @@
var d = new Date(this.selectedDate);
if (d.getMonth()==this.currentDate.getMonth() && d.getFullYear()==this.currentDate.getFullYear())
{
- // find cell and call onklick event
- var e = $(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1));
- if (e) Richfaces.createEvent ('click', e).fire();
+ if (oldSelectedDate.getDate()!=d.getDate())
+ {
+ // find cell and call onclick event
+ var e = $(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1));
+ if (e) Richfaces.createEvent ('click', e).fire();
+ }
return;
} else {
// change currentDate and call this.onUpdate();
@@ -1191,7 +1240,7 @@
CalendarView.previousYearControl = CalendarView.getControl("<<", "prevYear");
CalendarView.nextMonthControl = CalendarView.getControl(">", "nextMonth");
CalendarView.previousMonthControl = CalendarView.getControl("<", "prevMonth");
-CalendarView.currentMonthControl = function (context) { return context.calendar.getCurrentDate().format("MMMM, y", context.monthLabels, context.monthLabelsShort);};
+CalendarView.currentMonthControl = function (context) { return context.calendar.getCurrentDate().format("MMMM, yyyy", context.monthLabels, context.monthLabelsShort);};
CalendarView.todayControl = CalendarView.getControl("Today", "today");
CalendarView.selectedDateControl = function (context) { return CalendarView.getSelectedDateControl(context.calendar.getSelectedDateString(context.calendar.params.datePattern));};
//CalendarView.resetSelectedDateControl = function (context) { return (context.calendar.getSelectedDate() ? CalendarView.getControl("x", "resetSelectedDate") : "");};
Modified: trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-29 15:59:36 UTC (rev 2584)
+++ trunk/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-08-29 16:01:47 UTC (rev 2585)
@@ -37,7 +37,8 @@
disabled: #{component.disabled},
<f:call name="writeSymbols" />,
firstWeekDay: #{this:getFirstWeekDay(context, component)},
- minDaysInFirstWeek: #{this:getMinDaysInFirstWeek(context, component)}
+ minDaysInFirstWeek: #{this:getMinDaysInFirstWeek(context, component)},
+ ondateselect: "#{component.attributes['ondateselect']}"
<jsp:scriptlet> /*<![CDATA[*/
if (component.getFacet("optionalHeader")!= null&& component.getFacet("optionalHeader").isRendered()){
17 years, 4 months
JBoss Rich Faces SVN: r2584 - trunk/ui/scrollableDataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-08-29 11:59:36 -0400 (Wed, 29 Aug 2007)
New Revision: 2584
Modified:
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
Log:
http://jira.jboss.com/jira/browse/RF-447
Modified: trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
===================================================================
--- trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-08-29 15:58:32 UTC (rev 2583)
+++ trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-08-29 15:59:36 UTC (rev 2584)
@@ -188,7 +188,8 @@
<property>
<name>scriptVar</name>
<classname>java.lang.String</classname>
- <description></description>
+ <description>Name of JavaScript variable corresponding to component
+ </description>
</property>
<property>
@@ -217,18 +218,16 @@
The attribute provides access to a component state on the client side
</description>
</property>
-<!--
+
<property>
<name>sortListener</name>
- <classname>javax.faces.el.MethodBinding</classname>
- <methodargs>
- java.lang.Object.class
- </methodargs>
+ <classname>org.richfaces.event.sort.SortListener</classname>
+
<description>
MethodBinding representing an action listener method that will be notified after sorting of rows
</description>
</property>
--->
+
&ajax_component_attributes;
&ui_component_attributes;
&ui_data_attributes;
17 years, 4 months
JBoss Rich Faces SVN: r2583 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-08-29 11:58:32 -0400 (Wed, 29 Aug 2007)
New Revision: 2583
Modified:
trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
Log:
http://jira.jboss.com/jira/browse/RF-447
Modified: trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-08-29 15:11:50 UTC (rev 2582)
+++ trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2007-08-29 15:58:32 UTC (rev 2583)
@@ -77,8 +77,12 @@
User can define the number of the fixed columns from the left side using attribute <emphasis><property>"frozenColCount"</property></emphasis> that will not be scrolled
via horizontal scroll.
</para>
-
<para>
+ There is possibility to increase component performance using attribute <emphasis><property>"hideWhenScrolling"</property></emphasis>.
+ If attribute value is 'true' data will be hidden during scrolling.
+ </para>
+
+ <para>
It's possible to select the whole row with onclick on the row or some set of rows. Selection is optional and availability of such feature
is defined on the component.
There are two ways to select a few rows:
@@ -103,7 +107,7 @@
column and the header of this column has been clicked again - the sorting will be
reversed.
</para>
-
+
<para>
<emphasis role="bold">Those a the typical variants of using:</emphasis>
</para>
@@ -128,7 +132,18 @@
</rich:scrollableDataTable>
...
]]></programlisting>
-
+<para>
+Finally, the component has the following extra attributes for event processing on the client:
+ <itemizedlist>
+ <listitem>onselectionchange</listitem>
+ <listitem>oncomplete</listitem>
+ <listitem>onRowClick</listitem>
+ <listitem>onRowDblClick</listitem>
+ <listitem>onRowMouseUp</listitem>
+ <listitem>onRowMouseDown</listitem>
+ </itemizedlist>
+
+</para>
</section>
<!--section>
17 years, 4 months
JBoss Rich Faces SVN: r2582 - trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-29 11:11:50 -0400 (Wed, 29 Aug 2007)
New Revision: 2582
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
Log:
getAjaxBeforeUpdate() method corrected
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2007-08-29 15:00:59 UTC (rev 2581)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/renderkit/AjaxRendererUtils.java 2007-08-29 15:11:50 UTC (rev 2582)
@@ -592,7 +592,7 @@
return ((AjaxComponent) component).getBeforeUpdate();
}
- return (String) component.getAttributes().get(ONCOMPLETE_ATTR_NAME);
+ return (String) component.getAttributes().get(BEFOREUPDATE_ATTR_NAME);
}
17 years, 4 months
JBoss Rich Faces SVN: r2581 - trunk/ui/calendar/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-29 11:00:59 -0400 (Wed, 29 Aug 2007)
New Revision: 2581
Modified:
trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
Log:
CalendarDataModelItem - getDate() removed - spec. updated
Modified: trunk/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
17 years, 4 months
JBoss Rich Faces SVN: r2580 - in trunk/ui/calendar/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-29 10:59:38 -0400 (Wed, 29 Aug 2007)
New Revision: 2580
Removed:
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
Log:
CalendarDataModelItem - getDate() removed
Modified: trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-08-29 14:59:20 UTC (rev 2579)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-08-29 14:59:38 UTC (rev 2580)
@@ -21,12 +21,10 @@
package org.richfaces.component;
-import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
@@ -50,9 +48,7 @@
import org.richfaces.event.CurrentDateChangeListener;
import org.richfaces.model.CalendarDataModel;
import org.richfaces.model.CalendarDataModelItem;
-import org.richfaces.renderkit.CalendarDataModelItemAdaptor;
import org.richfaces.renderkit.CalendarRendererBase;
-//import org.richfaces.component.CurrentDateChangeListener;
// import org.richfaces.renderkit.html.BaseGradient.Data;
@@ -361,8 +357,7 @@
args.put("startDate", CalendarRendererBase
.formatDate(preloadDateRange[0]));
args
- .put("days", new AdaptingCollection(
- calendarDataModelItems));
+ .put("days", calendarDataModelItems);
return args;
}
}
@@ -408,40 +403,3 @@
}
}
-
-class AdaptingCollection extends AbstractCollection {
- private CalendarDataModelItem[] items;
-
- public AdaptingCollection(CalendarDataModelItem[] items) {
- super();
- this.items = items;
- }
-
- public Iterator iterator() {
- return new Iterator() {
- private int idx = 0;
-
- private CalendarDataModelItemAdaptor adaptor = new CalendarDataModelItemAdaptor();
-
- public boolean hasNext() {
- return idx < items.length;
- }
-
- public Object next() {
- adaptor.setItem(items[idx++]);
- return adaptor;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- };
- }
-
- public int size() {
- return this.items.length;
- }
-
-
-}
Deleted: trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java 2007-08-29 14:59:20 UTC (rev 2579)
+++ trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java 2007-08-29 14:59:38 UTC (rev 2580)
@@ -1,49 +0,0 @@
-/**
- * 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.renderkit;
-
-import org.richfaces.model.CalendarDataModelItem;
-
-/**
- * @author Nick Belaevski - mailto:nbelaevski@exadel.com
- * created 04.07.2007
- *
- */
-public class CalendarDataModelItemAdaptor {
- private CalendarDataModelItem item;
-
- public void setItem(CalendarDataModelItem item) {
- this.item = item;
- }
-
- public CalendarDataModelItem getItem() {
- return item;
- }
-
- public Object getDate() {
- return CalendarRendererBase.formatDate(item.getDate());
- }
-
- public Object getData() {
- return item.getData();
- }
-}
17 years, 4 months
JBoss Rich Faces SVN: r2579 - trunk/framework/api/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-29 10:59:20 -0400 (Wed, 29 Aug 2007)
New Revision: 2579
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java
Log:
CalendarDataModelItem - getDate() removed
Modified: trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java 2007-08-29 14:59:08 UTC (rev 2578)
+++ trunk/framework/api/src/main/java/org/richfaces/model/CalendarDataModelItem.java 2007-08-29 14:59:20 UTC (rev 2579)
@@ -20,7 +20,6 @@
*/
package org.richfaces.model;
-import java.util.Date;
/**
@@ -32,11 +31,6 @@
public interface CalendarDataModelItem {
/**
- * @return date that this item for, default implementation return Date
- * */
- public Date getDate();
-
- /**
*@return true if date is �selectable� on calendar, default implementation return true
**/
public boolean isEnabled();
17 years, 4 months
JBoss Rich Faces SVN: r2578 - in trunk/samples/calendar-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-29 10:59:08 -0400 (Wed, 29 Aug 2007)
New Revision: 2578
Modified:
trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java
trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelItemImpl.java
trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
Log:
CalendarDataModelItem - getDate() removed
Modified: trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java
===================================================================
--- trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java 2007-08-29 14:37:52 UTC (rev 2577)
+++ trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java 2007-08-29 14:59:08 UTC (rev 2578)
@@ -55,7 +55,6 @@
protected CalendarDataModelItem createDataModelItem(Date date) {
CalendarDataModelItemImpl item = new CalendarDataModelItemImpl();
- item.setDate(date);
Map data = new HashMap();
DateFormat enFormatter = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH);
DateFormat frFormatter = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.FRENCH);
Modified: trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelItemImpl.java
===================================================================
--- trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelItemImpl.java 2007-08-29 14:37:52 UTC (rev 2577)
+++ trunk/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelItemImpl.java 2007-08-29 14:59:08 UTC (rev 2578)
@@ -21,8 +21,6 @@
package org.richfaces;
-import java.util.Date;
-
import org.richfaces.model.CalendarDataModelItem;
/**
@@ -33,7 +31,6 @@
public class CalendarDataModelItemImpl implements CalendarDataModelItem {
private Object data;
- private Date date;
private String styleClass;
private Object toolTip;
private boolean enabled = true;
@@ -46,13 +43,6 @@
}
/* (non-Javadoc)
- * @see org.richfaces.component.CalendarDataModelItem#getDate()
- */
- public Date getDate() {
- return date;
- }
-
- /* (non-Javadoc)
* @see org.richfaces.component.CalendarDataModelItem#getStyleClass()
*/
public String getStyleClass() {
@@ -88,13 +78,6 @@
}
/**
- * @param date the date to set
- */
- public void setDate(Date date) {
- this.date = date;
- }
-
- /**
* @param styleClass the styleClass to set
*/
public void setStyleClass(String styleClass) {
Modified: trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp
===================================================================
--- trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-08-29 14:37:52 UTC (rev 2577)
+++ trunk/samples/calendar-sample/src/main/webapp/pages/Calendar.jsp 2007-08-29 14:59:08 UTC (rev 2578)
@@ -59,11 +59,11 @@
<h:panelGrid columns="2">
<f:verbatim><span style="padding: 2px;" <%-- class="largeText"--%>>{day}</span></f:verbatim>
- <%-- h:panelGrid>
+ <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>
</h:panelGrid>
</calendar:calendar>
17 years, 4 months