The layer has a blackboard as well but they are transient (not stored). There are several methods you could use to get around this. The easiest is to create a style extension and use the style blackboard instead of the layer blackboard. The Style blackboard is persisted.
The other (probably worse) option is to store the layers properties in the map blackboard and define a persister extension in order to persist the layer values. I think I would recommend the first option. Jesse On Wed, Apr 22, 2009 at 8:29 AM, KLAEBE Michael < [email protected]> wrote: > Hi, > > In case this is the wrong place to ask this question please educate me as > to the correct place. > > I have a need to add some 'properties' to Maps and Layers. The idea being > users can update these properties and they're persisted between uDig > sessions. For a Map the following worked quite nicely: > * Create a MapCreation Interceptor that sets the default value for > properties on the layer and store the properties in the maps blackboard > * Create a Persister for the various types of properties being put into the > blackboard (so they get persisted between uDig sessions) > * Create a PropertyPage for IMaps to allow display and modification of the > map properties > > I can do the same for Layers however it falls down with the 'persisting > between uDig sessions' bit, because the IBlackboard of a layer is a > SimpleBlackboard unlike the map's IBlackboard which is a BlackboardImpl > > So my question is what is the recommended approach for a Layer? > > Thanks, > > Mike. > > _______________________________________________ > User-friendly Desktop Internet GIS (uDig) > http://udig.refractions.net > http://lists.refractions.net/mailman/listinfo/udig-devel > >
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
