Author: mgrigorov
Date: Wed Jul 20 13:00:29 2011
New Revision: 1148746

URL: http://svn.apache.org/viewvc?rev=1148746&view=rev
Log:
WICKET-3886 Option for providing caption to DataTable

Don't go up in the hierarchy searching for the model because it may find 
CompoundPropertyModel and will ask it for "caption" property.
By design the caption should be explicitly provided.


Modified:
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java?rev=1148746&r1=1148745&r2=1148746&view=diff
==============================================================================
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java
 Wed Jul 20 13:00:29 2011
@@ -495,5 +495,12 @@ public class DataTable<T> extends Panel 
 
                        super.onConfigure();
                }
+
+               @Override
+               protected IModel<?> initModel()
+               {
+                       // don't try to find the model in the parent
+                       return null;
+               }
        }
 }


Reply via email to