I don't know if you have the source code but it sounds like a bug in the
Layer's caching of the georesource, when a reference in the catalog updates
the layer's resource cache should also update and clean out the old caches,
sounds like this is not correctly happening.  I will try to find time to
look into it but if you have a patch that would really help.

Jesse

On Thu, May 12, 2011 at 10:56 AM, ERNANDES, Fabrice <
[email protected]> wrote:

>  Thanks for your help.
>
>
>
> Futhermore, as I change my data model, some view such as properties is
> correctly updated, cos’ my schema is returned by “getSchema()” in my
> datastore implementation, and schema is built on the fly from the model
> state.
>
>
>
> But, it does not work when schema is returned by a layer:
> layer.getSchema()… I have got an exception when I edit a new feature
> attribute from the layer which has changed…maybe, update schema method can
> resolve that problem, but I don’t know how I can deal with it, I have no
> code example to override it.
>
>
>
> I think the simpliest issue is to reload catalog when schema change.
>
>
>
> Fabrice
>
>
>  ------------------------------
>
> *De :* Jesse Eichar [mailto:[email protected]]
> *Envoyé :* jeudi 12 mai 2011 05:58
> *À :* Jody Garnett
> *Cc :* ERNANDES, Fabrice; [email protected]
> *Objet :* Re: [udig-users] update schema
>
>
>
> Certainly an interesting question, I am not sure that it has been tried
> before.  Like Jody said you will need two steps at least and maybe the
> third:
>
>
>
> 1.  update schema
>
> 2.  Replace the service in the catalog (see jody's link)
>
> 3.  Change the workbench selection.  The table view normally watches the
> workbench selection so maybe just resetting the selection to your layer will
> work or perhaps you will have to have an empty dummy layer to switch to then
> back to your layer as the table view may compare layers and only update if
> the selection changes
>
>
>
> if 1 + 2 does not work and you do not want to do 3 you may have to hack the
> table view to get this new functionality.
>
>
>
> Jesse
>
> On Thu, May 12, 2011 at 12:49 AM, Jody Garnett <[email protected]>
> wrote:
>
> Changing the schema is not done all that often; so it may require a real
> whack to get uDig to notice. I would normally issue a catalog event (
> http://udig.refractions.net/confluence/display/DEV/3+Tracking+Changes) but
> I am not sure if the CatalogView is paying attention we may need to ensure
> it is listening correctly.
>
> --
> Jody Garnett
>
> On Thursday, 12 May 2011 at 12:34 AM, ERNANDES, Fabrice wrote:
>
>    Hi !
>
>
>
> I have got an application based on udig with my own datastore which map my
> data model,  and I would like to know how I can update schema of a layer in
> my datastore programmatically … I am looking at the method “updateSchema()”
> of datastore class
>
>
>
> For example, my layer have 3 attributes which map 3 attributes of my model,
> I need to add or remove an attribute of that model programmatically (because
> user update my model from a view)…and I want my TableView of features in
> udig take in account of that change.
>
>
>
> Thanks for your help
>
>
>
> Fabrice
>
>
>
>
>
>
>
> _______________________________________________
> udig-users mailing list
> [email protected]
> http://lists.refractions.net/mailman/listinfo/udig-users
>
>
>
>
> _______________________________________________
> udig-users mailing list
> [email protected]
> http://lists.refractions.net/mailman/listinfo/udig-users
>
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to