Madhav Bhargava schrieb:
> Hi All,
> 
>  
> 
> I was under the impression that Value change listeners will be called
> only when there is no validation exception on the page. However on my
> page if there is a validation failure and a message is displayed to the
> user. Now if the user changes a value say in a drop down and a value
> change listener is attached to it then it gets called.
> 
>  
> 
> Following is the code for the drop down:
> 
>  
> 
> <t:panelGrid columns="2">
> 
>                 <s:selectOneRow id="radioLayerOne" groupName="selection"
> 
>                                 value="#{ppmdController.selectedRow}"
> 
>                                
> disabled="#{ppmdController.selectedValue  ||
> benefitController.disableScreenElements ||
> templateOverviewController.disableScreenElements }"
> 
>                                
> valueChangeListener="#{ppmdController.checkForErrors}">
> 
>                                 <f:selectItem itemValue="ABC"
> itemLabel="" id="rad"></f:selectItem>
> 
>                                 <a4j:support event="onclick" id="ajaxOne"
> 
>                                                
> reRender="Rx_Quantity,id_minQty,id_minDaySupply,Days_Supply,id_strtrDose,id_strtrDoseBypassDays,id_strtrDoseMaintBypassDays,id_maxRetailDays,txtNoMoreThanFills,menuAlwdPerOptn,calStrtDate,chkboxDeductible,chkboxOutOfPkt,chkboxMaxBft,menuMailSrvc,id_CmpQty,selectedProvider,selectedNetwork,selectedClaims,myPpmdfloater"
> 
>                                                
> actionListener="#{ppmdController.fetchLayerTwo}"
> 
>                                                
> oncomplete="Richfaces.hideModalPanel('ajaxLoadingModalBox');enableMaxRxQtyDysSplyPPMD();">
> 
>                                 </a4j:support>
> 
>                 </s:selectOneRow>
> 
> </t:panelGrid>
> 
>  
> 
> Should the value change listener be called when there is a validation
> exception?
> 


The spec is clear that a ValueChangeEvent should only occur if
validation passes. I've got a copy of the JSF2.0 early draft handy, and
in section 3.2.6.3:

<quote>
EditableValueHolder is a source of ValueChangeEvent events, which are
emitted when the validate() processing of the Process Validations phase
of the request processing lifecycle determines that the previous value
of this component differs from the current value, and all validation
checks have passed (i.e. the valid property of this component is still
true).
</quote>

However before you report a bug, please check whether this still happens
in a plain MyFaces environment. I see you are using tomahawk + sandbox +
a4j all together here, which is a complex combination.

And when you have questions, you should always specify what version of
MyFaces and what version of Java you are using. Neither of those
critical pieces of information are in your original email.

Regards,
Simon
-- 
-- Emails in "mixed" posting style will be ignored
-- (http://en.wikipedia.org/wiki/Posting_style)

Reply via email to