Author: akushunin
Date: 2007-07-25 09:02:23 -0400 (Wed, 25 Jul 2007)
New Revision: 1840
Modified:
trunk/sandbox/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java
trunk/sandbox/ui/calendar/pom.xml
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
Log:
Converter converter = SelectUtils.getConverterForProperty(context, input,
"value")
replaced with
Converter converter = new DateTimeConverter();
Modified:
trunk/sandbox/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java
===================================================================
---
trunk/sandbox/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java 2007-07-25
12:43:47 UTC (rev 1839)
+++
trunk/sandbox/samples/calendar-sample/src/main/java/org/richfaces/CalendarDataModelImpl.java 2007-07-25
13:02:23 UTC (rev 1840)
@@ -64,7 +64,7 @@
data.put("frLabel", frFormatter.format(date));
data.put("deLabel", deFormatter.format(date));
item.setData(data);
-
+
return item;
}
@@ -72,6 +72,7 @@
* @see org.richfaces.component.CalendarDataModel#getToolTip(java.util.Date)
*/
public Object getToolTip(Date date) {
+
// TODO Auto-generated method stub
return null;
}
Modified: trunk/sandbox/ui/calendar/pom.xml
===================================================================
--- trunk/sandbox/ui/calendar/pom.xml 2007-07-25 12:43:47 UTC (rev 1839)
+++ trunk/sandbox/ui/calendar/pom.xml 2007-07-25 13:02:23 UTC (rev 1840)
@@ -49,5 +49,18 @@
<version>3.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>clover</id>
+<properties>
+<cloverLicense>c:\clover-richfaces.license</cloverLicense>
+<clover.license.path>c:\clover-richfaces.license</clover.license.path>
+<stagingDirectory>C:\eclipse\workspaces\workspaceVCP30\trunk\sandbox\ui\calendar</stagingDirectory>
+<releaseRepository>C:\temp\repo</releaseRepository>
+<snapshotRepository>C:\temp\snap</snapshotRepository>
+ <tomcatPath>/path/to/tomcat/instance</tomcatPath>
+ </properties>
+ </profile>
+ </profiles>
</project>
Modified: trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
---
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-07-25
12:43:47 UTC (rev 1839)
+++
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-07-25
13:02:23 UTC (rev 1840)
@@ -38,6 +38,7 @@
import javax.faces.component.UIInput;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import javax.faces.convert.DateTimeConverter;
import javax.faces.el.ValueBinding;
@@ -123,7 +124,12 @@
public Calendar getCalendar() {
return Calendar.getInstance(getTimeZone(), getLocale());
}
-
+ public Converter getDateConverter(){
+ DateTimeConverter datetime = new DateTimeConverter();
+ return datetime;
+
+ }
+
public Date getConvertedValue(FacesContext context, String currentDateString)
throws ConverterException {
Modified:
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-07-25
12:43:47 UTC (rev 1839)
+++
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-07-25
13:02:23 UTC (rev 1840)
@@ -219,7 +219,9 @@
String value = (String) input.getSubmittedValue();
if(value == null){
Object curVal = input.getValue();
- Converter converter = SelectUtils.getConverterForProperty(context, input,
"value");
+ Converter converter = new DateTimeConverter();
+ // Converter converter = SelectUtils.getConverterForProperty(context, input,
"value");
+
if(converter != null){
value = converter.getAsString(context, input, curVal);
} else {
Modified:
trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
===================================================================
---
trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-07-25
12:43:47 UTC (rev 1839)
+++
trunk/ui/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-07-25
13:02:23 UTC (rev 1840)
@@ -203,7 +203,7 @@
public void testRender() throws Exception {
HtmlPage page = renderView();
assertNotNull(page);
- System.out.println(page.asXml());
+ //System.out.println(page.asXml());
HtmlElement div = page.getHtmlElementById(scroller.getClientId(facesContext));
assertNotNull(div);
@@ -257,7 +257,7 @@
HtmlPage page = renderView();
assertNotNull(page);
- System.out.println(page.asXml());
+ //System.out.println(page.asXml());
try {
page.getHtmlElementById(scroller.getClientId(facesContext));
assertTrue(false);