rich:comboBox - only first one is working
shadee Mar 3, 2009 10:18 AMI have form with multiple comboBoxes:
<td class="centerColumn"> <rich:comboBox id="cbLabel" defaultLabel="#{msg['quicksearch.make.all']}" value="#{qsearch.label}" enableManualInput="false"> <a4j:support event="onselect" reRender="cbModelgroup, modelgroupBackButton, labelBackButton, count" ajaxSingle="true" /> <f:selectItems value="#{qsearch.labels}" /> </rich:comboBox> </td> ... <td class="centerColumn"> <rich:comboBox id="cbModelgroup" defaultLabel="#{msg['quicksearch.modelgroup.all']}" value="#{qsearch.modelgroup}" enableManualInput="false"> <a4j:support event="onselect" reRender="cbModel, modelgroupBackButton, modelBackButton, count" ajaxSingle="true" /> <f:selectItems value="#{qsearch.modelgroups}" /> </rich:comboBox> </td>
Problem is: when I choose something on first one, current value is updated, but when I choose something on 2nd, it's not.
Both of them use standar getters/setters + log message on set. Here is log for both:
15:54:59,484 DEBUG [RendererBase] Start decoding of component j_id47:cbLabel with class org.richfaces.component.html.HtmlComboBox 15:54:59,484 DEBUG [AjaxPhaseListener] Process after phase APPLY_REQUEST_VALUES 2 15:54:59,484 DEBUG [RequestLoggingPhaseListener] Entering JSF Phase: PROCESS_VALIDATIONS 3 15:54:59,484 DEBUG [AjaxPhaseListener] Process before phase PROCESS_VALIDATIONS 3 15:54:59,484 DEBUG [FlowLifecycle] Processing validators 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' in Spring ApplicationContext 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' via original VariableResolver 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Successfully resolved variable 'qsearch' via original VariableResolver 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' in Spring ApplicationContext 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' via original VariableResolver 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Successfully resolved variable 'qsearch' via original VariableResolver 15:54:59,484 DEBUG [AjaxPhaseListener] Process after phase PROCESS_VALIDATIONS 3 15:54:59,484 DEBUG [RequestLoggingPhaseListener] Entering JSF Phase: UPDATE_MODEL_VALUES 4 15:54:59,484 DEBUG [AjaxPhaseListener] Process before phase UPDATE_MODEL_VALUES 4 15:54:59,484 DEBUG [FlowLifecycle] Processing model updates 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' in Spring ApplicationContext 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' via original VariableResolver 15:54:59,484 DEBUG [SpringBeanWebFlowVariableResolver] Successfully resolved variable 'qsearch' via original VariableResolver 15:54:59,484 DEBUG [QuickSearch] @@@ setting label to: Aston Martin 15:54:59,500 DEBUG [AjaxPhaseListener] Process after phase UPDATE_MODEL_VALUES 4 15:54:59,500 DEBUG [RequestLoggingPhaseListener] Entering JSF Phase: INVOKE_APPLICATION 5 15:54:59,500 DEBUG [AjaxPhaseListener] Process before phase INVOKE_APPLICATION 5 15:54:59,500 DEBUG [FlowLifecycle] Processing application 15:54:59,500 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' in Spring ApplicationContext 15:54:59,500 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' via original VariableResolver 15:54:59,500 DEBUG [SpringBeanWebFlowVariableResolver] Successfully resolved variable 'qsearch' via original VariableResolver 15:54:59,500 DEBUG [FlowActionListener] No action event detected 15:54:59,500 DEBUG [AjaxPhaseListener] Process after phase INVOKE_APPLICATION 5 15:54:59,500 DEBUG [ViewState] Rendering + [JSFView = '/WEB-INF/flows/main/quicksearch.xhtml'] ... 15:56:29,921 DEBUG [RendererBase] Start decoding of component j_id47:cbModelgroup with class org.richfaces.component.html.HtmlComboBox 15:56:29,921 DEBUG [AjaxPhaseListener] Process after phase APPLY_REQUEST_VALUES 2 15:56:29,921 DEBUG [RequestLoggingPhaseListener] Entering JSF Phase: PROCESS_VALIDATIONS 3 15:56:29,921 DEBUG [AjaxPhaseListener] Process before phase PROCESS_VALIDATIONS 3 15:56:29,921 DEBUG [FlowLifecycle] Processing validators 15:56:29,921 DEBUG [AjaxPhaseListener] Process after phase PROCESS_VALIDATIONS 3 15:56:29,921 DEBUG [RequestLoggingPhaseListener] Entering JSF Phase: UPDATE_MODEL_VALUES 4 15:56:29,921 DEBUG [AjaxPhaseListener] Process before phase UPDATE_MODEL_VALUES 4 15:56:29,921 DEBUG [FlowLifecycle] Processing model updates 15:56:29,921 DEBUG [AjaxPhaseListener] Process after phase UPDATE_MODEL_VALUES 4 15:56:29,921 DEBUG [RequestLoggingPhaseListener] Entering JSF Phase: INVOKE_APPLICATION 5 15:56:29,921 DEBUG [AjaxPhaseListener] Process before phase INVOKE_APPLICATION 5 15:56:29,921 DEBUG [FlowLifecycle] Processing application 15:56:29,921 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' in Spring ApplicationContext 15:56:29,921 DEBUG [SpringBeanWebFlowVariableResolver] Attempting to resolve variable 'qsearch' via original VariableResolver 15:56:29,921 DEBUG [SpringBeanWebFlowVariableResolver] Successfully resolved variable 'qsearch' via original VariableResolver 15:56:29,921 DEBUG [FlowActionListener] No action event detected 15:56:29,921 DEBUG [AjaxPhaseListener] Process after phase INVOKE_APPLICATION 5 15:56:29,921 DEBUG [ViewState] Rendering + [JSFView = '/WEB-INF/flows/main/quicksearch.xhtml']
I spent some time on it, but can't find any mistake. I got almost same form working on other page, I've compared them and still can't figure it out. Maybe you could tell me if I'm missing somehting.