We have a search form where the filter is bound to a property on a managed bean (session scope). It's not component binding, its property binding like <h:inputText value="#{searchBean.filter}"/>
.
Submitted data from different machines (different sessions, then) is getting mixed. You search "john", and get "mary" just because the guy beside you have just searched "mary". The value of your searchBean.filter
is getting his submitted data instead of yours.
I've already googled around a lot and found no solution, just an ocurrence of the same problem.
Have anybody faced this issue already? Any clues?
Thanks!
This can have two causes:
static
.To fix 1), just ensure that it's in session scope.
To fix 2), just remove the illegal modifier.
Solved! Finally. Thanks guys, for your attention!
It was something like what Balus guessed at the first time. It was a static
hidden in a dark corner. I had really double, triple checked everything looking for statics, but -- don't ask me why -- someone created a second bean (Foo
) which was holding a static reference for SearchBean
.
In the JSP, there was an action="#{foo.search}"
instead of searchBean.search
. Class Foo
had a method with the same name as in SearchBean
, that was doing no more than a searchBean.search();
.
I think pressure for fixing this bug for yesterday didn't allow me to see this trap in the JSP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With