You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/03/19 22:32:08 UTC

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

Author: mmarinschek
Date: Sun Mar 19 13:32:07 2006
New Revision: 387042

URL: http://svn.apache.org/viewcvs?rev=387042&view=rev
Log:
todayDateFormat configurable now

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

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java?rev=387042&r1=387041&r2=387042&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 Sun Mar 19 13:32:07 2006
@@ -375,6 +375,10 @@
                 setStringVariable(script, popupCalendarVariable+".initData.gotoString", inputCalendar.getPopupGotoString());
             if(inputCalendar.getPopupTodayString()!=null)
                 setStringVariable(script, popupCalendarVariable+".initData.todayString",inputCalendar.getPopupTodayString());
+            if(inputCalendar.getPopupTodayDateFormat()!=null)
+                setStringVariable(script, popupCalendarVariable+".initData.todayDateFormat",inputCalendar.getPopupTodayDateFormat());
+            else if(inputCalendar.getPopupDateFormat() != null)
+                setStringVariable(script, popupCalendarVariable+".initData.todayDateFormat",inputCalendar.getPopupDateFormat());                
             if(inputCalendar.getPopupWeekString()!=null)
                 setStringVariable(script, popupCalendarVariable+".initData.weekString",inputCalendar.getPopupWeekString());
             if(inputCalendar.getPopupScrollLeftMessage()!=null)

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendar.java?rev=387042&r1=387041&r2=387042&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 Sun Mar 19 13:32:07 2006
@@ -52,6 +52,7 @@
     private String _visibleOnUserRole = null;
     private String _popupGotoString = null;
     private String _popupTodayString = null;
+    private String _popupTodayDateFormat = null;
     private String _popupWeekString = null;
     private String _popupScrollLeftMessage = null;
     private String _popupScrollRightMessage = null;
@@ -265,6 +266,18 @@
     {
         if (_popupTodayString != null) return _popupTodayString;
         ValueBinding vb = getValueBinding("popupTodayString");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setPopupTodayDateFormat(String popupTodayDateFormat)
+    {
+        _popupTodayDateFormat = popupTodayDateFormat;
+    }
+
+    public String getPopupTodayDateFormat()
+    {
+        if (_popupTodayDateFormat != null) return _popupTodayDateFormat;
+        ValueBinding vb = getValueBinding("popupTodayDateFormat");
         return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
     }
 

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendarTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/calendar/HtmlInputCalendarTag.java?rev=387042&r1=387041&r2=387042&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 Sun Mar 19 13:32:07 2006
@@ -78,6 +78,7 @@
     private String _renderPopupButtonAsImage;
     private String _popupGotoString = null;
     private String _popupTodayString = null;
+    private String _popupTodayDateFormat = null;
     private String _popupWeekString = null;
     private String _popupScrollLeftMessage = null;
     private String _popupScrollRightMessage = null;
@@ -109,6 +110,7 @@
         _renderPopupButtonAsImage = null;
         _popupGotoString = null;
         _popupTodayString = null;
+        _popupTodayDateFormat = null;
         _popupWeekString = null;
         _popupScrollLeftMessage = null;
         _popupScrollRightMessage = null;
@@ -154,6 +156,7 @@
         setBooleanProperty(component,"renderPopupButtonAsImage",_renderPopupButtonAsImage);
         setStringProperty(component,"popupGotoString",_popupGotoString);
         setStringProperty(component,"popupTodayString",_popupTodayString);
+        setStringProperty(component,"popupTodayDateFormat",_popupTodayDateFormat);
         setStringProperty(component,"popupWeekString",_popupWeekString);
         setStringProperty(component,"popupScrollLeftMessage",_popupScrollLeftMessage);
         setStringProperty(component,"popupScrollRightMessage",_popupScrollRightMessage);
@@ -272,6 +275,11 @@
     public void setPopupTodayString(String popupTodayString)
     {
         _popupTodayString = popupTodayString;
+    }
+
+    public void setPopupTodayDateFormat(String popupTodayDateFormat)
+    {
+        _popupTodayDateFormat = popupTodayDateFormat;
     }
 
     public void setPopupWeekString(String popupWeekString)

Modified: myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_input_calendar_attributes.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/tld/tomahawk-entities/tomahawk_input_calendar_attributes.xml?rev=387042&r1=387041&r2=387042&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 Sun Mar 19 13:32:07 2006
@@ -100,6 +100,12 @@
             <description>Set the string for "Today is"</description>
         </attribute>
         <attribute>
+            <name>popupTodayDateFormat</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>Defines the date format used by the java-script popup on client for the today-is string.</description>
+        </attribute>
+        <attribute>
             <name>popupWeekString</name>
             <required>false</required>
             <rtexprvalue>false</rtexprvalue>