我的数据表中有以下内容:
<a4j:commandLink rendered="#{item.Id eq Admin.filteredId}" id="app" action="#{DetailController.adminUpdate}" value="Approve " styleClass="auto-style5" actionListener="#{DetailController.adminPrepareEdit}">
<a4j:param assignTo="#{DetailController.selected.LevelsId}" value="2" />
</a4j:commandLink>
是否可以将其更改为复选框,然后更改值?
问候。
答案 0 :(得分:1)
使用复选框和ajax重新呈现值。见例:
<rich:dataTable id="retailerTable" var="userRetailer">
...
<h:column>
<f:facet name="header">
<a4j:commandButton id="deleteRetailerButton"
value="#{msg.delete}"
action="#{userAction.deleteRetailersFromList}"
type="button"
render="retailerPanel"
rendered="#{not empty user.userRetailers}"
disabled="#{userAction.anyRetailerSelectedForDeleteFromList eq false}"
onclick="if (!confirm('Are you sure you want to remove selected retailers?')) return false" />
</f:facet>
<h:selectBooleanCheckbox id="deleteRetailerCheckBox" value="#{userRetailer.delete}" >
<a4j:ajax event="click" render="retailerTable" />
</h:selectBooleanCheckbox>
</h:column>