Demo entry 6635798

this is a test

   

Submitted by holle on Aug 21, 2017 at 09:54
Language: Java. Code size: 918 Bytes.

public class UserDeleteAction extends ActionSupport {
	private User user = new User();
	private List<User> userList=new ArrayList<User>();
	private UserService service;
	
	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}

	public UserService getService() {
		return service;
	}
	public void setService(UserService service) {
		this.service = service;
		System.out.println(this.service);
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String saveUser() {
		try {
			System.out.println("----------------");
			System.out.println("user的值是"+user.getUserId());
			System.out.println("--------	--------");
			service.deleteUser(user);
		} catch (Exception e) {
			e.printStackTrace();
			return ERROR;
		}
		return SUCCESS;
	} 
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).