Select to view content in your preferred language

Popups Problem

631
5
09-19-2011 02:10 PM
KevinHighland
Frequent Contributor
I'm trying to create a viewer that will allow users to view attributes and create new features.

My problem is that I can't get anything past displaying the features to work. Clicking on the dynamic layer does nothing and clicking on the editor widget displays a message that there are no editable layers.

Taking one step at a time, here is my code for the popups:
Config file:
<operationallayers>
<layer label="Bluff Features" type="dynamic" visible="true" alpha="1"
url="http://gisweb:9231/internal/rest/services/Secured/Bluff_Explorer/MapServer"/>
<sublayer id="0" popupconfig="popups/bluff_LowerArmor.xml"/>
<sublayer id="1" popupconfig="popups/bluff_MiddleArmor.xml"/>
<sublayer id="2" popupconfig="popups/bluff_UpperArmor.xml"/>
<sublayer id="3" popupconfig="popups/bluff_Failure.xml"/>
<sublayer id="4" popupconfig="popups/bluff_LargeFailures.xml"/>
<sublayer id="5" popupconfig="popups/bluff_Caves.xml"/>
</operationallayers>


popup files (example from one):
<?xml version="1.0"?>
<configuration>
    <title>Middle Bluff Armor</title>
    <description></description>
    <fields>
        <field name="ObjectID"/>         
        <field name="LifeCycleStatus"/>
  <field name="ArmorType"/>
        <field name="USACE_Reach"/>
        <field name="OwnedBy"/>
        <field name="MaintainedBy"/>
    </fields>
</configuration>



Can anyone see a problem with my code? Could it be something to do with the settings of the service?

Any help or ideas would be greatly appreciated.

Thanks!
Kevin
Tags (2)
0 Kudos
5 Replies
BjornSvensson
Esri Regular Contributor
...create new features....


To be able to edit data you need to point <layer> to a layer within a FeatureServer (not a full MapServer service).

For example:
<layer label="HomeLand Security Incident Points" 
    type="feature" 
    visible="true" 
    popupconfig="popups/PopUp_IncidentPoints.xml" 
    url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0"
/>


See the Edit widget documentation for more information - http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Edit_widget/01m30000000v000000/
0 Kudos
KevinHighland
Frequent Contributor
It started "working," but I'm still encountering three problems:

1) When I switched the operational layers to features, my symbology/labels disappeared. I had points with address # labels and lines drawing more than one line (dashed line on top of a solid) for symbology. Now I only see the bottom levels - no labels and no dashed lines. I tried switching the image type, but that didn't seem to work. Is this a known issue with the feature type?

2) The field areas in the popups are blank. Is it related to this bug? However, when I work with the field names in the <description> it works, but I'd rather not do that.

3) I still can't edit. I can select feature templates, but nothing happens when I try adding lines or points. I can change attributes, but no edits are going through (might be signified by the fact that the Undo button is greyed out...). There will only be one user editing this data (but I've given myself permissions as well in order to test editing), so I don't want to give SOC user permission - or is this something I have to do regardless?

Any ideas?

(Sorry for the "mitosis" of questions)
0 Kudos
Prakash_RajaMathalairajan
Emerging Contributor
In case u still havent figured out, I hope this helps.

Make sure u publish it as a Feature server if u want to use it for the Edit widget
For the main config file (operational layers)


<layer label="Bluff Features" type="feature" visible="true" alpha="1"
                   popupconfig="popups/bluff_LowerArmor.xml"
                   url="http://gisweb:9231/internal/rest/services/Secured/Bluff_Explorer/FeatureServer/(whaever number)"/>

Then your pop ups are not displaying because u need to set the visibility to true..

<?xml version="1.0"?>
<configuration>
    <title>Middle Bluff Armor</title>
    <description></description>
    <fields>
        <field name="ObjectID" visible="true"/>        
        <field name="LifeCycleStatus" visible="true" />
        <field name="ArmorType" visible="true"/>   
        <field name="USACE_Reach" visible="true"/>
        <field name="OwnedBy" visible="true"/>
        <field name="MaintainedBy" visible="true"/>
    </fields>
</configuration>

Thanks..
0 Kudos
IanDunn
Emerging Contributor
Hi All,

I am also having the same problem in that when I try to add a point nothing happens.  I can edit attributes of current points but I am not able to add new points.  This is happening for polygon and line features as well.  The layers I am trying to edit are published as a FeatureService and are referenced in my config file as .../FeatureServer/(#) and the layer type tag is also "Feature".

Any ideas?

Thanks

Ian
0 Kudos
Prakash_RajaMathalairajan
Emerging Contributor
I think the added features are not pointing to the correct database. Please check the path to the database..
I implemented the same thing and it worked.. the process involved..
1) Creating the database in the server.( ie the fields )
2) pulling the database  file to the mxd (which will of course have only the fields)
3) publish the mxd as a feature service.
0 Kudos