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/09/13 23:48:16 UTC
svn commit: r695034 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
Author: hlship
Date: Sat Sep 13 14:48:16 2008
New Revision: 695034
URL: http://svn.apache.org/viewvc?rev=695034&view=rev
Log:
TAPESTRY-2668: Setting volatile to true on Grid component in form results in NullPointerException
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
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=695034&r1=695033&r2=695034&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 Sat Sep 13 14:48:16 2008
@@ -172,7 +172,7 @@
private boolean lean;
/**
- * If true and the Loop is enclosed by a Form, then the normal state persisting logic is turned off. Defaults to
+ * If true and the Grid is enclosed by a Form, then the normal state persisting logic is turned off. Defaults to
* false, enabling state persisting within Forms. If a Grid is present for some reason within a Form, but does not
* contain any form control components (such as {@link TextField}), then binding volatile to false will reduce the
* amount of client-side state that must be persisted.
@@ -389,8 +389,6 @@
Binding defaultModel()
{
- final ComponentResources containerResources = resources.getContainerResources();
-
return new AbstractBinding()
{
@@ -440,17 +438,17 @@
Object setupRender()
{
- if (!volatileState && formSupport != null) formSupport.store(this, SETUP_DATA_SOURCE);
+ if (formSupport != null) formSupport.store(this, SETUP_DATA_SOURCE);
setupDataSource();
+ // If there's no rows, display the empty block placeholder.
+
return cachingSource.getAvailableRows() == 0 ? empty : null;
}
void setupDataSource()
{
- // If there's no rows, display the empty block placeholder.
-
cachingSource = new CachingDataSource();
int availableRows = cachingSource.getAvailableRows();