<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>我有这个代码,当我在one datatable.When中选择第一个而不是所有其他复选框时,数据表的列将被选中。
下面我描述了一个valuchage方法
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());
}
}
}方法被调用,甚至复选框值也不能更改。
发布于 2011-04-12 14:18:23
你的问题中有相当多的打字错误,所以我对你的问题的理解可能是不完整的。如果我对你的问题理解正确,那么这个问题就可以很容易地解决。
将这一行添加到事件处理程序中。(在方法的开头)
if (!evt.getPhaseId().equals(PhaseId.INVOKE_APPLICATION)) {
evt.setPhaseId(PhaseId.INVOKE_APPLICATION);
evt.queue();
return;
}https://stackoverflow.com/questions/5630999
复制相似问题