id to load is required for loading
由于update时没有传到值
在action中
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public void update(Long id, String username, String password) {
User user = userDao.findUserById(id);
user.setUsername(username);
user.setPassword(password);
userDao.update(user);
}
public void updateRedirect(Long id) {
user = userDao.findUserById(id);
};
public class UpdateUserAction{
private Long usersid;
private String username;
private String password;
public Long getUsersid() {
return usersid;
}
public void setUsersid(Long usersid) {
this.usersid = usersid;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String execute() {
UserServiceImpl userService=new UserServiceImpl();
userService.updateService(usersid, username, password);
return "allUsers";
}
}
分享到:
相关推荐
2. java.lang.IllegalArgumentException: id to load is required for loading 这个错误是由于在使用Hibernate的get方法时,没有提供正确的id参数。解决方法是提供正确的id参数,或者使用其他方法来加载数据。 3. ...
2. `java.lang.IllegalArgumentException: id to load is required for loading` 这个错误意味着在尝试加载一个实体时,没有提供有效的ID。在使用HibernateTemplate获取对象时,确保传递的ID是合法且非空的。例如,...
to read 'load=x:\path\mask.exe', where 'x' is your drive, and 'path' is the location of 'mask.exe', or - In Windows 3.1, set up a program item for Mask for Windows - PRWin98 in the StartUp group ...
list (if present) is now obtained and also checked for an ID match. Implemented additional support for the PCI _ADR execution: upsearch until a device scope is found before executing _ADR. This ...
id -a root 显示用户所在组的所有组名(如root用户,是所有组的组员) df 查看文件系统,查看数据区 用法 df [-F FSType] [-abeghklntVvZ] [-o FSType 特定选项] [目录 | 块设备 | 资源] df -k 以kbytes显示文件...
But because the gear relative to the bearing of the two-stage cylindrical gear reducer is arranged asymmetrically, the load distribution along the tooth direction is uneven, and the shaft stiffness is...
7)....Fixed: "Ask for steps to reproduce" dialog is now DPI-aware 8)....Fixed: Silently ignore and fix invalid values in project options EurekaLog 7.2 Hotfix 2 (7.2.2.0), 30-April-2015 1)....Fixed: ...
- **Loading and Storing Objects**: Finally, you'll learn how to load objects from the database into Java instances and persist new or updated Java objects back to the database. #### Mapping ...
- Implemented VMX controls for loading/storing of MSR_PAT and MSR_EFER - Enabled/Implemented secondary proc-based vmexec controls: - Implemented APIC virtualization - Implemented Extended Page ...
What If Mutual Redistribution Were Required? 375 Configuration Example 3: Redistributing Connected and Loopback Interfaces 376 Configuration Example 4: Redistributing OSPF and EIGRP 380 OSPF and EIGRP...