Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.drools.workbench.screens.testscenario.client;
 
public class ListEditor extends VerticalPanel {
    public ListEditor(final CollectionFieldData fieldFieldConstraintHelper helperfinal ScenarioParentWidget parent) {
        if (field.getCollectionFieldList().isEmpty()) {
            Image image = ..NewItem();
            image.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent w) {
                    FieldData fieldData = new FieldData();
                    fieldData.setName(field.getName());
                    field.getCollectionFieldList().add(fieldData);
                    parent.renderEditor();
                }
            });
            add(image);
        } else {
            int i = 0;
            for (final FieldData fieldData : field.getCollectionFieldList()) {
                add(new ListEditorRow(ifieldfieldDatahelperparent));
                i++;
            }
        }
    }
New to GrepCode? Check out our FAQ X