Urgent | Synchronizing UI 2 Bean | selectBooleanCheckbox inside a scrollabledatatable
uwe72 Nov 29, 2011 11:51 AMHi there,
i have actually a very simple problem.
I have a table, with one column, representing a boolean-attribute of my bean.
This is my bean:
----------------------------------------------------------------------------------------------------------------------------------------------
@Entity
@Table(name = "UTILITY")
public class Utility implements Serializable {
...
@Column(name = "SEND_CHANNEL", unique = false, nullable = false, insertable = true, updatable = true)
private boolean sendChannel;
public boolean isSendChannel() {
return sendChannel;
}
public void setSendChannel(final boolean sendChannel) {
this.sendChannel = sendChannel;
}
...
}
----------------------------------------------------------------------------------------------------------------------------------------------
The table is showing a list of this Utility instances. The column is representing the sendChannel-attribute.
The initial shown values are correct. But when the user changes a value by clicking on the checkbox, the new value in the UI is not synchronizing the value in the bean.
What i am doing wrong, has anybody a example.
Thanks a lot in advance!!!!!!!
Uwe
----------------------------------------------------------------------------------------------------------------------------------------------
<h:panelGroup>
<rich:scrollableDataTable
value="#{actionEditController.model.utilitySelections}"
selection="#{actionEditController.utilitiesTableHandler.selection}"
binding="#{actionEditController.utilitiesTableHandler.table}"
height="200px" columnClasses="tableFormOutputTD"
id="detailTableUtilities" rowClasses="colorBlank, colorLight"
activeClass="rich-sdt-cell-active" frozenColCount="0"
selectionMode="#{actionEditController.utilitiesTableHandler.selectionMode}"
sortMode="single" enableContextMenu="false" var="utility">
<f:facet name="header">
<div class="captionHeader">
<h2 class="captionHeaderHeadline"><span
class="captionHeaderInner">Zuordnungen</span></h2>
</div>
</f:facet>
<rich:column id="name2" label="#{msg.utilityName}" width="150px"
sortable="true">
<f:facet name="header">
<h:outputText value="#{msg.utilityName}" />
</f:facet>
<h:selectBooleanCheckbox id="checkAll"
value="#{utility.sendChannel}" title="#{msg.utilityName}">
<a4j:support
action="#{actionEditController.checkboxClicked}"
event="onchange" reRender="detailTableUtilities">
</a4j:support>
</h:selectBooleanCheckbox>
</rich:column>
...
----------------------------------------------------------------------------------------------------------------------------------------------