3

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:

Android Snapshot

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.