must be marked as Serializable or have a TypeConverter other than ReferenceConverter to be put in vi

J

jeffpriz

I'm having trouble.. I created a small class that I pass to my Pages,
and I want to put that class into Viewstate..

I do:

Viewstate.add("thisVar", myClassVariable)

and i receive the lovely message that:
"my class" must be marked as Serializable or have a TypeConverter other
than ReferenceConverter to be put in viewstate.

Great... except that the class *IS* marked as serializable! .. I've
simplified the class all the way down to just a pair of strings to
remove the possibility that the members of the class weren't
serializable, and i STILL get that message..

What am i doing wrong??

thanks
jeffpriz
 
P

Peter Rilling

Does your class inherit from anything? If so, serialization might try to
encode all fields in the parent class.
 
J

jeffpriz

Exactly the trouble! Thanks

That's exactly it.. down the line the of inheritance a base class did
not get marked as serializable! Doh! (and I thought I had checked that
already.. but sure enough there it was!)

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top