fieldSelector( val ) );
layout.setWidget( i,
2,
valueEditor( val ) );
final int idx = i;
Image remove = new ImageButton( images.deleteItemSmall() );
remove.addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
if ( Window.confirm( constants.RemoveThisItem() ) ) {
model.removeField( idx );
setModified( true );
getModeller().refreshWidget();
}
}
} );
if ( !this.readOnly ) {
layout.setWidget( i,
3,
remove );
}
}
if ( model.fieldValues.length == 0 ) {
HorizontalPanel h = new HorizontalPanel();
h.add( getSetterLabel() );
if ( !this.readOnly ) {
h.add( new ImageButton( images.edit(),
constants.AddFirstNewField(),
new ClickHandler() {
public void onClick(ClickEvent sender) {
showAddFieldPopup( sender );