I have an "edit" form with an "h:inputText" component whose value comes from a
bean.
If I change the input value, cancel the edit and load the edit page again, I'm
still seeing the modified value.
I confirmed that the actual object that is outjected has the correct value from
the database. I even added an "outputText" component after the "inputText"
component on the page, and the input field has the bogus (modified) value while
the text from "outputText" has the correct value.
This is maddening!!!
I'm using Seam 1.2.1. Here are some snippets:
<h:inputText id="name" value="#{rule.name}" />
| <h:outputText value="#{rule.name}" />
|
@Name("editDocumentRule")
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| public class EditDocumentRuleAction implements EditDocumentRule {
|
| @PersistenceContext
| EntityManager em;
|
| @In(required = false)
| @Out(scope = ScopeType.CONVERSATION)
| DocumentRule rule;
|
| @In(create = true)
| DocumentRuleManager documentRuleMgr;
|
| @RequestParameter(value = "id")
| private Integer ruleId;
|
| @Begin(join = false, flushMode=FlushModeType.MANUAL)
| public String edit() {
|
| setRule(documentRuleMgr.getDocumentRule(em, getRuleId()));
|
| return "/jsf/rules/EditDocumentRule.xhtml";
| }
|
| @End
| @Rollback
| public String cancel() {
| em.refresh(rule);
| rule.setDoneEditing(true);
| return "/jsf/rules/EditDocumentRule.xhtml";
| }
|
| @End
| public String save() {
| rule.setDoneEditing(true);
| em.merge(rule);
| em.flush();
| return "/jsf/rules/EditDocumentRule.xhtml";
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058458#4058458
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058458
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user