You need to sign in to do that
Don't have an account?
Ranu Jain
SerializationException
hii,
System.SerializationException: Not Serializable: ApexPages.Message
i initialze message object as a class variable....what should i have to do to remove this exception?
tahnks
Try it with later one, actually when you declare a variable at class level, then they become part of view state of the vf page and these Non-Serializables can't go into view state.
All Answers
It is not serialized, you can use it inside a method to add a message on vf page, but it cannot be used as a property.
ohk i can not use it as a property but can i use it as a class variable and can initialise it as par my requirement....i mean
apex.mas msg;
fun1()
{
msg=new apex.mas('message 1');
}
fun2()
{
msg=new apex.mas('messege 2');
}
or i have to use it in this way??
fun1()
{
apex.mas msg =new apex.mas('message 1');
}
fun2()
{
apex.mas msg=new apex.mas('messege 2');
}
Try it with later one, actually when you declare a variable at class level, then they become part of view state of the vf page and these Non-Serializables can't go into view state.