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 2005/12/20 18:13:05 UTC

svn commit: r358042 - in /myfaces/tomahawk/trunk/src/java/org/apache/myfaces: component/html/util/ custom/calendar/ custom/calendar/resource/ custom/inputTextHelp/

Author: mmarinschek
Date: Tue Dec 20 09:12:56 2005
New Revision: 358042

URL: http://svn.apache.org/viewcvs?rev=358042&view=rev
Log:
changes - debugging for problems in IE

Added:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/pt.js
      - copied, changed from r357971, myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/prototype.js
Removed:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/prototype.js
Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/inputTextHelp/HtmlTextHelpRenderer.java

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java?rev=358042&r1=358041&r2=358042&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/util/AddResource.java Tue Dec 20 09:12:56 2005
@@ -597,7 +597,7 @@
         }
         catch (Throwable e)
         {
-            log.error("Error while serving resource: " + e.getMessage(), e);
+            log.error("Error while serving resource: " +resourceUri+", message : "+ e.getMessage(), e);
             response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
         }
     }

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java?rev=358042&r1=358041&r2=358042&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java Tue Dec 20 09:12:56 2005
@@ -27,7 +27,6 @@
 import org.apache.myfaces.custom.buffer.HtmlBufferResponseWriterWrapper;
 import org.apache.myfaces.custom.prototype.PrototypeResourceLoader;
 import org.apache.myfaces.custom.inputTextHelp.HtmlTextHelpRenderer;
-import org.apache.myfaces.custom.inputTextHelp.HtmlInputTextHelp;
 import org.apache.commons.lang.StringEscapeUtils;
 
 import javax.faces.application.Application;
@@ -121,14 +120,14 @@
 
             Application application = facesContext.getApplication();
 
-            HtmlInputTextHelp inputText = getOrCreateInputTextChild(inputCalendar, application);
+            HtmlInputText inputText = getOrCreateInputTextChild(inputCalendar, application);
 
             RendererUtils.copyHtmlInputTextAttributes(inputCalendar, inputText);
 
             inputText.setConverter(null); // value for this transient component will already be converted
             inputText.setTransient(true);
-            inputText.setHelpText(inputCalendar.getHelpText());
-            inputText.setSelectText(true);
+            //inputText.setHelpText(inputCalendar.getHelpText());
+            //inputText.setSelectText(true);
 
             if (value == null && inputCalendar.getSubmittedValue() != null)
             {
@@ -237,9 +236,9 @@
         }
     }
 
-    private HtmlInputTextHelp getOrCreateInputTextChild(HtmlInputCalendar inputCalendar, Application application)
+    private HtmlInputText getOrCreateInputTextChild(HtmlInputCalendar inputCalendar, Application application)
     {
-        HtmlInputTextHelp inputText = null;
+        HtmlInputText inputText = null;
 
         List li = inputCalendar.getChildren();
 
@@ -247,16 +246,16 @@
         {
             UIComponent uiComponent = (UIComponent) li.get(i);
 
-            if(uiComponent instanceof HtmlInputTextHelp)
+            if(uiComponent instanceof HtmlInputText)
             {
-                inputText = (HtmlInputTextHelp) uiComponent;
+                inputText = (HtmlInputText) uiComponent;
                 break;
             }
         }
 
         if(inputText == null)
         {
-            inputText = (HtmlInputTextHelp) application.createComponent(HtmlInputTextHelp.COMPONENT_TYPE);
+            inputText = (HtmlInputText) application.createComponent(HtmlInputText.COMPONENT_TYPE);
         }
         return inputText;
     }
@@ -289,18 +288,18 @@
 
         if(javascriptLocation==null)
         {
-            addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, PrototypeResourceLoader.class, "prototype.js");
+            addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, HtmlCalendarRenderer.class, "pt.js");
             addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, HtmlCalendarRenderer.class, "date.js");
             addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, HtmlCalendarRenderer.class, "popcalendar.js");
         }
         else
         {
-            addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javascriptLocation+ "/prototype.js");
+            addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javascriptLocation+ "/pt.js");
             addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javascriptLocation+ "/date.js");
             addresource.addJavaScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javascriptLocation+ "/popcalendar.js");
         }
 
-        HtmlTextHelpRenderer.addJavaScriptResources(facesContext);
+        //HtmlTextHelpRenderer.addJavaScriptResources(facesContext);
 
         facesContext.getExternalContext().getRequestMap().put(JAVASCRIPT_ENCODED, Boolean.TRUE);
     }
@@ -313,7 +312,7 @@
         if( uiComponent instanceof HtmlInputCalendar ){
 
             HtmlInputCalendar inputCalendar = (HtmlInputCalendar) uiComponent;
-            int realFirstDayOfWeek = firstDayOfWeek-1/*Java has different starting-point*/;
+            int realFirstDayOfWeek = firstDayOfWeek-1;//Java has different starting-point;
 
             String[] weekDays;
 
@@ -481,10 +480,7 @@
                 writer.writeAttribute(HTML.CLASS_ATTR, popupButtonStyleClass, null);
             }
 
-            //writer.writeAttribute(HTML.ONCLICK_ATTR, "document.getElementById(\\'"+buttonId+"\\').click()",null);
             writeOnclickJsCalendarFunctionCall(writer, facesContext,uiComponent,dateFormat);
-            //writer.writeAttribute(HTML.ONMOUSEOVER_ATTR, "this.style.cursor=\\'hand\\';", null);
-            //writer.writeAttribute(HTML.ONMOUSEOUT_ATTR, "this.style.cursor=\\'default\\';", null);
 
             writer.endElement(HTML.IMG_ELEM);
         }

Copied: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/pt.js (from r357971, myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/prototype.js)
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/pt.js?p2=myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/pt.js&p1=myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/resource/prototype.js&r1=357971&r2=358042&rev=358042&view=diff
==============================================================================
    (empty)

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/inputTextHelp/HtmlTextHelpRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/inputTextHelp/HtmlTextHelpRenderer.java?rev=358042&r1=358041&r2=358042&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/inputTextHelp/HtmlTextHelpRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/inputTextHelp/HtmlTextHelpRenderer.java Tue Dec 20 09:12:56 2005
@@ -44,7 +44,7 @@
         {
             HtmlInputTextHelp helpTextComp = (HtmlInputTextHelp) component;
             addJavaScriptResources(facesContext);
-            renderInputTextHelp(facesContext, (UIInput)helpTextComp);
+            renderInputTextHelp(facesContext, helpTextComp);
         }
         else
         {
@@ -173,6 +173,6 @@
         AddResource.getInstance(facesContext).addJavaScriptAtPosition(
                 facesContext, AddResource.HEADER_BEGIN, HtmlTextHelpRenderer.class, "inputTextHelp.js");
 
-        facesContext.getExternalContext().getRequestMap().put(JAVASCRIPT_ENCODED, Boolean.TRUE);        
+        facesContext.getExternalContext().getRequestMap().put(JAVASCRIPT_ENCODED, Boolean.TRUE);
     }
 }