spring struts hibernate

源代码在线查看: userlist.java

软件大小: 23297 K
上传用户: gxjun686
关键词: hibernate spring struts
下载地址: 免注册下载 普通下载 VIP

相关代码

				package org.appfuse.webapp.action;
				
				import java.util.List;
				
				import org.apache.tapestry.IRequestCycle;
				import org.appfuse.model.User;
				import org.appfuse.service.UserManager;
				
				public abstract class UserList extends BasePage {
				
				    public abstract UserManager getUserManager();
				    public abstract void setUserManager(UserManager manager);
				
				    public List getUsers() {
				        return getUserManager().getUsers(null);
				    }
				    
				    public void edit(IRequestCycle cycle) {
				        UserForm nextPage = (UserForm) cycle.getPage("userForm");
				        Object[] parameters = cycle.getServiceParameters();
				        String username = (String) parameters[0];
				
				        if (log.isDebugEnabled()) {
				            log.debug("fetching user with username: " + username);
				        }
				
				        User user = getUserManager().getUser(username);
				        user.setConfirmPassword(user.getPassword());
				        nextPage.setUser(user);
				        nextPage.setFrom("list");
				        cycle.activate(nextPage);
				    }
				}
							

相关资源