Is it safe to use EL-Binding and give a bound component as parameter and read(and set properties on this component). E.g.
Point is, you should never bind a component as a property of a bean which is in broader scope than the request scope. UI components are inherently request scoped. During building/restoring of the view, JSF will check if the getter doesn't already return an existing component and then reuse it instead of creating a new one the usual way. However, if the bean returns an already-created one from a previous/other request/view/session which belongs to a completely different view, then this all would fail as the state collides.
In this particular solution, you're nowhere referencing the component as a bean property, so that's absolutely safe. But, probably better yet is to just bind the particular component attribute you're actually interested in instead of the whole component:
<p:dataTable something="#{bean.something}">
with
private String something;
public void doit() {
System.out.println(something);
something = "something new";
}
See also:
Why it's first happened from Mojara version 2.1.22 (this version number included) ?
Here are the 2.1.22 release notes. So far I'm seeing nothing strictly related to those symptoms. So, this was apparently a fix without a ticket. Perhaps a developer came along and saw some bogus code by coincidence and thought, hey that isn't right, let's fix it right now! I don't closely track the actual changes in source code which are performed without a ticket, so sorry I can't answer that part.