You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2009/12/14 18:36:28 UTC

svn commit: r890408 - /myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/

Author: arobinson74
Date: Mon Dec 14 17:36:28 2009
New Revision: 890408

URL: http://svn.apache.org/viewvc?rev=890408&view=rev
Log:
checkpoint

Modified:
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/BodyRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormElementRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoLinkRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputTextRenderer.java
    myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/BodyRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/BodyRenderer.java?rev=890408&r1=890407&r2=890408&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/BodyRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/BodyRenderer.java Mon Dec 14 17:36:28 2009
@@ -248,9 +248,8 @@
         checkLoad = "_checkLoadNoPPR()";
     }
 
-    onload = XhtmlUtils.getChainedJS(checkLoad, onload, false);
-
-    return onload;
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "load", null, XhtmlUtils.getChainedJS(checkLoad, onload, false), null);
   }
 
   protected String getOnunload(
@@ -271,7 +270,8 @@
                                          false);
     }
 
-    return onunload;
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "unload", null, onunload, null);
   }
 
   /**

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormElementRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormElementRenderer.java?rev=890408&r1=890407&r2=890408&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormElementRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormElementRenderer.java Mon Dec 14 17:36:28 2009
@@ -268,7 +268,6 @@
     return toString(bean.getProperty(_contentStyleKey));
   }
 
-
   protected String getOnblur(
     UIComponent component,
     FacesBean   bean)
@@ -276,7 +275,8 @@
     if (_onblurKey == null)
       return null;
 
-    return toString(bean.getProperty(_onblurKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "blur", null, toString(bean.getProperty(_onblurKey)), null);
   }
 
   protected String getOnfocus(
@@ -286,7 +286,8 @@
     if (_onfocusKey == null)
       return null;
 
-    return toString(bean.getProperty(_onfocusKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "focus", null, toString(bean.getProperty(_onfocusKey)), null);
   }
 
   protected String getOnchange(
@@ -296,7 +297,8 @@
     if (_onchangeKey == null)
       return null;
 
-    return toString(bean.getProperty(_onchangeKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "change", "valueChange", toString(bean.getProperty(_onchangeKey)), null);
   }
 
   @Override

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java?rev=890408&r1=890407&r2=890408&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java Mon Dec 14 17:36:28 2009
@@ -1051,7 +1051,8 @@
     if (_onsubmitKey == null)
       return null;
 
-    return toString(bean.getProperty(_onsubmitKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "submit", null, toString(bean.getProperty(_onsubmitKey)), null);
   }
 
   protected String getTargetFrame(

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoLinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoLinkRenderer.java?rev=890408&r1=890407&r2=890408&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoLinkRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/GoLinkRenderer.java Mon Dec 14 17:36:28 2009
@@ -204,7 +204,8 @@
     if (_onblurKey == null)
       return null;
 
-    return toString(bean.getProperty(_onblurKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "blur", null, toString(bean.getProperty(_onblurKey)), null);
   }
 
   protected String getOnfocus(
@@ -214,7 +215,8 @@
     if (_onfocusKey == null)
       return null;
 
-    return toString(bean.getProperty(_onfocusKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "focus", null, toString(bean.getProperty(_onfocusKey)), null);
   }
 
   protected String getTargetFrame(

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputTextRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputTextRenderer.java?rev=890408&r1=890407&r2=890408&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputTextRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputTextRenderer.java Mon Dec 14 17:36:28 2009
@@ -571,7 +571,6 @@
     return onKeydown;
   }
 
-
   /**
    * @todo We have to "getCurrentInstance()" *twice*.  UGH!
    */
@@ -645,7 +644,9 @@
                                         maximumLength.intValue());
       }
     }
