How to create a custom Attribute Inspector for mobile app using the ESRI JS API

737
0
04-05-2013 10:06 AM
BrianBeck
New Contributor III
I am making a mobile version of a JS web application I developed. I'm noticing though that the AttributeInspector widget by default uses standard dojo/form controls. This means that the form within the widget does not work correctly on a mobile browser.

Is there a way to change the AttributeInspector so that it uses the dojox/mobile controls? Right now, I am simply providing the LayerInfos object to constructor without specifying the FieldInfos object. I'd like to avoid that if I can because I'd like the app to be able to use different layers with different fields.

Here is how I create the AttributeInspector:

var layerInfos = this.layers.map(function(layer) {
    return {
        featureLayer : layer.layerObject,
        showAttachments : true,
        isEditable : layer.layerObject.isEditable()
    };
});

this.attInspector = new AttributeInspector({
    layerInfos : layerInfos
}, this.inspectorDiv);
this.attInspector.startup();


Here is what it looks like on my Android phone:

[ATTACH=CONFIG]23255[/ATTACH]

As you can see, the fields get cut off. Also, the dropdown lists do not appear as they should on a mobile device.

Is there anyway to do this without writing a lot of code to account for different field types and domains?
0 Kudos
0 Replies