incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r515894 [1/8] - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src: main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/ test/resources/org/apache/myfa...
Date Thu, 08 Mar 2007 02:12:49 GMT
Author: awiner
Date: Wed Mar  7 18:12:48 2007
New Revision: 515894

URL: http://svn.apache.org/viewvc?view=rev&rev=515894
Log:
ADFFACES-397: panelRadio PPR is broken

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailItemRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelRadioRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/ShowOneListRendererBase.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelRadio-minimal-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelRadio-minimalIE-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelRadio-minimalIERtl-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelRadio-minimalInacc-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelRadio-minimalPPC-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelRadio-minimalSaf-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelRadio-minimalScrRdr-golden.xml

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailItemRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailItemRenderer.java?view=diff&rev=515894&r1=515893&r2=515894
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailItemRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailItemRenderer.java
Wed Mar  7 18:12:48 2007
@@ -28,6 +28,7 @@
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.component.UIXShowOne;
 import org.apache.myfaces.trinidad.component.core.layout.CoreShowDetailItem;
 
 import org.apache.myfaces.trinidad.context.RenderingContext;
@@ -71,7 +72,16 @@
       {
         boolean isDisclosed = XhtmlConstants.SHOW_EVENT.equals(event);
         (new DisclosureEvent(component, isDisclosed)).queue();
-        RequestContext.getCurrentInstance().addPartialTarget(component);
+        // Add ourselves as a PPR target - except, if we're in a 
+        // ShowOne, then really the whole parent has to get
+        // repainted
+        UIComponent pprComponent;
+        if (component.getParent() instanceof UIXShowOne)
+          pprComponent = component.getParent();
+        else
+          pprComponent = component;
+
+        RequestContext.getCurrentInstance().addPartialTarget(pprComponent);
       }
     }
   }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelRadioRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelRadioRenderer.java?view=diff&rev=515894&r1=515893&r2=515894
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelRadioRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/CorePanelRadioRenderer.java
Wed Mar  7 18:12:48 2007
@@ -68,7 +68,7 @@
 
     // draw table to contain the select UI control
     out.startElement("table", component);
-    out.writeAttribute("id", compId + _RADIO_TABLE_SUFFIEX_ID_CONST, null);
+    out.writeAttribute("id", compId + _RADIO_TABLE_SUFFIX_ID_CONST, null);
     out.writeAttribute("border", "0", null);
     out.writeAttribute("cellspacing", "0", null);
     out.writeAttribute("cellpadding", "0", null);
@@ -172,7 +172,7 @@
 
       out.startElement("span", component);
       out.writeAttribute("id",
-                         childClientId + _RADIO_SPAN_SUFFIEX_ID_CONST,
+                         childClientId + _RADIO_SPAN_SUFFIX_ID_CONST,
                          null);
 
       Boolean disabledObj =
@@ -305,7 +305,7 @@
       //pprEnabled is true for PIE and IE Mobile
       if(CoreRenderer.isPDA(RenderingContext.getCurrentInstance())) 
       {
-        StringBuffer jsBuff = new StringBuffer(135);
+        StringBuilder jsBuff = new StringBuilder(135);
         jsBuff.append("submitForm('")
               .append(formName)
               .append("',")
@@ -318,16 +318,12 @@
       }
       else
       {
-        String encodedPartialTargets =
-          ShowOneUtils.getEncodedPartialTargets(component, compId);
-        StringBuffer jsBuff = new StringBuffer(220);
+        StringBuilder jsBuff = new StringBuilder(220);
         jsBuff.append("_submitPartialChange('")
               .append(formName)
               .append("',")
               .append(validate)
-              .append(", {partialTargets:'")
-              .append(encodedPartialTargets)
-              .append("', event:'show',source:'")
+              .append(", {event:'show',source:'")
               .append(detailChildId)
               .append("'});return true;");
     
@@ -336,7 +332,7 @@
     }
     else
     {
-      StringBuffer jsBuff = new StringBuffer(135);
+      StringBuilder jsBuff = new StringBuilder(135);
       jsBuff.append("submitForm('")
             .append(formName)
             .append("',")
@@ -349,9 +345,9 @@
     return onClickHandler;
   }
 
-  private static final String _RADIO_TABLE_SUFFIEX_ID_CONST = "_sor_tbl";
-  private static final String _RADIO_SPAN_SUFFIEX_ID_CONST =
-    _RADIO_TABLE_SUFFIEX_ID_CONST + "_span";
+  private static final String _RADIO_TABLE_SUFFIX_ID_CONST = "_sor_tbl";
+  private static final String _RADIO_SPAN_SUFFIX_ID_CONST =
+    _RADIO_TABLE_SUFFIX_ID_CONST + "_span";
 
   private static final TrinidadLogger _LOG =
     TrinidadLogger.createTrinidadLogger(CorePanelRadioRenderer.class);

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/ShowOneListRendererBase.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/ShowOneListRendererBase.java?view=diff&rev=515894&r1=515893&r2=515894
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/ShowOneListRendererBase.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/html/layout/ShowOneListRendererBase.java
Wed Mar  7 18:12:48 2007
@@ -158,7 +158,7 @@
 
     out.startElement("table", component);
     out.writeAttribute("id", component.getClientId(context), null);
-    String shortDesc = (String) component.getAttributes().get("shorDesc");
+    String shortDesc = (String) component.getAttributes().get("shortDesc");
     if (shortDesc != null)
     {
       out.writeAttribute("summary", shortDesc, null);



Mime
View raw message