Hey,
I employed AjaxFallbackDefaultDataTable to list contacts.
The last column contains a delete link that I created it this way:
********************
final List<IColumn> columns = new ArrayList<IColumn>();
columns.add(new AbstractColumn(new Model("Delete")) {
        public void populateItem(Item cellItem, 
           String componentId, IModel rowModel) {
                Contact contact = ((Contact) 
                   rowModel.getObject());
                cellItem.add(new 
                   DeleteContactPanel(componentId, contact));
            }
        });
********************
public DeleteContactPanel(String id, 
       final Contact contact) {
   super(id);
   setOutputMarkupId(true);
   final Form form = new Form("form");
   form.add(new AjaxSubmitLink("delete") {
       @Override
        protected void onSubmit(AjaxRequestTarget target, 
            Form form) {
            service.deleteContact(contact);
            System.out.println("OK Deleted");
        }
    });
    add(form);
}
********************
When deleting the contact from the database, I want to 
remove its row also from AjaxFallbackDefaultDataTable 
and display a message.
But I'm not sure how to accomplish this?
I mean how to communicate between DeleteActionPanel 
and the DataTable?
Would you please help me?
Thanks for help and time.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to