Author: nbelaevski
Date: 2007-07-19 16:20:46 -0400 (Thu, 19 Jul 2007)
New Revision: 1712
Removed:
trunk/sandbox/ui/target/
Modified:
trunk/sandbox/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
Log:
sandbox made compileable
Modified: trunk/sandbox/ui/calendar/design/funcspec/FuncSpec - RF Calendar Component.doc
===================================================================
(Binary files differ)
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-19
19:38:37 UTC (rev 1711)
+++
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2007-07-19
20:20:46 UTC (rev 1712)
@@ -30,7 +30,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
-import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
@@ -38,21 +37,20 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.component.UIViewRoot;
-import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.convert.ConverterException;
import javax.faces.convert.DateTimeConverter;
-import javax.faces.el.MethodBinding;
import javax.faces.el.ValueBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.render.Renderer;
-import org.ajax4jsf.framework.ajax.AjaxChildrenEncoder;
-import org.ajax4jsf.framework.ajax.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.ajax4jsf.framework.util.message.Messages;
+import org.ajax4jsf.component.AjaxChildrenEncoder;
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxEvent;
+import org.richfaces.model.CalendarDataModel;
+import org.richfaces.model.CalendarDataModelItem;
import org.richfaces.renderkit.CalendarDataModelItemAdaptor;
import org.richfaces.renderkit.CalendarRendererBase;
import org.richfaces.renderkit.CurrentDateChangeEvent;
Modified:
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java
===================================================================
---
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java 2007-07-19
19:38:37 UTC (rev 1711)
+++
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarDataModelItemAdaptor.java 2007-07-19
20:20:46 UTC (rev 1712)
@@ -21,7 +21,7 @@
package org.richfaces.renderkit;
-import org.richfaces.component.CalendarDataModelItem;
+import org.richfaces.model.CalendarDataModelItem;
/**
* @author Nick Belaevski - mailto:nbelaevski@exadel.com
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-19
19:38:37 UTC (rev 1711)
+++
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-07-19
20:20:46 UTC (rev 1712)
@@ -27,18 +27,19 @@
import java.util.Map;
import javax.faces.component.UIComponent;
-import javax.faces.context.ExternalContext;
+import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import javax.faces.event.FacesEvent;
+import javax.faces.convert.Converter;
import javax.faces.event.PhaseId;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
-import org.ajax4jsf.framework.util.javascript.JSFunction;
-import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
-import org.ajax4jsf.framework.util.javascript.JSReference;
-import org.ajax4jsf.framework.util.javascript.ScriptUtils;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.ajax4jsf.util.SelectUtils;
import org.richfaces.component.UICalendar;
import org.richfaces.component.util.HtmlUtil;
@@ -168,6 +169,28 @@
writer.write(definition.toScript());
}
+ public String getInputValue(FacesContext context, UIInput component){
+ UIInput input = (UIInput) component;
+ String value = (String) input.getSubmittedValue();
+ if(value == null){
+ Object curVal = input.getValue();
+ Converter converter = SelectUtils.getConverterForProperty(context, input,
"value");
+ if(converter != null){
+ value = converter.getAsString(context, input, curVal);
+ } else {
+ if(curVal == null){
+ value = "";
+ } else {
+ value = curVal.toString();
+ }
+ }
+ }
+ if(value == null){
+ value = "";
+ }
+ return value;
+ }
+
public static Object formatDate(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
Modified: trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
---
trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-07-19
19:38:37 UTC (rev 1711)
+++
trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx 2007-07-19
20:20:46 UTC (rev 1712)
@@ -9,7 +9,7 @@
baseclass="org.richfaces.renderkit.CalendarRendererBase"
component="org.richfaces.component.UICalendar">
<f:clientid var="clientId" />
- <h:scripts>new org.ajax4jsf.framework.resource.PrototypeScript(),new
org.ajax4jsf.framework.ajax.AjaxScript(),/org/richfaces/renderkit/html/scripts/utils.js,/org/richfaces/renderkit/html/scripts/json/json-dom.js,/org/richfaces/renderkit/html/scripts/calendar.js</h:scripts>
+ <h:scripts>new org.ajax4jsf.javascript.PrototypeScript(),new
org.ajax4jsf.javascript.AjaxScript(),/org/richfaces/renderkit/html/scripts/utils.js,/org/richfaces/renderkit/html/scripts/json/json-dom.js,/org/richfaces/renderkit/html/scripts/calendar.js</h:scripts>
<h:styles>/org/richfaces/renderkit/html/css/calendar.xcss</h:styles>
<div id="#{clientId}"
@@ -75,7 +75,7 @@
);
</script> <jsp:scriptlet>
<![CDATA[
- boolean popup = attributeToBoolean(component, "popup");
+ boolean popup = getUtils().isBooleanAttribute(component, "popup");
if (popup) {]]>
</jsp:scriptlet>
<span> <input
Modified: trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml 2007-07-19 19:38:37 UTC
(rev 1711)
+++ trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml 2007-07-19 20:20:46 UTC
(rev 1712)
@@ -25,7 +25,7 @@
<tag>
<name>toolTip</name>
<classname>org.richfaces.taglib.HtmlToolTipTag</classname>
- <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
<test>
<classname>org.richfaces.taglib.HtmlToolTipTagTest</classname>
<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
Modified: trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
===================================================================
---
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-07-19
19:38:37 UTC (rev 1711)
+++
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-07-19
20:20:46 UTC (rev 1712)
@@ -79,4 +79,9 @@
public abstract void setOnmouseover(String onmouseover);
+ public abstract String getOncomplete();
+ public abstract void setOncomplete(String oncomplete);
+
+ public abstract String getOnhide();
+ public abstract void setOnhide(String onhide);
}
Modified:
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
---
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-07-19
19:38:37 UTC (rev 1711)
+++
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-07-19
20:20:46 UTC (rev 1712)
@@ -7,14 +7,14 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
-import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.util.javascript.JSFunction;
-import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
-import org.ajax4jsf.framework.util.javascript.JSReference;
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.JSReference;
+import org.ajax4jsf.renderkit.AjaxComponentRendererBase;
+import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.richfaces.component.UIToolTip;
+import org.richfaces.skin.Skin;
public class ToolTipRenderer extends AjaxComponentRendererBase{
Modified: trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2007-07-19
19:38:37 UTC (rev 1711)
+++ trunk/sandbox/ui/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2007-07-19
20:20:46 UTC (rev 1712)
@@ -21,102 +21,21 @@
/org/richfaces/renderkit/html/scripts/tooltip.js
</h:scripts>
-<!--
- <style type="text/css">
- .roundtop {
- background: url(#{this:getTRImageSrc(context, component)}) no-repeat top right;
- }
-
- .roundbottom {
- background: url(#{this:getBRImageSrc(context, component)}) no-repeat top right;
- }
- </style>
-
-
-
-
- <div style="#{this:getMainDivStyle(context, component)}">
- <div class="roundtop">
- <f:call name="insertImage">
- <f:parameter value="tl"/>
- </f:call>
- </div>
- <p style="margin: 0 10px;">
- <f:call name="insertValue"/>
- <vcp:body>
- <f:call name="renderChildren"/>
- </vcp:body>
- <f:clientid var="clientId"/>
-
- </p>
- <div class="roundbottom">
- <f:call name="insertImage">
- <f:parameter value="bl"/>
- </f:call>
- </div>
-</div>
-
-
- <hr/>
--->
-
<f:clientid var="clientId"/>
- <div id="tooltip#{clientId}" style="position: absolute; display :
none;">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="15px">
- <f:call name="insertImage">
- <f:parameter value="tl"/>
- </f:call>
- </td>
- <td bgcolor="#{this:getBgColor(context, component)}"><f:call
name="insertImage">
- <f:parameter value="br"/>
- </f:call></td>
- <td width="15px">
- <f:call name="insertImage">
- <f:parameter value="tr"/>
- </f:call>
- </td>
- </tr>
- <tr>
- <td bgcolor="#{this:getBgColor(context, component)}"></td>
- <td bgcolor="#{this:getBgColor(context, component)}">
- <jsp:scriptlet>
- <![CDATA[if(component.getFacet("defaultContent")!=null &&
component.getFacet("defaultContent").isRendered()) {]]>
- </jsp:scriptlet>
- <span class="dr-rich-tool-tip rich-tool-tip">
- <u:insertFacet name="defaultContent" />
- </span>
- <jsp:scriptlet>
- <![CDATA[} else {]]>
- </jsp:scriptlet>
- <span class="dr-rich-tool-tip
rich-tool-tip">#{component.attributes['value']}</span>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
-
- </td>
- <td bgcolor="#{this:getBgColor(context, component)}"></td>
- </tr>
- <tr>
- <td>
- <f:call name="insertImage">
- <f:parameter value="bl"/>
- </f:call>
- </td>
- <td bgcolor="#{this:getBgColor(context, component)}"><f:call
name="insertImage">
- <f:parameter value="br"/>
- </f:call></td>
- <td>
- <f:call name="insertImage">
- <f:parameter value="br"/>
- </f:call>
- </td>
- </tr>
-
- </table>
- <f:call name="insertScript"/>
+ <div id="#{clientId}" style="position: absolute; display :
none;z-index:99; #{component.attributes['style']}"
class="dr-rich-tool-tip rich-tool-tip
#{component.attributes['styleClass']}">
+ <f:call name="utils.encodePassThru" />
+ <span id="#{clientId}defaultContent"
style="display:none">
+ <u:insertFacet name="defaultContent" />
+ </span>
+ <vcp:body>
+ <f:call name="encodeTooltipText"/>
+ </vcp:body>
+ <f:clientid var="clientId"/>
+ <span id="#{clientId}script" style="display:none">
+ <f:call name="insertScript"/>
+ </span>
+
</div>
<!-- f:call name="utils.encodeEndFormIfNessesary"/-->
</f:root>