Select to view content in your preferred language

FieldInspectors

722
3
11-12-2010 07:41 AM
KathleenBrenkert
Regular Contributor
I am trying to customize the look of my FieldInspectors.  I have created a StringField skin based on the esri StringField and was able to apply this to my FieldInspectors.  I'd like to now do the same for any of my dropdownlistFields, but can't quite figure out how.  I attempted to create a skin for the DropDownListField in the same way as my StringField, but it didn't work.  I primarily just want to increase the width.

A follow up question would be does anyone know how to apply a skin to just 1 or 2 FieldInsepctors? I have a few individual fields I would simply like to increase the height on.  My code below applies it to every Stringfield in the attributeInspector.

esri|StringField
{
skin-class: ClassReference("MyStringFieldSkin");
} 
Tags (2)
0 Kudos
3 Replies
KathleenBrenkert
Regular Contributor
I feel like I'm completely missing something.  I've looked at all the samples under the editor tab and each time they have a string field it shows a nice large box for the data entry (with word wrap).  My out of the box solution comes up with a box about 1 inch wide and only 1 character tall.  How is this larger text box accomplished?
0 Kudos
EddieJesinsky
Deactivated User
You can change the appearance of the field inspector like so:

<esri:FieldInspector featureLayer="{myLayer}" fieldName="blah" label="Blah">
 <esri:renderer>
  <fx:Component>
   <esri:TextField width="175" height="75"/>
  </fx:Component>
 </esri:renderer>
</esri:FieldInspector>
0 Kudos
KathleenBrenkert
Regular Contributor
It throws the error 'could not resolve esri:TextField to a component implementation'.  I tried to use a spark component, but then it doesn't pull my data into the field.  I tried to add in <esri:dataProvider>, but I can't see what the next step is to point it to my active feature in the attribute inspector. 
I've tried the same thing on a drop down list and it will allow me to use the esri:dropdownlistfield, but it again doesn't pull in my data and the drop down list is empty instead of pointing to my domain. 

At this point I'm trying to edit my attributes without using the attribute inspector.  If I can get that code to work then I can customize it anyway I'd like.  I'm having trouble passing an array with my objectid to applyEdits(null, update, null).  So far I can pass my updated attributes or my objectID but haven't successfully passed both at the same time yet.
0 Kudos