我有一个客户创建了一个 Oracle ADF/JSF 1.1 应用程序。在其中一个页面上,他们有一个表格,其中第一列作为启用的互斥单选按钮。我不得不增强页面并添加带有禁用单选按钮的总行。如何在不使用 JavaScript 的情况下在 Bean 类或页面上禁用它?我试图做类似的事情:
<af:tableSelectOne id="slctone" disabled="true"/>
但这会禁用所有按钮。我尝试将代码如下所示,但这会在第二列禁用指向下一页的链接:
TcpiVO t= (TcpiVO) JSFUtils.getManagedBeanValue("row");
if(t.getLabel().contains("TOTALS")){
return false;
}
这是代码片段:
<f:facet name="selection">
<af:tableSelectOne id="slctone" />
</f:facet>
<af:column sortable="false" headerText="#{tcWizard.partsHeaderLabel}" width="325" >
<af:commandLink text="#{row.label}" action="#{tcWizard.retrieveDrillDownList}" actionListener="#{tcWizard.nextDrillDownElement}"
rendered="#{tcWizard.continueDrill }" id="drlLnk" />
<af:outputText value="#{row.label}" rendered="#{!tcWizard.continueDrill }" />
</af:column>
<af:column sortable="false" headerText="#{msg.SALES}" styleClass="bordersBottomGrey" width="80">
<af:outputText value="#{row.sales}"/>
</af:column>