martin-g commented on a change in pull request #481:
URL: https://github.com/apache/wicket/pull/481#discussion_r749123231
##########
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:
I understand.
But IMO we should not promote the new method in 9.x. I.e. we should not
deprecate the old method.
Here is what I think would be the best:
1) Wicket 9.x - add the new method and use it. Just as in the PR but remove
the deprecations. Also make it clear in the javadoc of the new method that it
is there temporarily for 9.x
2) Wicket 10.x - just change the return type to `Component`
--
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]