Hi,

I've created a reusable panel (DeleteObjectPanel.java) which contains a 
BootstrapAjaxButton
for deleting database entries.
After clicking the button, a Bootstrap Modal  (ConfirmDeleteModal.java) appears 
for confirmation.
Both are in the package example.confirm.

MCVE is here:
https://gitlab.com/UlrichK/pageRefreshAfterConfirmation.git    Start of 
application via test/java/example/Start.java

I need this because in my application I have some BootstrapDefaultDataTables 
with deletion functionality.

The DeleteObjectPanel is used in Customer3.java line 131 , during creation of a 
AbstractColumn.

After the deletion is performed, the datatable is refreshed.
But the hole page is disabled!!! See screenshot.
If a replace
target.add(filterForm);
with
target.add(filterForm, getPage());

the page gets refreshed, but I want to understand what is wrong in my code.

This is were I use DeleteObjectPanel (The DataTable is a child component of 
filterForm"):

        columns.add(
                new AbstractColumn<Customer, String>(new Model<>("Löschen"))
                {
                    private static final long serialVersionUID = 1L;

                    @Override
                    public void populateItem(Item<ICellPopulator<Customer>> 
cellItem,
                            String componentId, IModel<Customer> customerModel)
                    {
                        Customer customer = customerModel.getObject();
                        String customerInfo = "Kunde:\n"
                                + customer.getName();
                        cellItem.add(new DeleteObjectPanel(componentId, 
customerInfo)
                        {
                            private static final long serialVersionUID = 
2408937138549967444L;

                            @Override
                            protected void performDeletion(AjaxRequestTarget 
target)
                            {
                                
//customerBean.deleteByUuid(customer.getBopUuid());
                                
DatabaseLocator.getDatabase().delete(customerModel.getObject());

                              // Page is "disabled" completely
                                target.add(filterForm); 

                                //  THIS WORKS
                                //target.add(filterForm, getPage());   
                            }
                        });
                    }
                });

Mit freundlichen Grüßen
Ulrich Knaack

Landesamt für Geoinformation und Landesvermessung Niedersachsen (LGLN)
- Landesvermessung und Geobasisinformation - Landesbetrieb -
Fachgebiet 224 - Geodateninfrastruktur
Podbielskistraße 331, 30659 Hannover
Tel.:    +49 511 64609-287
Fax:     +49 511 64609-161
mailto:ulrich.kna...@lgln.niedersachsen.de
www.lgln.niedersachsen.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to