You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Heinen <mh...@recommind.com> on 2006/03/28 18:25:45 UTC

HtmlSelectOneMenu not serializeable ?

Hi,

 

I came across the following exception in my log file:

java.io.NotSerializableException:
javax.faces.component.html.HtmlSelectOneMenu

 

The HtmlSelectOneMenu is a property in a session scoped managed bean.

Does this mean that I have to declare it transient in order to play it
safe?

What about the implemented StateHolder interface?

What about other component bindings?

 

 

Thanks for clarification

Michael


RE: HtmlSelectOneMenu not serializeable ?

Posted by Yu...@muranosoft.com.
Hi,

 

Well as JSF's UIComponent isn't Seriaizable so all others ui components also
isn't serializable. I recommended to use request beans instead of session.
If you are using session beans, for example you can try to add a few
mappings to SelectOneMenu, for example:

 

Value

selectItems

Disable

. etc.

 

All these elements are serializable even <f:selectItems> as SelectItem is
Serializable.

Using transient to HtmlSelectOneMenu you will have some issues in future
when you will try to deserializable this object. 

 

Thanks,

Yura.

  _____  

From: Michael Heinen [mailto:mhn@recommind.com] 
Sent: Tuesday, March 28, 2006 7:26 PM
To: MyFaces Discussion
Subject: HtmlSelectOneMenu not serializeable ?

 

Hi,

 

I came across the following exception in my log file:

java.io.NotSerializableException:
javax.faces.component.html.HtmlSelectOneMenu

 

The HtmlSelectOneMenu is a property in a session scoped managed bean.

Does this mean that I have to declare it transient in order to play it safe?

What about the implemented StateHolder interface?

What about other component bindings?

 

 

Thanks for clarification

Michael