Hi again,

Big thanks to Thiago and everyone else who answers questions on this list.

I have a standard pattern in my app an EventLink inside a zone that shuffles 
items between lists. I based the code on the AJAX EventLink jumpstart [1]

The two eventlinks are "add" and "remove".

>From a full page refresh if I perform an "add" on an Object instance A, then a 
>"remove" on the same A I get the error:

     Request event 'remove' (on component mypackage/MyPage) was not handled; 
you must provide a matching event handler method in the component or in one of 
its containers.

However, if I refresh the page after the "add" and before the "remove", it 
works fine. If I perform the "add" and then "remove" on Object B, which was 
there since the page refresh, it works fine.

Here's a sample of my event handlers:

   Object onRemoveItem(Long id) {
        Item item = itemFetcher(id);
        _listOfItems.remove(item); // a Set<Item> that backs the Grid component 
I'm using
        _listOfItemsToAdd.add(item); // a Set<Item> for the list of addable 
items
        dbDelete(item);
        if (_request.isXHR()) {
            return _itemZone.getBody();
        }
        return null;
    }

    Object onAddCourseModule(Long id) {
        Item item = itemFetcher(id);
        _listOfItems.add(item);
        _listOfItemsToAdd.remove(item);
         dbAdd(item);
        if (_request.isXHR()) {
            return _itemZone.getBody();
        }
        return null;
    }



Thanks,

Casey

[1]: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/eventlink


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

Reply via email to