![](/img/trans.png)
[英]Hibernate: Not able to update to a new value if some value is present for a field
[英]Not able to update input field value
大家好,我在jsf页面上有一个输入字段 ,其值设置为setter getter dSecurityGroup。
public void setDSecurityGroup(String dSecurityGroup) {
this.dSecurityGroup = dSecurityGroup;
}
public String getDSecurityGroup() throws IdcClientException, IOException {
Map<String,String> mapValue=getDocumentPropertiesSystem();
dSecurityGroup=mapValue.get("dSecurityGroup");
return dSecurityGroup;
}
第一次我从getter获取值并将其显示给用户时,我的表单上有一个更新按钮,单击时我正在检索此输入字段值以进行更新,但是当我更新输入字段值并单击时更新按钮,它获取先前的值,并将输入字段值更改为旧的值。 我如何获得更改后的值?
您的代码对我来说似乎是错误的。 你总是回来
dSecurityGroup=mapValue.get("dSecurityGroup");
因此只要Thre贴图值不变,您就会看到此值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.