Datatable selected-items and selectionMode dont work
Hello, i have the problem that if i add these options to my datatable nothing changes. Even if i delete the option select="true" i can still select multiple rows.
I wanted to be able to select one cell, but like i said no of this options work and i dont seem to find a solution.
<b:dataTable id="dtable" row-group="1" select="true" selected-items='cell' selectionMode='single' value="#{adminWorkerManagementView.worker}" var="worker">
<b:dataTableColumn value="#{worker.name}" label="Worker" orderable="false"/>
<b:dataTableColumn value="#{worker.job}" label="Job" orderable="false" header-style-class="hidden" content-style-class="hidden"/>
<c:forEach var="day" items="#{scheduleView.day_array}">
<b:dataTableColumn value="#{worker.schedule[day]}" label="#{day.dayOfMonth}" orderable="false"/>
</c:forEach>
<b:dataTableColumn label="Option">
<b:commandButton value="Delete" iconAwesome="trash"
action="#{adminWorkerManagementView.delete(worker)}">
<f:ajax execute="@this" render="@form" />
</b:commandButton>
</b:dataTableColumn>
</b:dataTable>
Same error in https://github.com/TheCoder4eu/BootsFaces-OSP/issues/1063
Hello, further i have an error where i try to call a method from onselect="bean.methoder(worker,indexes)" but both values are always null. And trying with "ajax:...." only resets the page but method wont be called.
Maybe i am overseeing something.
Thanks in advance!
Well i have the same problem. It seems to be that error is caused by the orderable attribute on the column. Such an attribute need a creation of the column defs in json. At the end of the function there will be add the select option. It seems to be a bug. https://github.com/TheCoder4eu/BootsFaces-OSP/blob/ed9d37df613b4ac40b53bc9ffd265cd55fd98df5/src/main/java/net/bootsfaces/component/dataTable/DataTableRenderer.java#L801
PS: Well in the short term you can fix this by using 1.4.0. A new feature of issue #1038 causes the bug which was introduced in 1.4.1.
Are there any plans to fix this?
I'm afraid development of BootsFaces has slowed down considerably. We'll never manage to address this issue. Let's close it.