0

I have a JSF application in which I am recreating my bean using this

FacesContext
           .getCurrentInstance()
              .getExternalContext()
                 .getSessionMap()
                    .put("myBean" , new MyBean());

Now All of the values have gone but one value still remain and get submitted next time and destroy all output(I mean it shows wrong output then).
Actually I am using ICEFACES autofill tag and the value submitted by this field is not get removed.
Is icefaces using another map for its beans? if Yes then How can I get the bean from icefaces Session map?
I am unable to understand this issue.Any one have idea?

khan
  • 2,664
  • 8
  • 38
  • 64

1 Answers1

0

Apparently you're recreating it at the wrong moment. You'd need to do it during invoke action phase, not before. Otherwise the update model values phase will still fill the bean with submitted values.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • 1
    Hard to tell without seeing an SSCCE. You've shown only one line without any context. It's not clear from the question where/when it's bene invoked. To the point; you just need to make sure that it's invoked during invoke action phase, not earlier. That's all. In a command button action(listener) method, for example. – BalusC Oct 24 '12 at 10:14