use of org.adempiere.webui.component.ListItem in project adempiere by adempiere.
the class WBOMDrop method cmd_save.
// isSelected
/**************************************************************************
* Save Selection
* @return true if saved
*/
private boolean cmd_save() {
ListItem listitem = orderField.getSelectedItem();
KeyNamePair pp = null;
if (listitem != null)
pp = listitem.toKeyNamePair();
if (pp != null && pp.getKey() > 0)
return cmd_saveOrder(pp.getKey());
listitem = invoiceField.getSelectedItem();
pp = null;
if (listitem != null)
pp = listitem.toKeyNamePair();
if (pp != null && pp.getKey() > 0)
return cmd_saveInvoice(pp.getKey());
listitem = projectField.getSelectedItem();
pp = null;
if (listitem != null)
pp = listitem.toKeyNamePair();
if (pp != null && pp.getKey() > 0)
return cmd_saveProject(pp.getKey());
log.log(Level.SEVERE, "Nothing selected");
return false;
}
use of org.adempiere.webui.component.ListItem in project adempiere by adempiere.
the class WAttachment method getFileName.
/**
* Get File Name with index
* @param index index
* @return file name or null
*/
private String getFileName(int index) {
String fileName = null;
if (cbContent.getItemCount() > index) {
ListItem listitem = cbContent.getItemAtIndex(index);
fileName = (String) listitem.getValue();
}
return fileName;
}
Aggregations