selectbooleancheckbox

Ajax render not working on SelectBooleanCheckbox

£可爱£侵袭症+ 提交于 2019-11-28 11:04:32
问题 I have a JSF form and on which I have a selectBooleanCheckbox. If the value of the checkbox is true I want to display the combo box next to it. But somehow it is not working. Here is my code: <h:outputText value="Condition"/> <h:selectBooleanCheckbox id="provisioningTargetCollector" value="#{targetSource.provisioningTargetCollector}" disabled="#{!sp:hasRight(facesContext, 'ManageApplication')}" readonly="#{!sp:hasRight(facesContext, 'ManageApplication')}"> <f:ajax render=

How to select multiple rows of <h:dataTable> with <h:selectBooleanCheckbox>

社会主义新天地 提交于 2019-11-28 05:51:37
问题 I use <h:dataTable> to list data from database. We have many records in page, now I would like to select multiple records with a checkbox in each row. How can I achieve this? 回答1: I assume that your entity is that well-designed that it has an unique technical identifier, for example the auto increment sequence from the DB. public class Entity { private Long id; // ... } If not, you'll need to add it. Then, add a Map<Long, Boolean> property to the bean which is tied to the table. private Map

How to use <h:selectBooleanCheckbox> in <h:dataTable> or <ui:repeat> to select multiple items?

亡梦爱人 提交于 2019-11-26 08:23:45
I have a Facelets page with a <h:dataTable> . In each row there is a <h:selectBooleanCheckbox> . If the checkbox is selected the object behind the corresponding row should be set in the bean. How do I do this? How to get the selected rows or their data in a backing bean? Or would it be better to do it with <h:selectManyCheckbox> ? Your best bet is to bind the h:selectBooleanCheckbox value with a Map<RowId, Boolean> property where RowId represents the type of the row identifier. Let's take an example that you've a Item object whose identifier property id is a Long : <h:dataTable value="#{bean