Hi,
Sorry for the late answer: work overflow...
I did try the solution you provided which works with the following change:
public class NewsModel extends LoadableDetachableModel<List<Double>> {
private static final MetaDataKey<List<Double>> NEWS_CACHE_KEY = new
MetaDataKey<>() {
};
public NewsModel() {
}
@Override
public List<Double> load() {
final RequestCycle requestCycle = RequestCycle.get();
List<Double> news = null;
news = requestCycle.getMetaData( NEWS_CACHE_KEY );
if( news == null ){
news = List.of( 12.0, 25.5 );
requestCycle.setMetaData( NEWS_CACHE_KEY, news );
}
return news;
}
}
I had to remove the if condition `if (requestCycle != null)`, because it
seems always true.
Thanks again for your help.
--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]