thekingtn
thekingtn

Reputation: 75

update rich:datatable when rich:inputNumberSlider value change

my interface is like in the picture

enter image description here

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

Upvotes: 0

Views: 257

Answers (1)

Andrey
Andrey

Reputation: 6766

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>

Upvotes: 1

Related Questions