selection of checkboxes in datatable

hello,

i have datatable with some columns (the last one is a checkbox).

<h:dataTable>

<h:column>

<h:outputText value="Column 1" />

</h:column>

<h:column>

<h:outputText value="Column 2" />

</h:column>

<h:column>

<h:selectBooleanCheckbox valueChangeListener="#{queryBean.valueChange}">

</h:selectBooleanCheckbox>

</h:column>

</h:dataTable>

<h:commandButton id="button" action="#{myBean.select}" value="Select"/>

now i choose one of checkboxes and click on "Select"-button

in my bean i firstly fetch which column is selected and the go on :

publicvoid valueChange(ValueChangeEvent e){

//find out which column was selected

}

public String select(){

//go on with selected column

returnnull;

}

all goes well, but the problem is that the selected checkboxes become unselected after clicking select-button.

so if e.g. one gets an error, user should choose once again an his former selection isn磘 shown anymore.

Is there any possibility that selection of checkboxes remain?

[1691 byte] By [naekoa] at [2007-11-27 3:47:59]
# 1
Add a valuebinding to store the value in the DTO. Also see http://balusc.xs4all.nl/srv/dev-jep-dat.htmlBy the way, for selectBooleanCheckbox selections in the datatable you don't need the VCE. Also see the article.
BalusCa at 2007-7-12 8:51:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...