-    return onpaste;
+
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "paste", null, null, onpaste);
   }
 
   protected String getOnselect(
@@ -657,7 +658,8 @@
     if (_onselectKey == null)
       return null;
 
-    return toString(bean.getProperty(_onselectKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "select", null, toString(bean.getProperty(_onselectKey)), null);
   }
 
   protected Number getColumns(

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java?rev=890408&r1=890407&r2=890408&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java Mon Dec 14 17:36:28 2009
@@ -945,22 +945,30 @@
   // ATTRIBUTE HOOKS
   //
 
-  protected String getShortDesc(UIComponent component, FacesBean bean)
+  protected String getShortDesc(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_shortDescKey));
   }
 
-  protected String getStyleClass(UIComponent component, FacesBean bean)
+  protected String getStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_styleClassKey));
   }
 
-  protected String getInlineStyle(UIComponent component, FacesBean bean)
+  protected String getInlineStyle(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_inlineStyleKey));
   }
 
-  protected String getOnclick(UIComponent component, FacesBean bean)
+  protected String getOnclick(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onclickKey == null)
       return null;
@@ -974,80 +982,108 @@
       null);
   }
 
-  protected String getOndblclick(UIComponent component, FacesBean bean)
+  protected String getOndblclick(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_ondblclickKey == null)
       return null;
 
-    return toString(bean.getProperty(_ondblclickKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "dblclick", null, toString(bean.getProperty(_ondblclickKey)), null);
   }
 
-  protected String getOnkeydown(UIComponent component, FacesBean bean)
+  protected String getOnkeydown(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onkeydownKey == null)
       return null;
 
-    return toString(bean.getProperty(_onkeydownKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "keydown", null, toString(bean.getProperty(_onkeydownKey)), null);
   }
 
-  protected String getOnkeyup(UIComponent component, FacesBean bean)
+  protected String getOnkeyup(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onkeyupKey == null)
       return null;
 
-    return toString(bean.getProperty(_onkeyupKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "keyup", null, toString(bean.getProperty(_onkeyupKey)), null);
   }
 
-  protected String getOnkeypress(UIComponent component, FacesBean bean)
+  protected String getOnkeypress(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onkeypressKey == null)
       return null;
 
-    return toString(bean.getProperty(_onkeypressKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "keypress", null, toString(bean.getProperty(_onkeypressKey)), null);
   }
 
-  protected String getOnmousedown(UIComponent component, FacesBean bean)
+  protected String getOnmousedown(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmousedownKey == null)
       return null;
 
-    return toString(bean.getProperty(_onmousedownKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "mousedown", null, toString(bean.getProperty(_onmousedownKey)), null);
   }
 
-  protected String getOnmousemove(UIComponent component, FacesBean bean)
+  protected String getOnmousemove(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmousemoveKey == null)
       return null;
 
-    return toString(bean.getProperty(_onmousemoveKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "mousemove", null, toString(bean.getProperty(_onmousemoveKey)), null);
   }
 
-  protected String getOnmouseout(UIComponent component, FacesBean bean)
+  protected String getOnmouseout(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmouseoutKey == null)
       return null;
 
-    return toString(bean.getProperty(_onmouseoutKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "mouseout", null, toString(bean.getProperty(_onmouseoutKey)), null);
   }
 
-  protected String getOnmouseover(UIComponent component, FacesBean bean)
+  protected String getOnmouseover(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmouseoverKey == null)
       return null;
 
-    return toString(bean.getProperty(_onmouseoverKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "mouseover", null, toString(bean.getProperty(_onmouseoverKey)), null);
   }
 
-  protected String getOnmouseup(UIComponent component, FacesBean bean)
+  protected String getOnmouseup(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmouseupKey == null)
       return null;
 
-    return toString(bean.getProperty(_onmouseupKey));
+    return XhtmlUtils.getClientEventHandler(FacesContext.getCurrentInstance(), component,
+             "mouseup", null, toString(bean.getProperty(_onmouseupKey)), null);
   }
 
-  protected String[] getPartialTriggers(UIComponent component,
-    FacesBean bean)
+  protected String[] getPartialTriggers(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_partialTriggersKey == null)
     {