>> As you see an instance of org.osgi.service.cm.Configuration comes from our
>> PageClass, not from wicket. I going to fix all usage of these final objects.
>
>
> How are you going to fix this? Unless you declare it as final you can't use
> them inside the anonymous inner class, right?
> Do I miss something here?
We can use model provided to component parent. In case from previous mail as
long we have an persistent identifier it is no problem - in case of
Configuration we have PID and reference to ConfigurationAdmin which may be used
inside onSubmit method:
protected void onSubmit() {
Map<String, String> map = getModelObject();
try {
configurationAdmin.getConfiguration(this.pid).update(DictionaryUtils.dictionary(map));
Session.get().info("Configuration " + pid + " updated.");
RequestCycle.get().setResponsePage(ConfigurationsPage.class);
} catch (IOException e) {
e.printStackTrace();
}
}
With wicket we gonna to have model in many places, even simple elements like
Links can have it.
Best regards,
Lukasz
> Also we might introduce LoadableDetachableModels for pages, with these we
>> still may use objecs in inner classes managed by wicket.
>>
>
> Yes, using a detachable model will probably avoid the serialization of the
> model object.
>
> --
> *Ioannis Canellos*
> *
> http://iocanel.blogspot.com
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> Apache ServiceMix <http://servicemix.apache.org/> Committer
> Apache Gora <http://incubator.apache.org/gora/> Committer
> *