You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/10/31 02:35:25 UTC
svn commit: r709321 - in /tapestry/tapestry5/trunk:
tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/
tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/...
Author: hlship
Date: Thu Oct 30 18:35:24 2008
New Revision: 709321
URL: http://svn.apache.org/viewvc?rev=709321&view=rev
Log:
TAP5-135: Attempting to set a default sort constraint on the Grid will cause an NullPointerException inside Grid.getSortConstraints()
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridFormEncoderDemo.tml
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormDemo.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormEncoderDemo.java
tapestry/tapestry5/trunk/tapestry-core/src/test/resources/log4j.properties
tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java Thu Oct 30 18:35:24 2008
@@ -116,8 +116,7 @@
void setupRender()
{
- if (model == null) model = modelSource.create(object.getClass(), false,
- overrides.getContainerMessages());
+ if (model == null) model = modelSource.createDisplayModel(object.getClass(), overrides.getContainerMessages());
BeanModelUtils.modify(model, add, include, exclude, reorder);
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java Thu Oct 30 18:35:24 2008
@@ -134,7 +134,7 @@
{
Class beanType = resources.getBoundType("object");
- model = beanModelSource.create(beanType, true, resources.getContainerMessages());
+ model = beanModelSource.createEditModel(beanType, resources.getContainerMessages());
}
BeanModelUtils.modify(model, add, include, exclude, reorder);
@@ -173,5 +173,4 @@
{
form.recordError(errorMessage);
}
-
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java Thu Oct 30 18:35:24 2008
@@ -180,7 +180,7 @@
if (model == null)
{
Class type = resources.getBoundType("object");
- model = modelSource.create(type, true, overrides.getOverrideMessages());
+ model = modelSource.createEditModel(type, overrides.getOverrideMessages());
}
BeanModelUtils.modify(model, add, include, exclude, reorder);
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java Thu Oct 30 18:35:24 2008
@@ -382,7 +382,7 @@
if (sortColumnId == null)
return Collections.emptyList();
- PropertyModel sortModel = dataModel.getById(sortColumnId);
+ PropertyModel sortModel = getDataModel().getById(sortColumnId);
SortConstraint constraint = new SortConstraint(sortModel, getColumnSort());
@@ -404,19 +404,23 @@
{
return new AbstractBinding()
{
-
public Object get()
{
// Get the default row type from the data source
- Class rowType = source.getRowType();
+ GridDataSource gridDataSource = source;
+
+ Class rowType = gridDataSource.getRowType();
- if (rowType == null) throw new RuntimeException(
- "Unable to determine the bean type for rows from the GridDataSource. You should bind the model parameter explicitly.");
+ if (rowType == null)
+ throw new RuntimeException(
+ String.format(
+ "Unable to determine the bean type for rows from %s. You should bind the model parameter explicitly.",
+ gridDataSource));
// Properties do not have to be read/write
- return modelSource.create(rowType, false, overrides.getOverrideMessages());
+ return modelSource.createDisplayModel(rowType, overrides.getOverrideMessages());
}
/**
@@ -473,10 +477,6 @@
if (availableRows == 0) return;
- dataModel = model;
-
- BeanModelUtils.modify(dataModel, add, include, exclude, reorder);
-
int maxPage = ((availableRows - 1) / rowsPerPage) + 1;
// This captures when the number of rows has decreased, typically due to deletions.
@@ -488,6 +488,8 @@
int endIndex = Math.min(startIndex + rowsPerPage - 1, availableRows - 1);
+ dataModel = null;
+
cachingSource.prepare(startIndex, endIndex, sortModel.getSortConstraints());
}
@@ -523,6 +525,13 @@
public BeanModel getDataModel()
{
+ if (dataModel == null)
+ {
+ dataModel = model;
+
+ BeanModelUtils.modify(dataModel, add, include, exclude, reorder);
+ }
+
return dataModel;
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java Thu Oct 30 18:35:24 2008
@@ -60,7 +60,7 @@
private boolean productionMode;
{
- model = source.create(ServiceActivity.class, false, messages);
+ model = source.createDisplayModel(ServiceActivity.class, messages);
model.add("serviceInterface", null);
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java Thu Oct 30 18:35:24 2008
@@ -108,7 +108,6 @@
{
propertyNames.add(po.propertyName);
}
-
}
private static int computeDepth(Method method)
@@ -140,6 +139,16 @@
this.locator = locator;
}
+ public <T> BeanModel<T> createDisplayModel(Class<T> beanClass, Messages messages)
+ {
+ return create(beanClass, false, messages);
+ }
+
+ public <T> BeanModel<T> createEditModel(Class<T> beanClass, Messages messages)
+ {
+ return create(beanClass, true, messages);
+ }
+
public <T> BeanModel<T> create(Class<T> beanClass, boolean filterReadOnlyProperties, Messages messages)
{
Defense.notNull(beanClass, "beanClass");
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java Thu Oct 30 18:35:24 2008
@@ -45,6 +45,26 @@
* org.apache.tapestry5.corelib.components.BeanDisplay}).
* @param messages Used to find explicit overrides of
* @return a model
+ * @deprecated use {@link #createDisplayModel(Class, org.apache.tapestry5.ioc.Messages)} or {@link
+ * #createEditModel(Class, org.apache.tapestry5.ioc.Messages)}
*/
<T> BeanModel<T> create(Class<T> beanClass, boolean filterReadOnlyProperties, Messages messages);
+
+ /**
+ * Creates a model for display purposes; this may include properties which are read-only.
+ *
+ * @param beanClass class of object to be edited
+ * @param messages
+ * @return a model containing properties that can be presented to the user
+ */
+ <T> BeanModel<T> createDisplayModel(Class<T> beanClass, Messages messages);
+
+ /**
+ * Creates a model for edit and update purposes, only properties that are fully read-write are included.
+ *
+ * @param beanClass class of object to be edited
+ * @param messages
+ * @return a model containing properties that can be presented to the user
+ */
+ <T> BeanModel<T> createEditModel(Class<T> beanClass, Messages messages);
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java Thu Oct 30 18:35:24 2008
@@ -1159,4 +1159,10 @@
{
expect(link.toURI()).andReturn(URI);
}
+
+ protected final void train_createEditModel(BeanModelSource source, Class beanClass, Messages messages,
+ BeanModel model)
+ {
+ expect(source.createEditModel(beanClass, messages)).andReturn(model);
+ }
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridFormEncoderDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridFormEncoderDemo.tml?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridFormEncoderDemo.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridFormEncoderDemo.tml Thu Oct 30 18:35:24 2008
@@ -8,7 +8,7 @@
<t:errors/>
- <table t:type="Grid" source="items" row="item" pagerposition="top"
+ <table t:id="grid" t:type="Grid" source="items" row="item" pagerposition="top"
encoder="encoder"
add="id" reorder="id,title,urgency"
rowsperpage="5">
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java Thu Oct 30 18:35:24 2008
@@ -14,8 +14,6 @@
package org.apache.tapestry5.corelib.components;
-import java.lang.annotation.Annotation;
-
import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.PropertyOverrides;
import org.apache.tapestry5.beaneditor.BeanModel;
@@ -31,6 +29,8 @@
import org.easymock.IArgumentMatcher;
import org.testng.annotations.Test;
+import java.lang.annotation.Annotation;
+
public class BeanEditorTest extends TapestryTestCase
{
@Test
@@ -46,7 +46,7 @@
train_getBoundType(resources, "object", RegistrationData.class);
- train_create(source, RegistrationData.class, true, messages, model);
+ train_createEditModel(source, RegistrationData.class, messages, model);
train_getOverrideMessages(overrides, messages);
@@ -57,7 +57,7 @@
BeanEditor component = new BeanEditor();
- component.inject(resources, overrides, source,env);
+ component.inject(resources, overrides, source, env);
component.doPrepare();
@@ -83,7 +83,7 @@
train_getBoundType(resources, "object", Runnable.class);
- train_create(source, Runnable.class, true, messages, model);
+ train_createEditModel(source, Runnable.class, messages, model);
expect(model.newInstance()).andThrow(exception);
@@ -98,7 +98,7 @@
BeanEditor component = new BeanEditor();
- component.inject(resources, overrides, source,env);
+ component.inject(resources, overrides, source, env);
try
{
@@ -119,7 +119,7 @@
private static BeanEditContext contextEq()
{
- EasyMock.reportMatcher(new IArgumentMatcher()
+ EasyMock.reportMatcher(new IArgumentMatcher()
{
public void appendTo(StringBuffer buf)
{
@@ -129,7 +129,7 @@
public boolean matches(Object argument)
{
return (argument instanceof BeanEditContext) &&
- ((BeanEditContext)argument).getBeanClass() == RegistrationData.class;
+ ((BeanEditContext) argument).getBeanClass() == RegistrationData.class;
}
});
@@ -137,7 +137,7 @@
}
@Test
- public void beaneditcontext_pushed_to_environment()
+ public void beaneditcontext_pushed_to_environment()
{
ComponentResources resources = mockComponentResources();
BeanModelSource source = mockBeanModelSource();
@@ -149,10 +149,10 @@
train_getBoundType(resources, "object", RegistrationData.class);
- train_create(source, RegistrationData.class, true, messages, model);
+ train_createEditModel(source, RegistrationData.class, messages, model);
train_getOverrideMessages(overrides, messages);
-
+
expect(model.newInstance()).andReturn(data);
expect(model.getBeanType()).andReturn(RegistrationData.class);
@@ -174,15 +174,15 @@
BeanEditor component = new BeanEditor();
- component.inject(resources, overrides, source,env);
+ component.inject(resources, overrides, source, env);
component.doPrepare();
verify();
}
-
+
@Test
- public void beaneditcontext_popped_from_environment()
+ public void beaneditcontext_popped_from_environment()
{
ComponentResources resources = mockComponentResources();
BeanModelSource source = mockBeanModelSource();
@@ -190,12 +190,12 @@
PropertyOverrides overrides = mockPropertyOverrides();
expect(env.pop(BeanEditContext.class)).andReturn(null);
-
+
replay();
BeanEditor component = new BeanEditor();
- component.inject(resources, overrides, source,env);
+ component.inject(resources, overrides, source, env);
component.cleanupEnvironment();
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java Thu Oct 30 18:35:24 2008
@@ -1165,8 +1165,10 @@
// The first input field is the form's hidden field.
- assertFieldValue("title", "ToDo # 6");
- assertFieldValueSeries("title_%d", 0, "ToDo # 7", "ToDo # 8", "ToDo # 9", "ToDo # 10");
+ // Note the difference: same data sorted differently (there's a default sort).
+
+ assertFieldValue("title", "ToDo # 14");
+ assertFieldValueSeries("title_%d", 0, "ToDo # 15", "ToDo # 16", "ToDo # 17", "ToDo # 18");
type("title_0", "Cure Cancer");
select("urgency_0", "Top Priority");
@@ -1176,8 +1178,15 @@
clickAndWait(SUBMIT);
- assertFieldValueSeries("title_%d", 0, "Cure Cancer", "Pay Phone Bill");
- assertFieldValueSeries("urgency_%d", 0, "HIGH", "LOW");
+ // Because of the sort, the updated items shift to page #1
+
+ clickAndWait("link=1");
+
+ assertFieldValue("title", "Cure Cancer");
+ assertFieldValue("title_0", "Pay Phone Bill");
+
+ assertFieldValue("urgency", "HIGH");
+ assertFieldValue("urgency_0", "LOW");
}
@Test
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormDemo.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormDemo.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormDemo.java Thu Oct 30 18:35:24 2008
@@ -1,4 +1,4 @@
-// Copyright 2007 The Apache Software Foundation
+// Copyright 2007, 2008 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -29,11 +29,6 @@
private List<ToDoItem> items;
- void onPrepare()
- {
- items = database.findAll();
- }
-
void onSuccess()
{
// Here's the down side: we don't have a good way of identifying just what changed.
@@ -46,6 +41,9 @@
public List<ToDoItem> getItems()
{
+ if (items == null)
+ items = database.findAll();
+
return items;
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormEncoderDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormEncoderDemo.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormEncoderDemo.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridFormEncoderDemo.java Thu Oct 30 18:35:24 2008
@@ -1,11 +1,36 @@
+// Copyright 2008 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry5.integration.app1.pages;
import org.apache.tapestry5.PrimaryKeyEncoder;
+import org.apache.tapestry5.annotations.InjectComponent;
+import org.apache.tapestry5.corelib.components.Grid;
import org.apache.tapestry5.integration.app1.data.ToDoItem;
import org.apache.tapestry5.util.DefaultPrimaryKeyEncoder;
public class GridFormEncoderDemo extends GridFormDemo
{
+ @InjectComponent
+ private Grid grid;
+
+ void setupRender()
+ {
+ if (grid.getSortModel().getSortConstraints().isEmpty())
+ grid.getSortModel().updateSort("title");
+ }
+
public PrimaryKeyEncoder<Long, ToDoItem> getEncoder()
{
DefaultPrimaryKeyEncoder<Long, ToDoItem> result = new DefaultPrimaryKeyEncoder<Long, ToDoItem>();
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/resources/log4j.properties?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/resources/log4j.properties (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/resources/log4j.properties Thu Oct 30 18:35:24 2008
@@ -23,5 +23,5 @@
log4j.category.org.apache.tapestry5.integration.app2=debug
-log4j.category.org.apache.tapestry5.corelib.components.Form=debug
+# log4j.category.org.apache.tapestry5.corelib.components=debug
Modified: tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java?rev=709321&r1=709320&r2=709321&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java (original)
+++ tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/AbstractIntegrationTestSuite.java Thu Oct 30 18:35:24 2008
@@ -192,7 +192,16 @@
protected final void assertFieldValue(String locator, String expected)
{
- assertEquals(getValue(locator), expected);
+ try
+ {
+ assertEquals(getValue(locator), expected);
+ }
+ catch (AssertionError ex)
+ {
+ System.err.printf("%s:\n%s\n\n", ex.getMessage(), selenium.getHtmlSource());
+
+ throw ex;
+ }
}
protected final void clickAndWait(String link)
@@ -940,5 +949,4 @@
for (String s : linkText)
clickAndWait(String.format("link=%s", s));
}
-
}