Primefaces 如何在selectoneradio中为selectitem添加工具提示
在对每个项目进行鼠标悬停时,我想为Primefaces 如何在selectoneradio中为selectitem添加工具提示,primefaces,jsf-2.2,Primefaces,Jsf 2.2,在对每个项目进行鼠标悬停时,我想为selectitem添加工具提示 这是我的密码 <h:selectOneRadio id="class" styleClass="bold" rendered="# {bean.campusObject.campus=='C'}" value="#{bean.type}"> <f:selectItem itemLabel=" Dept " itemValue="1" /> <f:selectItem itemLabe
selectitem
添加工具提示
这是我的密码
<h:selectOneRadio id="class" styleClass="bold" rendered="# {bean.campusObject.campus=='C'}" value="#{bean.type}">
<f:selectItem itemLabel=" Dept " itemValue="1" />
<f:selectItem itemLabel="Course " itemValue="2" />
<f:selectItem itemLabel="Course with Dept" itemValue="3" />
<f:selectItem itemLabel="Specialization" itemValue="4" itemDisabled="#{!bean.level.equals('PG')}"/>
<f:ajax render="cours" ></f:ajax>
</h:selectOneRadio>
您可以通过实现selectOneRadio组件的自定义布局来完成此操作,如下所示:
<p:selectOneRadio id="radioGroup" layout="custom"
value="#{bean.radioValue}" disabled="#{bean.disabled}">
<f:selectItems value="#{bean.radioItems}" var="r"
itemLabel="#{r.label}" itemValue="#{r}" />
<p:ajax />
</p:selectOneRadio>
<h:panelGrid columns="2" styleClass="radioLayout">
<c:forEach var="r" items="#{bean.radioItems}" varStatus="status">
<p:radioButton for="radioGroup" disabled="#{bean.disabled}"
itemIndex="#{status.index}" id="radio${r.id}" />
<h:panelGroup>
<p:outputLabel value="#{r.label}" title="Your tooltip" />
</h:panelGroup>
</c:forEach>
</h:panelGrid>
您是否在示例站点中尝试了类似的方法?这是否回答了您的问题?