[Geoprisma-dev] Edit (create) issue

Yves Moisan yves.moisan at boreal-is.com
Thu Jul 22 11:51:37 EDT 2010


Le 2010-07-22 10:51, Yves Moisan a écrit :
> Hi All,
>
> Anybody had a problem like objGPWidgetCreateSomething_Point is not 
> defined (Firebug) ?
>
> The final JS indeed tries to assign attributes to a var that is 
> defined afterwards :
>
> objGPWidgetCreateSomething_Point.setFeaturePanel(objGPWidgetFeaturePanelFormSomething); 
> e.g. on line 2726
> ...
> var objGPWidgetCreateSomething_Point = new 
> OpenLayers.Control.EditFeature_Create(objWidgetOptions);  e.g. on line 
> 2753
>
> Looking at the Create.xslt file shows the variable declaration is the 
> first thing done (line 20).  Any clues ?

Got it.  It was a configuration issue, or rather a GP issue ...  The 
thing is the order of widgets inclusion in the resource is important.  
The FeaturePanelForm must be listed **after** the Create widget :

<!-- Order = OK -->
<resource>
<name>RS_something</name>
<widgets>
<widget>Toolbar</widget>
<widget>QueryOnClick</widget>
                         ...
<widget>CreateSomething_Point</widget>
<widget>FeaturePanelFormSomething</widget>
</widgets>
</resource>

<!-- Order != OK -->
<resource>
<name>RS_something</name>
<widgets>
<widget>Toolbar</widget>
<widget>QueryOnClick</widget>
                         ...
<!-- BAD ORDER !! -->
<widget>FeaturePanelFormSomething</widget>
<widget>CreateSomething_Point</widget>

</widgets>
</resource>

Bad ordering caused 2 things : 1) raise the FB error mentioned above and 
2) no featurepanel would popup upon creating a new feature.

Phew ...

Yves

>
> TIA,
>
> Yves
> _______________________________________________
> Geoprisma-dev mailing list
> Geoprisma-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geoprisma-dev
>




More information about the Geoprisma-dev mailing list