Select to view content in your preferred language

custom layout in AttributeInspector  fot the FieldInspectors

766
3
04-27-2010 08:03 AM
TomSchuller
Frequent Contributor
Hy,
we want to use a more complex layout for representing the FieldInspectors in the AttibuteInspector.
By default, the features attributes  is represented in a simple grid (colCount=2):
  for each feature field: a gridrow with a label and an renderer

We want to place the FieldInspector (label+renderer) in a more complex grid, like a grid with 4 columns or even more comples.

We ddn't found a way to do it directly with the AttributeInspector or with the AttributeInspectorSkin who has just exposed the container form.

How can we create our custom FieldInspector-layout in the AttributeInspector.
To add additional components (buttons) inside the AttributeInspector woudl also be helpful.

Has anybody a solution or are these planned features for the final versions?

Thanks,
Tom
Tags (2)
0 Kudos
3 Replies
JesúsVillalobos
Emerging Contributor
Hi,

I have the same problem. Have you found a solution?

Thanks!
0 Kudos
EddieJesinsky
Deactivated User
Currently trying to figure out if this is possible as well! I suspect not
0 Kudos
JesúsVillalobos
Emerging Contributor
Hi,

I found a solution. Not the best solution but it works.

I write down the source code. This code puts fields in 2 tabs, and in the first one, fields are shown in 2 columns.

Bye 🙂


<s:HGroup id="contenedorDelFormulario">
  <mx:TabNavigator>
   <s:NavigatorContent label="{configFormularios.pestanaTitle}" width="600" height="400">
    <s:HGroup verticalAlign="middle" width="100%" height="100%">
     <esri:AttributeInspector left="6" right="6" top="6" bottom="6" width="100%"
            featureLayers="{hostComponent.featureLayers}"
            formItemsOrder="fieldInspector" deleteButtonVisible="false">
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="NOM"
            label="Nombre"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="CODI_CARRETERA"
            label="Códigooo"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="ID_CARRETERA"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_CONS"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_VIGENCIA_FIN"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_VIGENCIA_INICIO"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="LONGITUD"
            visible="false"/>
     </esri:AttributeInspector>
     <esri:AttributeInspector left="6" right="6" top="6" bottom="6" width="100%"
            featureLayers="{hostComponent.featureLayers}"
            formItemsOrder="fieldInspector" deleteButtonVisible="false">
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="NOM"
            label="Nombre" visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="CODI_CARRETERA"
            label="Códigooo" visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="ID_CARRETERA"
            visible="true"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_CONS"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_VIGENCIA_FIN"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_VIGENCIA_INICIO"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="LONGITUD"
            visible="true"/>
     </esri:AttributeInspector>
    </s:HGroup>
   </s:NavigatorContent>
   <s:NavigatorContent label="Fechas" width="300" height="200">
    <s:HGroup verticalAlign="middle" width="100%" height="100%">
     <esri:AttributeInspector left="6" right="6" top="6" bottom="6" width="100%"
            featureLayers="{hostComponent.featureLayers}"
            formItemsOrder="fieldInspector" deleteButtonVisible="false">
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="NOM"
            label="Nombre" visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="CODI_CARRETERA"
            label="Códigooo" visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="ID_CARRETERA"
            visible="false"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_CONS"
            visible="true"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_VIGENCIA_FIN"
            visible="true"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="DATA_VIGENCIA_INICIO"
            visible="true"/>
      <esri:FieldInspector featureLayer="{hostComponent.featureLayers[1]}"
            fieldName="LONGITUD"
            visible="false"/>
     </esri:AttributeInspector>
    </s:HGroup>
   </s:NavigatorContent>
  </mx:TabNavigator>
 </s:HGroup>
0 Kudos