POST
|
Hi Bob. I didn't resolve this issue. The combo box can start with a <null> value, but once an actual value has been selected, you can't go back to <null>. I expect to migrate our applications to Javascript very soon and hope that this issue will be addressed. In the meantime, it hasn't really been a problem, since those fields really should have non-null values anyway.
... View more
10-09-2014
03:02 PM
|
0
|
0
|
176
|
POST
|
A combo box in the Edit Widget will not roll up without making a selection, unlike in the Search Widget. Is there any way to make the Edit Widget combo boxes behave like those in the Search Widget? I found the following post and figure that the two widgets may use different classes for the combo box: "the component used for the domain dropdown lists is not the DropDownListField as you would expect, but is actually the undocumented CodedValueDomainField" (com.esri.ags.components.supportClasses.CodedValueDomainField) http://forums.arcgis.com/threads/21608-Default-Attribute-Inspector-Dropdownlists-too-narrow..-how-to-set-width-wider For reference: Edit Widget sample: http://help.arcgis.com/en/webapps/flexviewer/live/index.html?config=apps/config-edit.xml Search Widget sample: http://help.arcgis.com/en/webapps/flexviewer/live/index.html?config=apps/config-search.xml
... View more
05-18-2012
01:00 PM
|
0
|
0
|
252
|
POST
|
When editing feature class attributes using the FlexViewer Edit Widget, the combo box for a field with a coded domain does not display the <null> option. This differs from editing the attributes through ArcMap in that the <null> option will appear there. How can I get the <null> option to appear in the Edit Widget's combo box? I came across a post about the Edit Widget that may be useful: "the component used for the domain dropdown lists is not the DropDownListField as you would expect, but is actually the undocumented CodedValueDomainField" (com.esri.ags.components.supportClasses.CodedValueDomainField) http://forums.arcgis.com/threads/21608-Default-Attribute-Inspector-Dropdownlists-too-narrow..-how-to-set-width-wider I hope that I'm just missing something in the configuration of the widget, but have a feeling that some custom coding will be needed to get the <null> option to show.
... View more
05-18-2012
12:56 PM
|
0
|
2
|
1428
|
POST
|
Dasa, Could you elaborate on including a WMS layer in the Operational Layers section of the config.xml file for Flex Viewer 2.2? The documentation does not have much detail. Specifically, I am attempting to add the hypsography layer from the Toporama Web Map Service (Toporama WMS) of the Earth Sciences Sector (ESS) at Natural Resources Canada (NRCan). See http://geogratis.cgdi.gc.ca/geogratis/en/service/toporama.html for information about this service.
<Layer queryable="0" opaque="0" cascaded="0">
<Name>hypsography</Name>
<Title>Hypsography</Title>
-
<Abstract>
The Hypsography layer represents elevation points and continuous lines formed by peaks of equal altitude used to describe the topography. Elevation of points and lines is always calculated from mean sea level.
</Abstract>
<SRS>EPSG:4269</SRS>
The layer line I have included in my config.xml is as follows: <layer label="Contours" type="wms" visible="true" visiblelayers="hypsography" url="http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en"/> Is there an option to set the WMS version in the layer line? An error message I get seems to indicate that FlexViewer defaults to version 1.3.0, but Toporama supports the OGC WMS standard, version 1.1.1.
SecurityError: Error #2048: Security sandbox violation: http://465793h/FlexViewer2.2/index.swf cannot load data from http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en?VERSION=1%2E3%2E0&REQUEST=GetCapabilities&SERVICE=WMS.
at Function/com.esri.ags.layers:WMSLayer/private:loadCapabilities/com.esri.ags.layers:myFaultFunction()
at mx.rpc::AsyncResponder/fault()
at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyFault()
at mx.rpc.events::FaultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at DirectHTTPMessageResponder/securityErrorHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()
Additionally, is there a way to specify the EPSG code for the WMS in the layer line? This is not mentioned in the documentation. I suppose that "EPSG:900913 - Google Spheric Mercator", which is supported by Toporama, would match the ArcGIS Online cached services.
... View more
12-13-2010
01:00 PM
|
0
|
0
|
557
|
POST
|
Dave, I have modified your code to allow for configuration from the EditWidget XML configuration file. Add the following to EditWidget.xml:
<editablelayer>
<layername>Sample Layer</layername>
<fieldnames>FIELD1,FIELD2</fieldnames>
<fieldlabels>Field1,Field2</fieldlabels>
<hiddenfields>FIELD3</hiddenfields>
</editablelayer>
Within the EditWidget.mxml file:
[Bindable]
private var showAttributesText:String;
/* MODIFICATION -- setup variables for FieldInspector values from configXML */
private var editableLayerName:String;
private var editableLayerFieldNames:Array;
private var editableLayerFieldLabels:Array;
private var editableLayerHiddenFields:Array;
/* MODIFICATION -- END */
private function basewidget_widgetConfigLoaded(event:Event):void
{
// hide map infowindow if any
map.infoWindow.hide();
if (configXML)
{
// MODIFICATION -- load configuration values for FieldInspector into variables
editableLayerName = configXML.editablelayer.layername;
if (configXML.editablelayer.fieldnames.length() > 0)
{
// add field names to array
editableLayerFieldNames = [];
const tempFieldArray:Array = configXML.editablelayer.fieldnames.split(",");
for (var count1:Number = 0; count1 < tempFieldArray.length; count1++)
{
editableLayerFieldNames.push(tempFieldArray[count1]);
}
}
if (configXML.editablelayer.fieldlabels.length() > 0)
{
// add field labels to array
editableLayerFieldLabels = [];
const tempLabelArray:Array = configXML.editablelayer.fieldlabels.split(",");
for (var counter2:Number = 0; counter2 < tempLabelArray.length; counter2++)
{
editableLayerFieldLabels.push(tempLabelArray[counter2]);
}
}
if (configXML.editablelayer.fieldlabels.length() > 0)
{
// add names of hidden fields to array
editableLayerHiddenFields = [];
const tempHiddenFieldArray:Array = configXML.editablelayer.hiddenfields.split(",");
for (var count3:Number = 0; count3 < tempHiddenFieldArray.length; count3++)
{
editableLayerHiddenFields.push(tempHiddenFieldArray[count3]);
}
}
// MODIFICATION -- END
geometryService.url = configXML.geometryservice;
const configToolbarVisible:Boolean = configXML.toolbarvisible == "true";
editor.toolbarVisible = configToolbarVisible;
const configToolbarCutVisible:Boolean = configXML.toolbarcutvisible == "true";
editor.toolbarCutVisible = configToolbarCutVisible;
const configToolbarMergeVisible:Boolean = configXML.toolbarmergevisible == "true";
editor.toolbarMergeVisible = configToolbarMergeVisible;
const configToolbarReshapeVisible:Boolean = configXML.toolbarreshapevisible == "true";
editor.toolbarReshapeVisible = configToolbarReshapeVisible;
if (configXML.createoptions.length() > 0)
{
createOptions.polygonDrawTools = new Array();
createOptions.polylineDrawTools = new Array();
if (configXML.createoptions.polygondrawtools.length() > 0)
{
const polygonDrawToolsList:Array = configXML.createoptions.polygondrawtools.split(",");
for (var i:Number = 0; i < polygonDrawToolsList.length; i++)
{
createOptions.polygonDrawTools.push(polygonDrawToolsList);
}
}
if (configXML.createoptions.polylinedrawtools.length() > 0)
{
const polylineDrawToolsList:Array = configXML.createoptions.polylinedrawtools.split(",");
for (var j:Number = 0; j < polylineDrawToolsList.length; j++)
{
createOptions.polylineDrawTools.push(polylineDrawToolsList );
}
}
editor.createOptions = createOptions;
}
//excludeLayers
excludeLayers = [];
var layers:XMLList = configXML.excludelayer as XMLList;
for (var n:Number = 0; n < layers.length(); n++)
{
excludeLayers.push(layers .toString());
}
//deleteFeatures
if (configXML.deletefeatures.length() > 0)
{
deleteFeatures = configXML.deletefeatures == "true";
}
editor.deleteEnabled = attachmentInspector.deleteEnabled = deleteFeatures;
//labels
if (configXML.labels.attributeslabel[0])
{
attributesLabel = configXML.labels.attributeslabel[0];
}
if (configXML.labels.attachmentslabel[0])
{
attachmentsLabel = configXML.labels.attachmentslabel[0];
}
// featurelayernotvisibletext
EditWidgetTemplatePickerSkin.featureLayerNotVisibleText = configXML.featurelayernotvisibletext || "feature layer is either not visible or out of scale range";
// showattachmentstext
EditWidgetAttributeInspectorSkin.showAttachmentsText = configXML.showattachmentstext || "Show Attachments";
// showattributestext
showAttributesText = configXML.showattributestext || "Show Attributes";
}
// MODIFICATION -- call function to setup FieldInspector
createFieldInspectors();
// MODIFICATION -- END
map.infoWindow.addEventListener(Event.CLOSE, infoWindowCloseHandler);
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.DATA_OPT_LAYERS, null, getOplayers));
}
And add the following function to EditWidget.mxml as well:
// This function establishes the attribute edit environment.
// In particular, the order in which fields are presented,
// and the labels attached to those fields. Lastly, fields
// that should not be user editable are made not visible.
private function createFieldInspectors():void
{
editor.attributeInspector.formItemsOrder = "fieldInspector";
var layer:Layer;
var fLayer:FeatureLayer;
layer = map.getLayer(editableLayerName);
fLayer = layer as FeatureLayer;
var field:FieldInspector;
var fieldHidden:FieldInspector;
// Setup FieldInspectors for visible fields
// Assumption: both editableLayerFieldNames and editableLayerFieldLabels will have the same number of elements
for (var i:Number = 0; i < editableLayerFieldNames.length; i++)
{
field = new FieldInspector();
field.featureLayer = fLayer;
field.fieldName = editableLayerFieldNames;
field.label = editableLayerFieldLabels;
editor.attributeInspector.fieldInspectors.push(field);
}
// Setup FieldInspectors for hidden fields
for (var j:Number = 0; j < editableLayerHiddenFields.length; j++)
{
fieldHidden = new FieldInspector();
fieldHidden.featureLayer = fLayer;
fieldHidden.fieldName = editableLayerHiddenFields ;
fieldHidden.visible = false;
editor.attributeInspector.fieldInspectors.push(fieldHidden);
}
}
... View more
12-08-2010
11:27 AM
|
0
|
0
|
515
|
POST
|
Xiaoyi Zhang, I'm trying to return the attributes to their original order, too, but I haven't been successful so far. It may be worth noting that the attributeInspector property of public class Editor is read-only (i.e. we can 'get' editor.attributeInspector, but we can not 'set' it). The public class AttributeInspector allows us to 'set' properties such as formItemsOrder. We can see that in action in the example at http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AttributeInspectorInfoWindowEditable I'm not sure how to apply the sample code to the ArcGIS Viewer for Flex 2.1.
... View more
12-06-2010
12:56 PM
|
0
|
0
|
515
|
POST
|
Are there plans to add support for EPSG 3857 to version 9.3.1, perhaps as an alias to 102100, or is the move to version 10 going to be the only way to have support for EPSG 3857?
... View more
07-29-2010
02:50 PM
|
0
|
0
|
5819
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|