Designer 10.11 | webMethods Mobile Development | Code Snippets | Configuring the SwipeRemove Object
 
Configuring the SwipeRemove Object
The SwipeRemove object allows you to select an element from the ListView by swiping and have it removed. For the selected element to be removed, you must implement the onSwiped() method in the [ViewName]ViewControllerImpl class as follows:
public void onSwiped(int row, int type) {
nUIDisplayObject cell = getCell(row, null);
Object instance = cell.getTag();
[your_dataSource].getFilteredElements().removeElement(instance);
getView().deleteRow(row, IListRenderer.ROW_ANIMATION_STYLE_NONE);
}
Related Topics