0
我們在onClick的listheader期間執行postEvent調用。大多數時間事件被觸發並正常運行。有時它失敗了。我用下面的第二種方法記錄器證實它沒有記錄。postEvent無法在zk中觸發某些時間
public void onClick(Event event) {
if (event.getTarget() != this) {
return;
}
if (editor.isVisible()) {
return;
}
header.setVisible(false);
add.setVisible(false);
logger.info("onClick -> before post event");
if (getLabel() == null || getLabel().trim().length() == 0) {
**Events.postEvent(new Event(ON_EDIT_NEW_HEADER, this));**
}
logger.info("onClick -> after post event");
// Make the hbox and children visible
editor.setVisible(true);
// Set the textbox to have the current value of the listheader
combobox.setText(getLabel());
combobox.focus();
combobox.select();
}
@Listen("onEditNewHeader=dqlistheader")
public void onEditNewDQHeader(Event event) {
// Create a new empty column the user can use to create another new column if desired.
logger.info("Inside onEditNewDQHeader --- append header");
int order = header.getChildren().size();
ReportColumn column = new ReportColumn(reportType, order);
header.appendChild(new DQListHeader(column));
header.invalidate();
}
有什麼建議嗎?