简体   繁体   English

在xhtml上的JSF / Primefaces内联单元格编辑不起作用

[英]JSF/Primefaces inline cell editing on xhtml doesnt work

was able to have inline edit of each cell under memebername and employee id and not able have a edit on amount field(Note those headers are dynamic was succefully able to show data and column values), couldnot able to have edit enable on amount field, can some one let me know what was issue is. 能够在memebername和employee id下对每个单元格进行内联编辑,并且无法对amount字段进行编辑(注意那些标题是动态的,能够成功显示数据和列值),无法对amount字段进行编辑启用,有人可以让我知道问题是什么。 Thanks for your time. 谢谢你的时间。

<p:dataTable editable="true" editMode="cell"
            var="memberInformation" 
                paginator="true" rows="10"  
                paginatorTemplate="{CurrentPageReport} 
                {FirstPageLink} 
                {PreviousPageLink} 
                {PageLinks}
                {NextPageLink} 
                {LastPageLink} 
                {RowsPerPageDropdown}"  
                rowsPerPageTemplate="5,10,15"
                value="#{listTemplate.listofMembers}">
    <p:ajax event="cellEdit" update="@this" listener="#{listTemplate.onCellEdit}"/> 
    <p:column headerText="Name">  
        <h:outputText  value="#{memberInformation.memeberName}" />  
    </p:column>  
    <p:column headerText="EmployeeId">  
        <h:outputText style="cursor:pointer;padding:15px;" value="#{memberInformation.empId}" />  
    </p:column>  
    <p:columns value="#{listTemplate.columnNamesList}" var="column" columnIndexVar="colIndex">  
        <f:facet name="header"> 
          <h:outputText style="cursor:pointer;padding:15px;" value="#{column.columnName}" />      
        </f:facet>
         <p:cellEditor>  
           <f:facet name="output"><h:outputText value="#{memberInformation.amount}" /></f:facet>  
           <f:facet name="input"><p:inputText value="#{memberInformation.amount}"/></f:facet>  
       </p:cellEditor>  
    </p:columns> 
</p:dataTable>

Dynamic columns cannot be editable. 动态列无法编辑。

it is said in the User Guide v3.5 : DataTable -> Dynamic Columns (page 139) "Features like sortBy and filterBy are supported however advanced features like editing is not." 在用户指南v3.5中说:DataTable - >动态列(第139页)“支持sortBy和filterBy等功能,但不支持编辑等高级功能。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM