[Geoserver-devel] [jira] Created: (GEOS-2075) Resource info panels shouldn't be backed by an actual ResourceInfo model

Resource info panels shouldn't be backed by an actual ResourceInfo model
------------------------------------------------------------------------

                 Key: GEOS-2075
                 URL: http://jira.codehaus.org/browse/GEOS-2075
             Project: GeoServer
          Issue Type: Bug
            Reporter: Andrea Aime
            Assignee: David Winslow
             Fix For: 2.0

Trying to configure new resources I kept on being greeted by NPE. Looking around I found that this is because the resource panels are based on a ResourceInfo detachable model, but the resource is not configured in the catalog when it's new, it will only be when the user confirms its configuration.
ResourceInfo on the other side contains many non serilaizable fields, so it's not possible to use it as a model directly.

Even for existing resources a direct backing means the values will be modified before the user presses submit, which is not what we want (by direct backing I mean using a property model based on the resource, for example).
The same goes for the layer model.

In my opinion the panels should fill up with the provided resource, but use a separate model objects, and synch back/create the resource/layer only when the user presses the submit button.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira