PrimefacesExtensions单元格编辑上的工作表组件抛出方法未找到异常

时间:2018-05-16 05:42:01

标签: jsf primefaces primefaces-extensions

尝试编辑单元格时,抛出方法未找到异常。我尝试使用ajaxBehaviourEvent,但它正在抛出ClassCastException:无法将工作表强制转换为工作表

//view     
<p:ajax  listener="#{dataListView.cellEditEvent}"  process=":form:sheet" update=":form:sheet" >
</p:ajax>

// method 
public void cellEditEvent(SheetEvent event) {

    org.primefaces.extensions.component.sheet.Sheet sheet =  event.getSheet();
    List<SheetUpdate> updates = sheet.getUpdates();
    HashSet<Sample> processed = new HashSet<Sample>();
    int rowUpdates = 0;
    for (SheetUpdate update : updates) {
        Sample asset = (Sample) update.getRowData();
        if (processed.contains(asset))
            continue;
        entityManager.merge(asset);
        System.out.println("Asset " + asset.getEmail() + " updated.");
        rowUpdates++;
        showSampleData();
    }
    sheet.commitUpdates();
}

使用PrimeFaces 6.2和PrimeFacesExtension 6.2.3和Seam 2.3

0 个答案:

没有答案