• Post Reply Bookmark Topic Watch Topic
  • New Topic

serialization problems -whether it is a serious matter?

 
Jan Crownman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'm using Wicket and Maven. Both are relatively new things to me. I'm currently working on a localization, I need a multilingual page.

When I'm building my code I get a warning:
WARN - AbstractPropertyModel - It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems. If you need to access a property of the session via the model use the page instance as the model object and 'session.attribute' as the path.

I'm calling a class DropDownLocale like this:
PropertyModel<Locale> model = new PropertyModel<Locale>(getSession(), "locale");
DropDownLocale selectLanguage = new DropDownLocale("selectLanguage", model, supportedLanguages);
add(selectLanguage);

Does anybody know what I'm doing wrong?
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to Other Application Frameworks.
 
Jan Crownman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved this:

1. LocaleDropDown class

2. Java call on HomePage.java


3. Html




 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!