1

The following inputNumberSlider does not call my setter:

<rich:inputNumberSlider 
         value="#{skinningBean.currentSkin.button.backgroundColor_focussedAlpha}"
         maxValue="1" step="0.1">
         <a4j:ajax event="change" render="preview" oncomplete="initSlider()" />
</rich:inputNumberSlider>


public float getBackgroundColor_focussedAlpha() {
    return backgroundColor_focussedAlpha;
}

public void setBackgroundColor_focussedAlpha(float backgroundColor_focussedAlpha) {
    this.backgroundColor_focussedAlpha = backgroundColor_focussedAlpha;
}

I also tried to make a setter which takes a String as parameter, but it's not called as well. Ans yes it is inside a form! What am I doing wrong?

Edit: Seems I'm not the only one with this problem: http://osdir.com/ml/java-jsf-richfaces-issues/2010-10/msg00073.html

4ndro1d
  • 2,926
  • 7
  • 35
  • 65

1 Answers1

0

It is probably caused by your bean's scope.

I've found that if it's anything from the javax.faces.bean package the components aren't working, but it will work with the javax.enterprise.context package. The scopes are named the same except for javax.faces.bean.@ViewScoped which you can change to javax.enterprise.context.@ConversationScoped

Makhiel
  • 3,874
  • 1
  • 15
  • 21