chetan
chetan

Reputation: 3255

selectBooleanCheckbox in icefaces

<ice:column style="width: 30px;">
                    <f:facet name="header">
                        <ice:selectBooleanCheckbox
                            value="#{createToolsOrderInwardsBean.test}" 
                            partialSubmit="true"
                            valueChangeListener="#{createToolsOrderInwardsBean.selectInwardQuantityChk}"
                            id="slc-tlmanage-selectallee"></ice:selectBooleanCheckbox>
                    </f:facet>
                    <ice:selectBooleanCheckbox value="#{currentRow.chkInwardQuantity}"
                        immediate="true" partialSubmit="true" style="margin-left: 10px;"
                        id="slc-tlmanage-enableinput"></ice:selectBooleanCheckbox>
                </ice:column>

I have this code whtin ocefaces datatable.When i select first one than all other checkbox whin that column of datatable will be selected.

below i described a valuchage method

 public void selectInwardQuantityChk(ValueChangeEvent evt){
        if(evt != null){
            Boolean value =(Boolean)evt.getNewValue();
            if(test)
                for(int i=0;i<this.toolsOrderVO.getToolsOrderItemVOList().size();i++){
                    this.toolsOrderVO.getToolsOrderItemVOList().get(i).setChkInwardQuantity(value);
                    System.out.println("int the for loop for changing value ============>"+this.toolsOrderVO.getToolsOrderItemVOList().get(i).getChkInwardQuantity());
                }

        }
    }

method called and even checkbox value can't change.

Upvotes: 0

Views: 7227

Answers (1)

billygoat
billygoat

Reputation: 21984

There were considerable typos in your question, So my understanding of your problem could be patchy. If I understand your problem correctly, then it can be solved easily.

Add this line to your event handler.(At the start of the method)

if (!evt.getPhaseId().equals(PhaseId.INVOKE_APPLICATION)) {
            evt.setPhaseId(PhaseId.INVOKE_APPLICATION);
            evt.queue();
            return;
        }

Upvotes: 1

Related Questions