是否有可能以某种方式在 ap:selectManyCheckbox 的 selectItems 之间显示一个 h:inputText?
我想要的是:
- 复选框1
- 复选框2
- inputTextIfCheckbox2IsMarked(如果未标记则禁用..)
- 复选框 3
- 复选框 4
我知道如何启用/禁用复选框等,但在 selectItems 之外。我想把它放在他们之间。
这有可能以某种方式吗?
我的解决方案是(inputText 不在 selectItems 之间):
<h:panelGrid columns="2">
<p:selectManyCheckbox converter="otherAdmissionReasonConverter"
id="otherAdmissionReasonCheckbox"
value="#{potentialDonorFileBackingBean.potentialDonorFile.generalPatientInformation.otherAdmissionReasons}"
layout="grid" columns="1">
<f:selectItems value="#{patientInformationBackingBean.otherAdmissionReasons}"
var="otherAdmissionReason"
itemValue="#{otherAdmissionReason}"
itemLabel="#{msgs['ar.'.concat(otherAdmissionReason)]}"/>
<p:ajax update="customAdmissionReasonGrid"/>
</p:selectManyCheckbox>
<h:panelGroup id="customAdmissionReasonGrid"
styleClass="customAdmissionReason">
<p:inputText id="customAdmissionReason"
disabled="#{!potentialDonorFileBackingBean.potentialDonorFile.generalPatientInformation.otherAdmissionReasonChecked()}"
value="#{potentialDonorFileBackingBean.potentialDonorFile.generalPatientInformation.customAdmissionReason}"/>
</h:panelGroup>
</h:panelGrid>
PrimeFaces:5.2