Hi, I'm new to the wicket framework, and I have a problem while using the
PageParameters.

I want to add a class instance as the value of one of the page parameters,
so I did this:

MyClass instance = new MyClass();
PageParameters param = new PageParameters();
param.put("classInstance", instance);

Then I want to get back the parameter as the class instance, so I use:

MyClass theInstance = (MyClass) param.get("classInstance");

This works fine if I put it right after the param.put(...) statement.
However, when I tried to pass the param to another page as a parameter for
the constructor, it throws a class casting exception. I also tried to do
"new PageParameters(new HashMap<String, MyClass>())", but that didn't work
as well.

So can anyone help me solve this problem? Thanks a lot!
-- 
View this message in context: 
http://www.nabble.com/Class-casting-exception-while-using-PageParameters-tp16884113p16884113.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to