简体   繁体   中英

update rich:datatable when rich:inputNumberSlider value change

my interface is like in the picture

在此处输入图片说明

I want the value of the réduction field changes when the value of the inputNumberSlider changes.

<rich:inputNumberSlider id="slider"
    rendered="#{bean.showReductionForm}"
    value="#{bean.reduction}" 
    showArrows="true" 
    width="220"/>
<a4j:support event="onchange" reRender="datatableId"
    ajaxSingle="true"
    actionListener="#{bean.appRed}" /> 

any help plz

You should put a4j:support as a child of rich:inputNumberSlider in order to make it work.

Also for performance and usability reasons I would consider using ignoreDupResponses and requestDelay attributes ( Documentation ):

<rich:inputNumberSlider id="slider"
    rendered="#{bean.showReductionForm}"
    value="#{bean.reduction}" 
    showArrows="true"
    width="220">

    <a4j:support event="onchange" reRender="datatableId"
        ajaxSingle="true"
        actionListener="#{bean.appRed}"
        ignoreDupResponses="true"
        requestDelay="300"/> 

</rich:inputNumberSlider>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM