From 4dd47354ecf0034462f433c6d794a2c4e8137eb2 Mon Sep 17 00:00:00 2001 From: Rob Stokes Date: Wed, 29 Dec 2021 23:46:28 -0700 Subject: [PATCH 1/5] WICKET-6941 Add visible attribute to AbstractColumn to hide/show columns in DataTable/DataGridView. --- .../data/grid/AbstractDataGridView.java | 28 ++++++++++--------- .../repeater/data/grid/ICellPopulator.java | 4 +++ .../repeater/data/grid/PropertyPopulator.java | 13 +++++++++ .../repeater/data/table/AbstractColumn.java | 14 ++++++++++ .../repeater/data/table/HeadersToolbar.java | 5 +++- .../html/repeater/data/table/Contact.java | 23 +++++++++++++-- .../repeater/data/table/ContactGenerator.java | 6 ++++ .../repeater/data/table/DataTablePage.java | 12 +++++++- .../repeater/data/table/DataTableTest.java | 12 ++++++++ 9 files changed, 100 insertions(+), 17 deletions(-) diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/AbstractDataGridView.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/AbstractDataGridView.java index 0ff6d5a3a0b..0cd9d5ef51c 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/AbstractDataGridView.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/AbstractDataGridView.java @@ -149,21 +149,23 @@ protected final void populateItem(final Item item) for (int i = 0; i < populatorsNumber; i++) { ICellPopulator populator = populators.get(i); - IModel> populatorModel = new Model<>(populator); - Item> cellItem = newCellItem(cells.newChildId(), i, populatorModel); - cells.add(cellItem); - - populator.populateItem(cellItem, CELL_ITEM_ID, item.getModel()); - - if (cellItem.get("cell") == null) + if (populator.isVisible()) { - throw new WicketRuntimeException( - populator.getClass().getName() + - ".populateItem() failed to add a component with id [" + - CELL_ITEM_ID + - "] to the provided [cellItem] object. Make sure you call add() on cellItem and make sure you gave the added component passed in 'componentId' id. ( *cellItem*.add(new MyComponent(*componentId*, rowModel) )"); + IModel> populatorModel = new Model<>(populator); + Item> cellItem = newCellItem(cells.newChildId(), i, populatorModel); + cells.add(cellItem); + + populator.populateItem(cellItem, CELL_ITEM_ID, item.getModel()); + + if (cellItem.get("cell") == null) + { + throw new WicketRuntimeException( + populator.getClass().getName() + + ".populateItem() failed to add a component with id [" + + CELL_ITEM_ID + + "] to the provided [cellItem] object. Make sure you call add() on cellItem and make sure you gave the added component passed in 'componentId' id. ( *cellItem*.add(new MyComponent(*componentId*, rowModel) )"); + } } } - } } diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java index 4fea7bcc260..2964f7f6216 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java @@ -71,4 +71,8 @@ public interface ICellPopulator extends IClusterable, IDetachable */ void populateItem(final Item> cellItem, final String componentId, final IModel rowModel); + + boolean isVisible(); + + void setVisible(boolean visible); } diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java index 145eb69531e..1bb2c0d15d5 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java @@ -39,6 +39,7 @@ public class PropertyPopulator implements ICellPopulator { private static final long serialVersionUID = 1L; private final String property; + private boolean visible = true; /** * Constructor @@ -74,4 +75,16 @@ public void populateItem(final Item> cellItem, final String co { cellItem.add(new Label(componentId, new PropertyModel<>(rowModel, property))); } + + @Override + public boolean isVisible() + { + return visible; + } + + @Override + public void setVisible(boolean visible) + { + this.visible = visible; + } } diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java index 3ef1f61693d..5e4d501a98a 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java @@ -37,6 +37,8 @@ public abstract class AbstractColumn implements IStyledColumn private final S sortProperty; + private boolean visible = true; + /** * @param displayModel * model used to generate header text @@ -92,4 +94,16 @@ public String getCssClass() { return null; } + + @Override + public boolean isVisible() + { + return visible; + } + + @Override + public void setVisible(boolean visible) + { + this.visible = visible; + } } diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/HeadersToolbar.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/HeadersToolbar.java index c7a39710b9e..41b9a26a89c 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/HeadersToolbar.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/HeadersToolbar.java @@ -71,7 +71,10 @@ protected Iterator>> getItemModels() for (IColumn column : table.getColumns()) { - columnsModels.add(Model.of(column)); + if (column.isVisible()) + { + columnsModels.add(Model.of(column)); + } } return columnsModels.iterator(); diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/Contact.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/Contact.java index 7a0d480b87a..52a83bf13c8 100644 --- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/Contact.java +++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/Contact.java @@ -37,6 +37,8 @@ public class Contact implements IClusterable private String cellPhone; + private String age; + /** * Constructor */ @@ -51,7 +53,7 @@ public Contact() public String toString() { return "[Contact id=" + id + " firstName=" + firstName + " lastName=" + lastName + - " homePhone=" + homePhone + " cellPhone=" + cellPhone + "]"; + " homePhone=" + homePhone + " cellPhone=" + cellPhone + " age=" + age + "]"; } /** @@ -74,7 +76,8 @@ public boolean equals(final Object obj) return other.getFirstName().equals(getFirstName()) && other.getLastName().equals(getLastName()) && other.getHomePhone().equals(getHomePhone()) && - other.getCellPhone().equals(getCellPhone()); + other.getCellPhone().equals(getCellPhone()) && + other.getAge().equals(getAge()); } else @@ -174,4 +177,20 @@ public void setLastName(final String lastName) { this.lastName = lastName; } + + /** + * @return age + */ + public String getAge() + { + return age; + } + + /** + * @param age + */ + public void setAge(String age) + { + this.age = age; + } } diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/ContactGenerator.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/ContactGenerator.java index ecf422f9363..ef6bcc436c4 100644 --- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/ContactGenerator.java +++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/ContactGenerator.java @@ -70,6 +70,7 @@ public Contact generate() contact.setId(generateId()); contact.setHomePhone(generatePhoneNumber()); contact.setCellPhone(generatePhoneNumber()); + contact.setAge(generateAge()); return contact; } @@ -101,6 +102,11 @@ private String generatePhoneNumber() .toString(); } + private String generateAge() + { + return new StringBuilder().append(rint(1, 999)).toString(); + } + private int rint(final int min, final int max) { return (int)(Math.random() * (max - min) + min); diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java index 44eb1ed55fa..8640fc91b5d 100644 --- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java +++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java @@ -85,12 +85,22 @@ public String getCssClass() columns.add(new PropertyColumn(new Model<>("Home Phone"), "homePhone")); columns.add(new PropertyColumn(new Model<>("Cell Phone"), "cellPhone")); - + IColumn ageColumn = new PropertyColumn(new Model<>("Age"), "age"); + columns.add(ageColumn); + @SuppressWarnings({ "rawtypes", "unchecked" }) DefaultDataTable defaultDataTable = new DefaultDataTable("table", columns, new SortableContactDataProvider(), 8) { + private static final long serialVersionUID = 1L; + @Override + protected void onConfigure() + { + super.onConfigure(); + ageColumn.setVisible(false); + } + @Override protected IModel getCaptionModel() { diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTableTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTableTest.java index 8570cd6dafa..69bac584b03 100644 --- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTableTest.java +++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTableTest.java @@ -185,4 +185,16 @@ public IResourceStream getMarkupResourceStream(MarkupContainer container, } } + /** + * Tests that a {@link DataTable} with non-visible column will not be rendered. + */ + @Test + public void testWicket6941() + { + DataTablePage page = new DataTablePage(); + tester.startPage(page); + tester.assertRenderedPage(DataTablePage.class); + assertTrue(tester.getLastResponseAsString().contains("ID")); + assertFalse(tester.getLastResponseAsString().contains("Age")); + } } From 3cb347aece3d501b40091eba349dc3ec8b5f6694 Mon Sep 17 00:00:00 2001 From: Rob Stokes Date: Fri, 31 Dec 2021 17:07:30 -0700 Subject: [PATCH 2/5] WICKET-6941 Add visible attribute to AbstractColumn review comments. --- .../repeater/data/grid/ICellPopulator.java | 162 ++++----- .../repeater/data/grid/PropertyPopulator.java | 167 +++++----- .../repeater/data/table/AbstractColumn.java | 204 ++++++------ .../data/table/filter/FilterToolbar.java | 315 +++++++++--------- .../repeater/data/table/DataTablePage.java | 11 +- 5 files changed, 428 insertions(+), 431 deletions(-) diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java index 2964f7f6216..849a5afadb8 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/ICellPopulator.java @@ -1,78 +1,84 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.grid; - -import org.apache.wicket.markup.repeater.Item; -import org.apache.wicket.model.IDetachable; -import org.apache.wicket.model.IModel; -import org.apache.wicket.util.io.IClusterable; - -/** - * Represents an object that is capable of populating an {@link Item} container representing a cell - * in a {@link DataGridView} with components. - *

- * Example - *

- * - *

- * class NamePopulator implements ICellPopulator
- * {
- * 	void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
- *       User user=(User)rowModel.getObject(cellItem);
- *       String name=user.getFirstName()+" "+user.getLastName();
- *       cellItem.add(new Label(componentId, name);
- *     }}
- * 
- * - * In this example the IDataProvider assigned to the DataGridView retrieves User objects from the - * database. The cell populator adds a label to the cell that will display the full name of the - * user. - * - * @see DataGridView - * @see Item - * - * @author Igor Vaynberg (ivaynberg) - * - * @param - * Model object type - */ -public interface ICellPopulator extends IClusterable, IDetachable -{ - /** - * Method used to populate a cell in the {@link DataGridView} - * - * Implementation MUST add a component to the cellItem using the component id provided by - * componentId argument, otherwise a WicketRuntimeException will be thrown - * - * @param cellItem - * the item representing the current table cell being rendered - * @param componentId - * the id of the component used to render the cell (only one component should be - * added to the cell) - * @param rowModel - * the model of the row item being rendered. this model usually contains the model - * provided by the data provider. - * - * @see Item - */ - void populateItem(final Item> cellItem, final String componentId, - final IModel rowModel); - - boolean isVisible(); - - void setVisible(boolean visible); -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.grid; + +import org.apache.wicket.markup.repeater.Item; +import org.apache.wicket.model.IDetachable; +import org.apache.wicket.model.IModel; +import org.apache.wicket.util.io.IClusterable; + +/** + * Represents an object that is capable of populating an {@link Item} container representing a cell + * in a {@link DataGridView} with components. + *

+ * Example + *

+ * + *

+ * class NamePopulator implements ICellPopulator
+ * {
+ * 	void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
+ *       User user=(User)rowModel.getObject(cellItem);
+ *       String name=user.getFirstName()+" "+user.getLastName();
+ *       cellItem.add(new Label(componentId, name);
+ *     }}
+ * 
+ * + * In this example the IDataProvider assigned to the DataGridView retrieves User objects from the + * database. The cell populator adds a label to the cell that will display the full name of the + * user. + * + * @see DataGridView + * @see Item + * + * @author Igor Vaynberg (ivaynberg) + * + * @param + * Model object type + */ +public interface ICellPopulator extends IClusterable, IDetachable +{ + /** + * Method used to populate a cell in the {@link DataGridView} + * + * Implementation MUST add a component to the cellItem using the component id provided by + * componentId argument, otherwise a WicketRuntimeException will be thrown + * + * @param cellItem + * the item representing the current table cell being rendered + * @param componentId + * the id of the component used to render the cell (only one component should be + * added to the cell) + * @param rowModel + * the model of the row item being rendered. this model usually contains the model + * provided by the data provider. + * + * @see Item + */ + void populateItem(final Item> cellItem, final String componentId, + final IModel rowModel); + + /** + * Gets whether this column is visible in a {@link DataGridView} + * + * @return true if column is visible + */ + default boolean isVisible() + { + return true; + }; +} diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java index 1bb2c0d15d5..1412cf9ae8a 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/grid/PropertyPopulator.java @@ -1,90 +1,77 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.grid; - -import org.apache.wicket.markup.html.basic.Label; -import org.apache.wicket.markup.repeater.Item; -import org.apache.wicket.model.IModel; -import org.apache.wicket.model.PropertyModel; - -/** - * A convenience implementation of {@link ICellPopulator} that adds a label that will display the - * value of the specified property. Non-string properties will be converted to a string before - * display. - *

- * Example - * - *

- * ICellPopulator cityPopulator = new PropertyPopulator("address.city");
- * 
- * - * @param - * @author Igor Vaynberg (ivaynberg) - */ -public class PropertyPopulator implements ICellPopulator -{ - private static final long serialVersionUID = 1L; - private final String property; - private boolean visible = true; - - /** - * Constructor - * - * @param property - * property whose value will be displayed in the cell. uses wicket's - * {@link PropertyModel} notation. - */ - public PropertyPopulator(final String property) - { - if (property == null) - { - throw new IllegalArgumentException("argument [property] cannot be null"); - } - this.property = property; - } - - /** - * @see org.apache.wicket.model.IDetachable#detach() - */ - @Override - public void detach() - { - } - - /** - * @see org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator#populateItem(org.apache.wicket.markup.repeater.Item, - * java.lang.String, org.apache.wicket.model.IModel) - */ - @Override - public void populateItem(final Item> cellItem, final String componentId, - final IModel rowModel) - { - cellItem.add(new Label(componentId, new PropertyModel<>(rowModel, property))); - } - - @Override - public boolean isVisible() - { - return visible; - } - - @Override - public void setVisible(boolean visible) - { - this.visible = visible; - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.grid; + +import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.markup.repeater.Item; +import org.apache.wicket.model.IModel; +import org.apache.wicket.model.PropertyModel; + +/** + * A convenience implementation of {@link ICellPopulator} that adds a label that will display the + * value of the specified property. Non-string properties will be converted to a string before + * display. + *

+ * Example + * + *

+ * ICellPopulator cityPopulator = new PropertyPopulator("address.city");
+ * 
+ * + * @param + * @author Igor Vaynberg (ivaynberg) + */ +public class PropertyPopulator implements ICellPopulator +{ + private static final long serialVersionUID = 1L; + private final String property; + + /** + * Constructor + * + * @param property + * property whose value will be displayed in the cell. uses wicket's + * {@link PropertyModel} notation. + */ + public PropertyPopulator(final String property) + { + if (property == null) + { + throw new IllegalArgumentException("argument [property] cannot be null"); + } + this.property = property; + } + + /** + * @see org.apache.wicket.model.IDetachable#detach() + */ + @Override + public void detach() + { + } + + /** + * @see org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator#populateItem(org.apache.wicket.markup.repeater.Item, + * java.lang.String, org.apache.wicket.model.IModel) + */ + @Override + public void populateItem(final Item> cellItem, final String componentId, + final IModel rowModel) + { + cellItem.add(new Label(componentId, new PropertyModel<>(rowModel, property))); + } +} diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java index 5e4d501a98a..097c6b6531e 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/AbstractColumn.java @@ -1,109 +1,95 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.table; - -import org.apache.wicket.Component; -import org.apache.wicket.markup.html.basic.Label; -import org.apache.wicket.model.IModel; - -/** - * A helper implementation for the IColumn interface - * - * @author Igor Vaynberg ( ivaynberg ) - * @param - * the type of the object that will be rendered in this column's cells - * @param - * the type of the sort property - */ -public abstract class AbstractColumn implements IStyledColumn -{ - private static final long serialVersionUID = 1L; - - private final IModel displayModel; - - private final S sortProperty; - - private boolean visible = true; - - /** - * @param displayModel - * model used to generate header text - * @param sortProperty - * sort property this column represents - */ - public AbstractColumn(final IModel displayModel, final S sortProperty) - { - this.displayModel = displayModel; - this.sortProperty = sortProperty; - } - - /** - * @param displayModel - * model used to generate header text - */ - public AbstractColumn(final IModel displayModel) - { - this(displayModel, null); - } - - /** - * @return returns display model to be used for the header component - */ - public IModel getDisplayModel() - { - return displayModel; - } - - @Override - public S getSortProperty() - { - return sortProperty; - } - - @Override - public Component getHeader(final String componentId) - { - return new Label(componentId, getDisplayModel()); - } - - @Override - public void detach() - { - if (displayModel != null) - { - displayModel.detach(); - } - } - - @Override - public String getCssClass() - { - return null; - } - - @Override - public boolean isVisible() - { - return visible; - } - - @Override - public void setVisible(boolean visible) - { - this.visible = visible; - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.table; + +import org.apache.wicket.Component; +import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.model.IModel; + +/** + * A helper implementation for the IColumn interface + * + * @author Igor Vaynberg ( ivaynberg ) + * @param + * the type of the object that will be rendered in this column's cells + * @param + * the type of the sort property + */ +public abstract class AbstractColumn implements IStyledColumn +{ + private static final long serialVersionUID = 1L; + + private final IModel displayModel; + + private final S sortProperty; + + /** + * @param displayModel + * model used to generate header text + * @param sortProperty + * sort property this column represents + */ + public AbstractColumn(final IModel displayModel, final S sortProperty) + { + this.displayModel = displayModel; + this.sortProperty = sortProperty; + } + + /** + * @param displayModel + * model used to generate header text + */ + public AbstractColumn(final IModel displayModel) + { + this(displayModel, null); + } + + /** + * @return returns display model to be used for the header component + */ + public IModel getDisplayModel() + { + return displayModel; + } + + @Override + public S getSortProperty() + { + return sortProperty; + } + + @Override + public Component getHeader(final String componentId) + { + return new Label(componentId, getDisplayModel()); + } + + @Override + public void detach() + { + if (displayModel != null) + { + displayModel.detach(); + } + } + + @Override + public String getCssClass() + { + return null; + } +} diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java index 74d30ef495a..a8824085425 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.java @@ -1,152 +1,163 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.table.filter; - -import java.util.LinkedList; -import java.util.List; - -import org.apache.wicket.Component; -import org.apache.wicket.behavior.Behavior; -import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractToolbar; -import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; -import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; -import org.apache.wicket.extensions.markup.html.repeater.data.table.IStyledColumn; -import org.apache.wicket.markup.ComponentTag; -import org.apache.wicket.markup.html.list.ListItem; -import org.apache.wicket.markup.html.list.ListView; -import org.apache.wicket.model.IModel; -import org.apache.wicket.util.lang.Args; -import org.apache.wicket.util.string.Strings; - - -/** - * Toolbar that creates a form to hold form components used to filter data in the data table. Form - * components are provided by columns that implement IFilteredColumn. - * - * @author Igor Vaynberg (ivaynberg) - */ -public class FilterToolbar extends AbstractToolbar -{ - private static final String FILTER_ID = "filter"; - private static final long serialVersionUID = 1L; - - /** - * Constructor - * - * @param table - * data table this toolbar will be added to - * @param form - * the filter form - * @param - * the type of the DataTable's model object - * @param - * the type of the DataTable's sorting parameter - * @param - * the type of filter state object - * - */ - public FilterToolbar(final DataTable table, final FilterForm form) - { - super(table); - - Args.notNull(table, "table"); - - IModel>> model = new IModel<>() { - private static final long serialVersionUID = 1L; - - @Override - public List> getObject() { - return new LinkedList<>(table.getColumns()); - } - }; - - // populate the toolbar with components provided by filtered columns - ListView> filters = new ListView<>("filters", model) - { - private static final long serialVersionUID = 1L; - - @Override - protected void populateItem(ListItem> item) - { - final IColumn col = item.getModelObject(); - item.setRenderBodyOnly(true); - - Component filter = null; - - if (col instanceof IFilteredColumn) - { - IFilteredColumn filteredCol = (IFilteredColumn)col; - filter = filteredCol.getFilter(FILTER_ID, form); - } - - if (filter == null) - { - filter = new NoFilter(FILTER_ID); - } - else - { - if (!filter.getId().equals(FILTER_ID)) - { - throw new IllegalStateException( - "filter component returned with an invalid component id. invalid component id [" + - filter.getId() + - "] required component id [" + - getId() + - "] generating column [" + col + "] "); - } - } - - if (col instanceof IStyledColumn) - { - filter.add(new Behavior() - { - private static final long serialVersionUID = 1L; - - /** - * @see Behavior#onComponentTag(Component, ComponentTag) - */ - @Override - public void onComponentTag(final Component component, final ComponentTag tag) - { - String className = ((IStyledColumn)col).getCssClass(); - if (!Strings.isEmpty(className)) - { - tag.append("class", className, " "); - } - } - }); - } - - item.add(filter); - } - }; - filters.setReuseItems(true); - - add(filters); - } - - @Override - protected void onBeforeRender() - { - if (findParent(FilterForm.class) == null) - { - throw new IllegalStateException("FilterToolbar must be contained within a FilterForm"); - } - super.onBeforeRender(); - } - -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.wicket.extensions.markup.html.repeater.data.table.filter; + +import java.util.LinkedList; +import java.util.List; + +import org.apache.wicket.Component; +import org.apache.wicket.behavior.Behavior; +import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractToolbar; +import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable; +import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; +import org.apache.wicket.extensions.markup.html.repeater.data.table.IStyledColumn; +import org.apache.wicket.markup.ComponentTag; +import org.apache.wicket.markup.html.list.ListItem; +import org.apache.wicket.markup.html.list.ListView; +import org.apache.wicket.model.IModel; +import org.apache.wicket.util.lang.Args; +import org.apache.wicket.util.string.Strings; + + +/** + * Toolbar that creates a form to hold form components used to filter data in the data table. Form + * components are provided by columns that implement IFilteredColumn. + * + * @author Igor Vaynberg (ivaynberg) + */ +public class FilterToolbar extends AbstractToolbar +{ + private static final String FILTER_ID = "filter"; + private static final long serialVersionUID = 1L; + + /** + * Constructor + * + * @param table + * data table this toolbar will be added to + * @param form + * the filter form + * @param + * the type of the DataTable's model object + * @param + * the type of the DataTable's sorting parameter + * @param + * the type of filter state object + * + */ + public FilterToolbar(final DataTable table, final FilterForm form) + { + super(table); + + Args.notNull(table, "table"); + + IModel>> model = new IModel<>() { + private static final long serialVersionUID = 1L; + + @Override + public List> getObject() { + + List> columnsModels = new LinkedList<>(); + + for (IColumn column : table.getColumns()) + { + if (column.isVisible()) + { + columnsModels.add(column); + } + } + + return columnsModels; + } + }; + + // populate the toolbar with components provided by filtered columns + ListView> filters = new ListView<>("filters", model) + { + private static final long serialVersionUID = 1L; + + @Override + protected void populateItem(ListItem> item) + { + final IColumn col = item.getModelObject(); + item.setRenderBodyOnly(true); + + Component filter = null; + + if (col instanceof IFilteredColumn) + { + IFilteredColumn filteredCol = (IFilteredColumn)col; + filter = filteredCol.getFilter(FILTER_ID, form); + } + + if (filter == null) + { + filter = new NoFilter(FILTER_ID); + } + else + { + if (!filter.getId().equals(FILTER_ID)) + { + throw new IllegalStateException( + "filter component returned with an invalid component id. invalid component id [" + + filter.getId() + + "] required component id [" + + getId() + + "] generating column [" + col + "] "); + } + } + + if (col instanceof IStyledColumn) + { + filter.add(new Behavior() + { + private static final long serialVersionUID = 1L; + + /** + * @see Behavior#onComponentTag(Component, ComponentTag) + */ + @Override + public void onComponentTag(final Component component, final ComponentTag tag) + { + String className = ((IStyledColumn)col).getCssClass(); + if (!Strings.isEmpty(className)) + { + tag.append("class", className, " "); + } + } + }); + } + + item.add(filter); + } + }; + filters.setReuseItems(true); + + add(filters); + } + + @Override + protected void onBeforeRender() + { + if (findParent(FilterForm.class) == null) + { + throw new IllegalStateException("FilterToolbar must be contained within a FilterForm"); + } + super.onBeforeRender(); + } + +} diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java index 8640fc91b5d..7ce1c6fad37 100644 --- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java +++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTablePage.java @@ -85,7 +85,15 @@ public String getCssClass() columns.add(new PropertyColumn(new Model<>("Home Phone"), "homePhone")); columns.add(new PropertyColumn(new Model<>("Cell Phone"), "cellPhone")); - IColumn ageColumn = new PropertyColumn(new Model<>("Age"), "age"); + IColumn ageColumn = new PropertyColumn(new Model<>("Age"), "age") + { + private static final long serialVersionUID = 1L; + + public boolean isVisible() + { + return false; + } + }; columns.add(ageColumn); @SuppressWarnings({ "rawtypes", "unchecked" }) @@ -98,7 +106,6 @@ public String getCssClass() protected void onConfigure() { super.onConfigure(); - ageColumn.setVisible(false); } @Override From 4ec84933732d940913f6a24c03ae882c222aef5d Mon Sep 17 00:00:00 2001 From: Rob Stokes Date: Mon, 28 Feb 2022 11:47:38 -0700 Subject: [PATCH 3/5] Version update --- archetypes/quickstart/pom.xml | 2 +- pom.xml | 44 ++++++++++++------- testing/wicket-common-tests/pom.xml | 2 +- testing/wicket-js-tests/pom.xml | 2 +- wicket-auth-roles/pom.xml | 2 +- wicket-bean-validation/pom.xml | 2 +- wicket-cdi/pom.xml | 2 +- wicket-core/pom.xml | 2 +- wicket-devutils/pom.xml | 2 +- wicket-examples/pom.xml | 2 +- wicket-experimental/pom.xml | 2 +- wicket-experimental/wicket-http2/pom.xml | 2 +- wicket-experimental/wicket-metrics/pom.xml | 2 +- wicket-extensions/pom.xml | 2 +- wicket-guice/pom.xml | 2 +- wicket-ioc/pom.xml | 2 +- wicket-jmx/pom.xml | 2 +- wicket-native-websocket/pom.xml | 2 +- .../wicket-native-websocket-core/pom.xml | 2 +- .../wicket-native-websocket-javax/pom.xml | 2 +- wicket-objectsizeof-agent/pom.xml | 2 +- wicket-request/pom.xml | 2 +- wicket-spring/pom.xml | 2 +- wicket-user-guide/pom.xml | 2 +- wicket-util/pom.xml | 2 +- wicket-velocity/pom.xml | 2 +- wicket/pom.xml | 2 +- 27 files changed, 53 insertions(+), 43 deletions(-) diff --git a/archetypes/quickstart/pom.xml b/archetypes/quickstart/pom.xml index 82ed8609f41..970298ae9c9 100644 --- a/archetypes/quickstart/pom.xml +++ b/archetypes/quickstart/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../../pom.xml wicket-archetype-quickstart diff --git a/pom.xml b/pom.xml index f12c0ff7051..6e97a786f66 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC pom Wicket Parent Wicket is a Java-based open source component web application framework. @@ -94,6 +94,16 @@ http://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git HEAD + + + local + file://C:/javastuff/localrepo/snapshots + + + local + file://C:/javastuff/localrepo/releases + + wicket @@ -345,37 +355,37 @@ org.apache.wicket wicket - 9.8.0-SNAPSHOT + 9.8.0.KMC pom org.apache.wicket wicket-auth-roles - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-bean-validation - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-cdi - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-core - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-devutils - 9.8.0-SNAPSHOT + 9.8.0.KMC jar @@ -386,61 +396,61 @@ org.apache.wicket wicket-extensions - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-guice - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-ioc - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-jmx - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-native-websocket-core - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-native-websocket-javax - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-request - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-spring - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-util - 9.8.0-SNAPSHOT + 9.8.0.KMC jar org.apache.wicket wicket-velocity - 9.8.0-SNAPSHOT + 9.8.0.KMC jar diff --git a/testing/wicket-common-tests/pom.xml b/testing/wicket-common-tests/pom.xml index d6375c92ede..4553c34e588 100644 --- a/testing/wicket-common-tests/pom.xml +++ b/testing/wicket-common-tests/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../../pom.xml wicket-common-tests diff --git a/testing/wicket-js-tests/pom.xml b/testing/wicket-js-tests/pom.xml index 53719b21f8f..7ae42eb3bcd 100644 --- a/testing/wicket-js-tests/pom.xml +++ b/testing/wicket-js-tests/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../../pom.xml wicket-js-tests diff --git a/wicket-auth-roles/pom.xml b/wicket-auth-roles/pom.xml index f4f23903329..4fcb7e4e026 100644 --- a/wicket-auth-roles/pom.xml +++ b/wicket-auth-roles/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-auth-roles diff --git a/wicket-bean-validation/pom.xml b/wicket-bean-validation/pom.xml index 827d44d6c06..11740366c89 100644 --- a/wicket-bean-validation/pom.xml +++ b/wicket-bean-validation/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-bean-validation diff --git a/wicket-cdi/pom.xml b/wicket-cdi/pom.xml index 17ddc18224b..7ae9c497fb1 100644 --- a/wicket-cdi/pom.xml +++ b/wicket-cdi/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-cdi diff --git a/wicket-core/pom.xml b/wicket-core/pom.xml index 60aa667a1fb..4733b04af5a 100644 --- a/wicket-core/pom.xml +++ b/wicket-core/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-core diff --git a/wicket-devutils/pom.xml b/wicket-devutils/pom.xml index 92f0f9c794d..4f6c24f1c37 100644 --- a/wicket-devutils/pom.xml +++ b/wicket-devutils/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-devutils diff --git a/wicket-examples/pom.xml b/wicket-examples/pom.xml index 73b5710f6eb..7a6ac0af433 100644 --- a/wicket-examples/pom.xml +++ b/wicket-examples/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-examples diff --git a/wicket-experimental/pom.xml b/wicket-experimental/pom.xml index 71698b6b406..186e90a2b00 100644 --- a/wicket-experimental/pom.xml +++ b/wicket-experimental/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml org.apache.wicket.experimental.wicket9 diff --git a/wicket-experimental/wicket-http2/pom.xml b/wicket-experimental/wicket-http2/pom.xml index cb5f5a2256f..943a91d614e 100644 --- a/wicket-experimental/wicket-http2/pom.xml +++ b/wicket-experimental/wicket-http2/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket.experimental.wicket9 wicket-experimental - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-http2 diff --git a/wicket-experimental/wicket-metrics/pom.xml b/wicket-experimental/wicket-metrics/pom.xml index 8413a6b1f03..9f0e3a06f0e 100644 --- a/wicket-experimental/wicket-metrics/pom.xml +++ b/wicket-experimental/wicket-metrics/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket.experimental.wicket9 wicket-experimental - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-metrics diff --git a/wicket-extensions/pom.xml b/wicket-extensions/pom.xml index 659d6d1d82e..6d8cf5a8e04 100644 --- a/wicket-extensions/pom.xml +++ b/wicket-extensions/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-extensions diff --git a/wicket-guice/pom.xml b/wicket-guice/pom.xml index 37eec3bb51b..c0f8c95db2b 100644 --- a/wicket-guice/pom.xml +++ b/wicket-guice/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-guice diff --git a/wicket-ioc/pom.xml b/wicket-ioc/pom.xml index ac1bc59cc0a..5806d12e108 100644 --- a/wicket-ioc/pom.xml +++ b/wicket-ioc/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-ioc diff --git a/wicket-jmx/pom.xml b/wicket-jmx/pom.xml index 9c604cd7ffa..35c17c36ff8 100644 --- a/wicket-jmx/pom.xml +++ b/wicket-jmx/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-jmx diff --git a/wicket-native-websocket/pom.xml b/wicket-native-websocket/pom.xml index 6f8957cab2c..53846b9630d 100644 --- a/wicket-native-websocket/pom.xml +++ b/wicket-native-websocket/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-native-websocket diff --git a/wicket-native-websocket/wicket-native-websocket-core/pom.xml b/wicket-native-websocket/wicket-native-websocket-core/pom.xml index 45819b421f6..22e417bd011 100644 --- a/wicket-native-websocket/wicket-native-websocket-core/pom.xml +++ b/wicket-native-websocket/wicket-native-websocket-core/pom.xml @@ -21,7 +21,7 @@ org.apache.wicket wicket-native-websocket - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml diff --git a/wicket-native-websocket/wicket-native-websocket-javax/pom.xml b/wicket-native-websocket/wicket-native-websocket-javax/pom.xml index c0c76be0471..49fddc2c26e 100644 --- a/wicket-native-websocket/wicket-native-websocket-javax/pom.xml +++ b/wicket-native-websocket/wicket-native-websocket-javax/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-native-websocket - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-native-websocket-javax diff --git a/wicket-objectsizeof-agent/pom.xml b/wicket-objectsizeof-agent/pom.xml index 540a3009232..7db747e7cdb 100644 --- a/wicket-objectsizeof-agent/pom.xml +++ b/wicket-objectsizeof-agent/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-objectsizeof-agent diff --git a/wicket-request/pom.xml b/wicket-request/pom.xml index cb950633c61..3cefbbffa37 100755 --- a/wicket-request/pom.xml +++ b/wicket-request/pom.xml @@ -20,7 +20,7 @@ wicket-parent org.apache.wicket - 9.8.0-SNAPSHOT + 9.8.0.KMC wicket-request bundle diff --git a/wicket-spring/pom.xml b/wicket-spring/pom.xml index 7176962c746..9ff824eea11 100644 --- a/wicket-spring/pom.xml +++ b/wicket-spring/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-spring diff --git a/wicket-user-guide/pom.xml b/wicket-user-guide/pom.xml index 4022809e289..34af8368da5 100644 --- a/wicket-user-guide/pom.xml +++ b/wicket-user-guide/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-user-guide diff --git a/wicket-util/pom.xml b/wicket-util/pom.xml index ce7170040e6..a78f4042ffd 100755 --- a/wicket-util/pom.xml +++ b/wicket-util/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-util diff --git a/wicket-velocity/pom.xml b/wicket-velocity/pom.xml index 13b19644ca3..5b65fc2aae1 100644 --- a/wicket-velocity/pom.xml +++ b/wicket-velocity/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket-velocity diff --git a/wicket/pom.xml b/wicket/pom.xml index c8dbf9c5333..628ccc12ddf 100644 --- a/wicket/pom.xml +++ b/wicket/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.8.0-SNAPSHOT + 9.8.0.KMC ../pom.xml wicket From 2e2a59adbeaf97b7ffffc0ea8aac0b6d3dc8a0c0 Mon Sep 17 00:00:00 2001 From: Rob Stokes Date: Mon, 22 Jul 2024 19:24:31 -0600 Subject: [PATCH 4/5] Version Update --- pom.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index db150927592..dedf4906c5a 100644 --- a/pom.xml +++ b/pom.xml @@ -354,37 +354,37 @@ org.apache.wicket wicket - 9.8.0.KMC + 9.13.0.KMC pom org.apache.wicket wicket-auth-roles - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-bean-validation - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-cdi - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-core - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-devutils - 9.8.0.KMC + 9.13.0.KMC jar @@ -395,61 +395,61 @@ org.apache.wicket wicket-extensions - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-guice - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-ioc - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-jmx - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-native-websocket-core - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-native-websocket-javax - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-request - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-spring - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-util - 9.8.0.KMC + 9.13.0.KMC jar org.apache.wicket wicket-velocity - 9.8.0.KMC + 9.13.0.KMC jar From a6cef28ebfc5f8eff51e3b53cd53727b85dd186f Mon Sep 17 00:00:00 2001 From: Rob Stokes Date: Tue, 14 Jul 2026 10:06:01 -0600 Subject: [PATCH 5/5] Version Update. --- archetypes/quickstart/pom.xml | 6 +- pom.xml | 113 +++++------------- testing/wicket-common-tests/pom.xml | 6 +- wicket-bean-validation/pom.xml | 2 +- .../page/PageAccessSynchronizerTest.java | 2 +- 5 files changed, 31 insertions(+), 98 deletions(-) diff --git a/archetypes/quickstart/pom.xml b/archetypes/quickstart/pom.xml index 9034705b5f9..473edae65f0 100644 --- a/archetypes/quickstart/pom.xml +++ b/archetypes/quickstart/pom.xml @@ -20,11 +20,7 @@ org.apache.wicket wicket-parent -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC ../../pom.xml wicket-archetype-quickstart diff --git a/pom.xml b/pom.xml index 195a9777f54..996ba8eb993 100644 --- a/pom.xml +++ b/pom.xml @@ -94,15 +94,20 @@ http://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git HEAD - + + + fileserver + fileserver.kennedymensclub.com + scpexe://fileserver.kennedymensclub.com/home/robstokes/repo + + + kennedymensclub.com + file:${project.build.directory}\site + - local + filesystem file://C:/javastuff/localrepo/snapshots - - local - file://C:/javastuff/localrepo/releases - @@ -349,61 +354,37 @@ org.apache.wicket wicket -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC pom org.apache.wicket wicket-auth-roles -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-bean-validation -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-cdi -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-core -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-devutils -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar @@ -414,101 +395,61 @@ org.apache.wicket wicket-extensions -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-guice -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-ioc -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-jmx -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-native-websocket-core -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-native-websocket-javax -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-request -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-spring -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-util -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar org.apache.wicket wicket-velocity -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC jar diff --git a/testing/wicket-common-tests/pom.xml b/testing/wicket-common-tests/pom.xml index 455d801530e..851bd2a7e85 100644 --- a/testing/wicket-common-tests/pom.xml +++ b/testing/wicket-common-tests/pom.xml @@ -20,11 +20,7 @@ org.apache.wicket wicket-parent -<<<<<<< HEAD - 9.13.0.KMC -======= - 9.19.0-SNAPSHOT ->>>>>>> c9a1656391e8ba976e618711906443ce9327a85d + 9.19.0.KMC ../../pom.xml wicket-common-tests diff --git a/wicket-bean-validation/pom.xml b/wicket-bean-validation/pom.xml index 02b19c24015..b4bdd0e0bda 100644 --- a/wicket-bean-validation/pom.xml +++ b/wicket-bean-validation/pom.xml @@ -20,7 +20,7 @@ org.apache.wicket wicket-parent - 9.19.KMC + 9.19.0.KMC ../pom.xml wicket-bean-validation diff --git a/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java b/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java index 22d8ceb79ee..048beab9ccd 100644 --- a/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java +++ b/wicket-core/src/test/java/org/apache/wicket/page/PageAccessSynchronizerTest.java @@ -354,7 +354,7 @@ void failToReleaseUnderLoad() throws Exception // set the synchronizer timeout one second longer than the test runs to prevent // starvation to become an issue final PageAccessSynchronizer sync = new PageAccessSynchronizer( - duration.plus(Duration.ofSeconds(1))); + duration.plus(Duration.ofSeconds(5))); final CountDownLatch latch = new CountDownLatch(100); for (int count = 0; count < 100; count++)