You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2007/12/11 13:31:13 UTC

svn commit: r603224 - in /myfaces/tomahawk/trunk/core/src/main: java/org/apache/myfaces/custom/calendar/ tld/ tld/tomahawk-entities/

Author: skitching
Date: Tue Dec 11 04:31:12 2007
New Revision: 603224

URL: http://svn.apache.org/viewvc?rev=603224&view=rev
Log:
Rename new property selectMode to popupSelectMode to show that it only
works for the popup calendar. Also document styling properties for
calendar.

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendarTag.java
    myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_input_calendar_attributes.xml
    myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java?rev=603224&r1=603223&r2=603224&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java Tue Dec 11 04:31:12 2007
@@ -218,7 +218,7 @@
                                                         timeKeeper.getFirstDayOfWeek(),inputCalendar,calendarVar)+"\n",null);
             // pass the selectMode attribute
             StringBuffer script = new StringBuffer();
-            setStringVariable(script, calendarVar +".initData.selectMode",inputCalendar.getSelectMode());
+            setStringVariable(script, calendarVar +".initData.selectMode",inputCalendar.getPopupSelectMode());
             writer.writeText(script.toString(), null);
 
             writer.writeText(calendarVar+".init(document.getElementById('"+

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java?rev=603224&r1=603223&r2=603224&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java Tue Dec 11 04:31:12 2007
@@ -65,7 +65,7 @@
     private String _popupTheme = null;
     private String _popupButtonImageUrl = null;
     private String _helpText = null;
-    private String _selectMode = null;
+    private String _popupSelectMode = null;
 
     public HtmlInputCalendar()
     {
@@ -467,20 +467,20 @@
     //------------------ GENERATED CODE END ---------------------------------------
 
     
-    public String getSelectMode()
+    public String getPopupSelectMode()
     {
     	if (isDisabled() || isReadonly())
     	{
     		return "none";
     	}
     	
-        if (_selectMode != null) return _selectMode;
-        ValueBinding vb = getValueBinding("selectMode");
+        if (_popupSelectMode != null) return _popupSelectMode;
+        ValueBinding vb = getValueBinding("popupSelectMode");
         return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : "day";
     }
 
-    public void setSelectMode(String selectMode)
+    public void setPopupSelectMode(String popupSelectMode)
     {
-        _selectMode = selectMode;
+        _popupSelectMode = popupSelectMode;
     }
 }

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendarTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendarTag.java?rev=603224&r1=603223&r2=603224&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendarTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendarTag.java Tue Dec 11 04:31:12 2007
@@ -85,7 +85,7 @@
     private String _popupTheme = null;
     private String _popupButtonImageUrl = null;
     private String _helpText;
-    private String _selectMode;
+    private String _popupSelectMode;
 
     // User Role support
     private String _enabledOnUserRole;
@@ -120,7 +120,7 @@
         _popupTheme=null;
         _popupButtonImageUrl=null;
         _helpText = null;
-        _selectMode = null;
+        _popupSelectMode = null;
     }
 
 
@@ -159,7 +159,7 @@
         setStringProperty(component,"popupTheme",_popupTheme);
         setStringProperty(component,"popupButtonImageUrl",_popupButtonImageUrl);
         setStringProperty(component,"helpText",_helpText);
-        setStringProperty(component,"selectMode",_selectMode);
+        setStringProperty(component,"popupSelectMode",_popupSelectMode);
 
         setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
         setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
@@ -296,9 +296,9 @@
         _helpText = helpText;
     }
 
-    public void setSelectMode(String selectMode)
+    public void setPopupSelectMode(String popupSelectMode)
     {
-    	_selectMode = selectMode;
+    	_popupSelectMode = popupSelectMode;
     }
 
     public void setAccesskey(String accesskey)

Modified: myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_input_calendar_attributes.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_input_calendar_attributes.xml?rev=603224&r1=603223&r2=603224&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_input_calendar_attributes.xml (original)
+++ myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_input_calendar_attributes.xml Tue Dec 11 04:31:12 2007
@@ -181,7 +181,7 @@
             <description>The text that will be rendered in the field - helping the user to find the right format to enter into the field.</description>
         </attribute>
         <attribute>
-            <name>selectMode</name>
+            <name>popupSelectMode</name>
             <required>false</required>
             <rtexprvalue>false</rtexprvalue>
             <description><![CDATA[

Modified: myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld?rev=603224&r1=603223&r2=603224&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld (original)
+++ myfaces/tomahawk/trunk/core/src/main/tld/tomahawk.tld Tue Dec 11 04:31:12 2007
@@ -702,7 +702,19 @@
           required for the popup window.
           </p>
           <p>
-          Note that the appearance of the calendar can be controlled via attributes
+          The two forms of calendar are unfortunately not well integrated; this component is
+          effectively two components that happen to use the same component class. Some
+          attributes on the component are applicable only to the inline form while others
+          are applicable only to the popup form.
+          </p>
+          <p>
+          The appearance of the inline calendar can be controlled via attributes
+          such as currentDayCellClass, dayCellClass, weekRowClass, monthYearRowClass. 
+          Attributes "styleLocation", "javascriptLocation", "imageLocation" and all
+          attributes starting with "popup" have no effect on an inline calendar.
+          <ul>
+          <p>
+          The appearance of the popup calendar can be controlled via attributes
           popupTheme, styleLocation, javascriptLocation and imageLocation:
           <ul>
             <li>popupTheme: When styleLocation is not overridden then this selects one of the
@@ -724,6 +736,7 @@
                defined. Defaults to a reference to a location within the tomahawk jarfile which
                varies depending on popupTheme.</li>
           </ul>
+          Other styling attributes (eg dayCellClass, weekRowClass) are ignored for the popup calendar.
           </p>
           <p>
           Unless otherwise specified, all attributes accept static values or EL expressions.