|
package com.cp.adrabi.jln.web.todo.controllers;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zul.Messagebox;
/**
* Controller for removing Todo
*
* @author ADRABI Abderrahim (z3vil)
*
*/
public class ControllerRemoveTodo extends ControllerBaseTodo
{
/**
*
*/
private static final long serialVersionUID = 1L;
private Long id;
@Override
public void doAfterCompose(Component comp) throws Exception
{
super.doAfterCompose(comp);
this.id = Long.valueOf(this.execution.getParameter("id"));
}
public void onClick$btnRemove() throws InterruptedException
{
this.service.removeTodoById(this.id);
Messagebox.show("Todo Saved successfully");
this.onClick$btnBack(); // :D
}
public void onClick$btnBack()
{
Executions.sendRedirect("/admin/todo/list");
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.