reiern70 commented on a change in pull request #481:
URL: https://github.com/apache/wicket/pull/481#discussion_r749117687



##########
File path: 
wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/NavigationToolbar.java
##########
@@ -44,17 +46,18 @@ public NavigationToolbar(final DataTable<?, ?> table)
 
                WebMarkupContainer span = new WebMarkupContainer("span");
                add(span);
-               span.add(AttributeModifier.replace("colspan", new 
IModel<String>()
-               {
-                       @Override
-                       public String getObject()
-                       {
-                               return 
String.valueOf(table.getColumns().size()).intern();
-                       }
-               }));
+               span.add(AttributeModifier.replace("colspan", (IModel<String>) 
() -> String.valueOf(table.getColumns().size()).intern()));
 
                span.add(newPagingNavigator("navigator", table));
-               span.add(newNavigatorLabel("navigatorLabel", table));
+               Component complexLabel = 
newComplexNavigatorLabel("navigatorLabel", table);
+               if (complexLabel != null)
+               {
+                       span.add(complexLabel);
+               }
+               else
+               {
+                       span.add(newNavigatorLabel("navigatorLabel", table));

Review comment:
       > That's unfortunate! It is source compatible but not binary compatible. 
Let's see what others think about it. I don't like the change but I see no 
other way to do it. And we have the same problem for 
org.apache.wicket.extensions.ajax.markup.html.AjaxEditableChoiceLabel#newLabel()
   
   Me neither. I first tried to do as you suggested + mvn clean build and I 
build failed. Thus I had to opt for this HACKY ugly thing. :-( In wicket 10.x 
we can drop the `newNavigatorLabel` and use new method. The use case here is: I 
want to plug there a panel with pagination label + some text filter. In order 
to do this I had to roll my own NavigationToolbar... not nice at all. In other 
places we needed also to hack base classes to roll custom tables. I will review 
later on in other places of our app




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to