所以我有 p:commpandButton 在 ajax 上加载 p:datatable 参见图片一。我希望 p:datatable 默认处于可编辑模式(加载时)参见图二
图一:
图二:
这是 p:datatable :
<ui:composition template="/template/mastertemplate.xhtml">
<ui:define name="content">
<h:form styleClass="form" prependId="false">
<p:panel id="analysisTheBudgetPenel" header="Analysis The Budget">
<p:tabView id="scenarioTabViewId" style="width:850px">
<p:tab title="Scenario One" id="scen">
<h:selectBooleanCheckbox id="isApprovedBooleanId_checkBox" value="#{budgetAnalysisAction.budgetScenarioHescoProposalBean.abc}" />
<p:scrollPanel style="width:800px; height:auto;">
<p:dataTable id="budgetAnalysisDataTableId" rowIndexVar="index" editable="true" resizableColumns="true" value="#{budgetAnalysisAction.budgetScenarioHescoProposalBean.budgetScenarioHescoProposalListBean}" var="budgetScenarioHescoProposalList">
<p:ajax event="rowEdit" process="#{scenarioTabViewId:isApprovedBooleanId_checkBox}" listener="#{budgetAnalysisAction.testAjax}" />
// some columns
// closing tags of above