⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userregisteraction.java

📁 ssh2注册查询搜索分页实例ssh2注册查询搜索分页实例
💻 JAVA
字号:
/**
 * 
 */
package com.feiling.web.user;

import com.feiling.dao.domain.User;
import com.feiling.service.UserService;
import com.feiling.web.domain.UserRegisterForm;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author 邓飞玲
 * Sep 11, 2008
 * deng819@163.com
 */
public class UserRegisterAction extends AbstractActionSupport {
	private UserRegisterForm regForm;
	private UserService userService;
	/**
	 * @param userService the userService to set
	 */
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	@Override
	public String execute() throws Exception
	{
		if(regForm == null)
		{
			System.out.println("return input!");
			regForm = new UserRegisterForm();
			return INPUT;
		}
		else
		{
			System.out.println("return success!user name=>" + regForm.getUsername());
			User user = new User();
			user.setUsername(regForm.getUsername());
			user.setPassword(regForm.getPassword());
			user.setEmail(regForm.getEmail());
			userService.registerUser(user);
			return SUCCESS;
		}
	}
	/**
	 * @return the regForm
	 */
	public UserRegisterForm getRegForm() {
		return regForm;
	}
	/**
	 * @param regForm the regForm to set
	 */
	public void setRegForm(UserRegisterForm regForm) {
		this.regForm = regForm;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -