*
* @param row
*/
private void appendOrderElementInLines(Row row) {
final ExpenseSheetLine expenseSheetLine = (ExpenseSheetLine) row.getValue();
final BandboxSearch bandboxSearch = BandboxSearch
.create("OrderElementInExpenseSheetBandboxFinder");
bandboxSearch.setSelectedElement(expenseSheetLine.getOrderElement());
bandboxSearch.setSclass("bandbox-workreport-task");
bandboxSearch.setListboxWidth("450px");
EventListener eventListenerUpdateOrderElement = new EventListener() {
@Override
public void onEvent(Event event) {
Listitem selectedItem = bandboxSearch.getSelectedItem();
setOrderElementInESL(selectedItem, expenseSheetLine);
}
};
bandboxSearch
.setListboxEventListener(Events.ON_SELECT, eventListenerUpdateOrderElement);
bandboxSearch.setListboxEventListener(Events.ON_OK, eventListenerUpdateOrderElement);
bandboxSearch.setBandboxEventListener(Events.ON_CHANGING,
eventListenerUpdateOrderElement);
bandboxSearch.setBandboxConstraint("no empty:" + _("cannot be empty"));
row.appendChild(bandboxSearch);
}