bjs:form issue

Hi,

I have a problem with bjs:form and bjs:selectOneRadio, when the radio is embeded in the form the valueChangeListener for the radio isn't triggered when the user clicks the options for the radio.

here is a simple code example:
for the .jsp

   <body onload="bpc.boot()">

    <bjs:application skin="system">
      <bjs:form>
                <bjs:selectOneRadio id="radio" value="#{index.optionB}" valueChangeListener="#{index.radioSelected}"
                binding="#{index.radio}">

                        <f:selectItem itemValue="S" itemLabel="Si"/>
                        <f:selectItem itemValue="N" itemLabel="No"/>   
                </bjs:selectOneRadio>
               
                <bjs:selectBooleanCheckbox id="check" value="#{index.checkB}" valueChangeListener="#{index.checkSelected}"
                binding="#{index.check}">
</bjs:selectBooleanCheckbox>
      </bjs:form>
    </bjs:application>
  </body>

the code in the backingBean:

public class Index {

        UIBackbaseSelectOneRadio radio;
       
        UIBackbaseSelectBooleanCheckbox check;
       
        private boolean checkB = false;
       
        private String optionB = null;

        public UIBackbaseSelectBooleanCheckbox getCheck() {
                return check;
        }

        public void setCheck(UIBackbaseSelectBooleanCheckbox check) {
                this.check = check;
        }

        public boolean isCheckB() {
                return checkB;
        }

        public void setCheckB(boolean checkB) {
                this.checkB = checkB;
        }

        public String getOptionB() {
                return optionB;
        }

        public void setOptionB(String optionB) {
                this.optionB = optionB;
        }

        public UIBackbaseSelectOneRadio getRadio() {
                return radio;
        }

        public void setRadio(UIBackbaseSelectOneRadio radio) {
                this.radio = radio;
        }
       
        public void checkSelected(ValueChangeEvent event){
                        System.out.println("check");
                        System.out.println(optionB);
                        optionB=null;
        }
        public void radioSelected(ValueChangeEvent event){
                        System.out.println("radio");
                        if(checkB){
                                System.out.println("verdad");
                        }else{
                                System.out.println("mentira");
                        }
                        checkB=false;
        }
}

The expected behaviors are:
a. if the user clicks the radio, then the check must be deselected.
b. if the user clicks the check (checking or uncheking the control), then the radio must be deselected (that's why the value is set to null).

As I mentioned before the valueChangeListener isn't triggered if the radio is placed inside a form, but if the form is removed the control behaves like it should.

Is there any patch or way to fix this problem? or am I doing something wrong?

Best regards,

Abraham Milano

Hi, I just want to know if

Hi,

I just want to know if someone from backbase is checking any possible workaround or solution to this issue...

thanks...

Hi Abraham, I can confirm

Hi Abraham,

I can confirm that this is a bug on the Backbase 3.x line. Fortunately this has now been fixed on the backbase JSF 4.x releases. The only workaround to get the radio and checkboxes deselected is by removing the <bjs:form/ > tag.

-Senaka