Yura,

 

Thanks for clarification.

 

What do you exactly mean with “add a few mappings to SelectOneMenu”?

 

Do you see also any issues when I mark the field transient and check in the getter whether the instance is null and reinitialize it if necessary?

 

I found a hint in the WIKI regarding serialization and DataModels:

http://wiki.apache.org/myfaces/FAQ

 

I have a complex dynamic model in the background and some dependencies between my BackingBeans so I think requestScoped beans are currently not a real/performant alternative for me.

 

Michael

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 28. März 2006 18:34
To: 'MyFaces Discussion'
Subject: RE: HtmlSelectOneMenu not serializeable ?

 

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:[EMAIL PROTECTED]
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

Reply via email to