You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/11/14 08:15:47 UTC
svn commit: r1409104 - in /myfaces/tobago/branches/tobago-1.5.x:
tobago-core/src/main/java/org/apache/myfaces/tobago/util/
tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/
tobago-example/tobago-example-test/src/m...
Author: lofwyr
Date: Wed Nov 14 07:15:45 2012
New Revision: 1409104
URL: http://svn.apache.org/viewvc?rev=1409104&view=rev
Log:
TOBAGO-1215: Markup dependent layout is broken after AJAX reload
Added:
myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/
myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.selenium.html
myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.xhtml
Modified:
myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java
myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java
myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml
myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/property/tobago-theme-config.properties
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java?rev=1409104&r1=1409103&r2=1409104&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/util/EncodeAjaxCallback.java Wed Nov 14 07:15:45 2012
@@ -48,6 +48,7 @@ public class EncodeAjaxCallback implemen
}
}
}
+ prepareRendererAll(facesContext, component);
if (component instanceof LayoutContainer) {
LayoutContainer layoutContainer = (LayoutContainer) component;
Measure width = layoutContainer.getCurrentWidth();
@@ -60,7 +61,6 @@ public class EncodeAjaxCallback implemen
layoutContainer.setWidth(oldWidth);
layoutContainer.setHeight(oldHeight);
}
- prepareRendererAll(facesContext, component);
encodeAll(facesContext, component);
} catch (IOException e) {
throw new FacesException(e);
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java?rev=1409104&r1=1409103&r2=1409104&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/Reload.java Wed Nov 14 07:15:45 2012
@@ -28,6 +28,15 @@ public class Reload {
return true;
}
+ public String tick() {
+ counter++;
+ return null;
+ }
+
+ public void reset() {
+ counter = 0;
+ }
+
public boolean isOnlyEven() {
counter++;
return counter % 2 == 0;
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml?rev=1409104&r1=1409103&r2=1409104&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml Wed Nov 14 07:15:45 2012
@@ -33,6 +33,13 @@
<renderers>
<renderer>
+ <name>Image</name>
+ <supported-markup>
+ <markup>double</markup>
+ </supported-markup>
+ </renderer>
+
+ <renderer>
<name>TreeCommand</name>
<supported-markup>
<markup>todo</markup>
Added: myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.selenium.html
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.selenium.html?rev=1409104&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.selenium.html (added)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.selenium.html Wed Nov 14 07:15:45 2012
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8080/" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/faces/test/markup/tobago-1215.xhtml</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementHeight</td>
+ <td>//img</td>
+ <td>200</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>id=page:button</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForValue</td>
+ <td>page:counter</td>
+ <td>1</td>
+</tr>
+<tr>
+ <td>assertElementHeight</td>
+ <td>//img</td>
+ <td>200</td>
+</tr>
+</tbody></table>
+</body>
+</html>
Added: myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.xhtml?rev=1409104&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.xhtml (added)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/test/markup/tobago-1215.xhtml Wed Nov 14 07:15:45 2012
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<f:view
+ xmlns:tc="http://myfaces.apache.org/tobago/component"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tx="http://myfaces.apache.org/tobago/extension">
+ <tc:page id="page" width="300px" height="600px">
+ <tc:panel id="panel">
+
+ <f:facet name="layout">
+ <tc:gridLayout rows="50px;auto;auto;auto;auto" />
+ </f:facet>
+
+ <tc:out value="An image with the preferred height of 200, to test Bug TOBAGO-1215. The test is successful, if the image has the same height of 200 after the reload."/>
+
+ <tc:image markup="double" value="pidgeon-point.jpg" id="image"/>
+
+ <tx:in label="Counter" fieldId="counter" value="#{reload.counter}" readonly="true"/>
+
+ <tc:button label="Reload (AJAX)" id="button" action="#{reload.tick}" renderedPartially="panel"/>
+
+ <tc:button label="Reset Counter" action="#{reload.reset}"/>
+
+ </tc:panel>
+ </tc:page>
+</f:view>
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/property/tobago-theme-config.properties?rev=1409104&r1=1409103&r2=1409104&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/property/tobago-theme-config.properties Wed Nov 14 07:15:45 2012
@@ -17,3 +17,6 @@
# TOBAGO-1134
Test[test].testValue=666
+
+Image.preferredHeight=100
+Image[double].preferredHeight=100