myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus B├╝ttner>
Subject Problem using input elements in a datatable
Date Tue, 06 Jul 2010 11:27:08 GMT

I have a problem with input elements in an UIData (e.g. datatable).

Example code:

<h:dataTable value="#{myBean.valueList}" var="val">
   <h:outputText value="#{val.description}"/>
    <h:selectBooleanCheckbox id="flag" value="#{val.flag}"/>

I want to fetch the values of the selectBooleanCheckbox in the second 
column. I've set a breakpoint to setSubmittedValue in UIInput and what 
1.) The components are restored in restore view phase
2.) The DebugPhaseListner does a visitTree wich calls the 
setSubmittedValue for my three checkboxes (3 lines in table) about 17 
times. The visitTree of UIData does a setRowIndex an there the 
restoreDescendantComponentState is called, which restores the State of 
my UIInput (checkbox) again.
3.) Then decode is proccessed. Here the setRowIndex is called again and 
also the restoreState of my checkbox is done. Now the Checkbox is 
decoded and the submittedValue is set correctly.
4.) The DebugPhaseListner does a visitTree in the same way like point 2. 
The problem is it does also the restoreState of my Checkboxes (because 
of setRowIndex and so on) and the submittedValues are lost.

Is there anything I did wrong?

I hope, someone can help.

Regards Marcus

View raw message