我有 dataTable 的复合组件,我想在其中添加 ajax event="rowToggle"。我尝试了以下选项:
<cc:interface>
<cc:attribute name="rows" />
<cc:attribute name="value"
type="org.primefaces.model.LazyDataModel" />
<cc:attribute name="var" />
<cc:attribute name="id" />
<cc:attribute name="rowStyle" required="false"/>
<cc:attribute name="ajaxEvent" required="false" />
</cc:interface>
<cc:implementation>
<p:dataTable value="#{cc.attrs.value}"
rendered="#{not empty cc.attrs.value}" id="#{cc.attrs.id}"
paginator="true" rows="25"
currentPageReportTemplate="Showing {startRecord}-{endRecord} of {totalRecords}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="25,50,100" paginatorPosition="bottom"
lazy="true" rowStyleClass="#{cc.attrs.rowStyle}">
<p:ajax event="#{cc.attrs.ajaxEvent}" global="false" />
<c:set target="#{component}" property="var" value="#{cc.attrs.var}"/>
<cc:insertChildren />
</p:dataTable>
</cc:implementation>
在主页上,我打电话给:
<t:lazydatatable var="changeSummary"
value="#{changeLogInspectorBean.changeLogInsertModel}" rows="25"
id="change_overview_insert" ajaxEvent="rowToggle">
它失败并显示以下错误消息:
<p:ajax> Event:#{cc.attrs.ajaxEvent} is not supported.
你能建议我在这里做错了什么吗?