OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Compare Revisions

Regard whitespace Rev 85 → Rev 86

/trunk/Modules/Module Extension Builder/src/org/openconcerto/modules/extensionbuilder/menu/mainmenu/MenuItemEditor.java
110,14 → 110,50
int type = cb.getSelectedIndex();
if (type == 0) {
comboActionChoice.setModel(new DefaultComboBoxModel(componentIds));
 
MenuDescriptor desc = extension.getCreateMenuItemFromId(item.getId());
desc.setType(MenuDescriptor.CREATE);
desc.setListId(null);
if (componentIds.size() > 0) {
comboActionChoice.setSelectedIndex(0);
desc.setComponentId(comboActionChoice.getSelectedItem().toString());
} else {
desc.setComponentId(null);
}
extension.setChanged();
} else {
comboActionChoice.setModel(new DefaultComboBoxModel(listIds));
MenuDescriptor desc = extension.getCreateMenuItemFromId(item.getId());
desc.setType(MenuDescriptor.LIST);
if (listIds.size() > 0) {
comboActionChoice.setSelectedIndex(0);
desc.setListId(comboActionChoice.getSelectedItem().toString());
} else {
desc.setListId(null);
}
desc.setComponentId(null);
extension.setChanged();
}
 
}
});
comboActionChoice.addActionListener(new ActionListener() {
 
@Override
public void actionPerformed(ActionEvent e) {
MenuDescriptor desc = extension.getCreateMenuItemFromId(item.getId());
if (desc.getType() == MenuDescriptor.CREATE) {
desc.setComponentId(comboActionChoice.getSelectedItem().toString());
} else if (desc.getType() == MenuDescriptor.LIST) {
desc.setListId(comboActionChoice.getSelectedItem().toString());
} else {
desc.setComponentId(null);
desc.setListId(null);
}
}
});
 
}
shownInMenu.addActionListener(new ActionListener() {
 
@Override