I have a view-scoped bean that implements Serializable
, and a UIComponent
passed in via binding.
@ManagedBean
@ViewScoped
public class ViewScopedBean implements Serializable {
UIComponent form;
/// ...
}
<h:form binding="#{viewScopedBean.form}"> ...
The UIComponent
is not serializable and thus breaking session restore.
What's the best practice here?
Should I just mark the UIComponents as transient
? Or is it bad practice to use binding= to anything but a request-scoped bean?
I'm using Glassfish 3.1.1, Mojarra 2.1.3 and PrimeFaces 2.2.