voyent
ice:selectBooleanCheckbox valueChangeListener not getting called  XML
Forum Index -> Components
Author Message
lindabaja

Joined: 10/Sep/2008 00:00:00
Messages: 7
Offline


Hi,
I am implementing a selectBooleanCheckbox and it has a valueChangeListener but the listener is not getting called at all.

Please let me know what I am doing wrong. Code attached:

JSP:
Code:
 <ice:dataTable id="compareElementsResultsTbl" 	var="row" value="#{compareElementDialogMB.rows}" 	rows="25"				style="width: 100%; ">
 

Code:
 
 					<ice:column id="col0" value="1" style="width: 20%;">
 

Code:
 <ice:selectBooleanCheckbox id="checkBoxCellBoolean0" valueChangeListener="#{compareElementDialogMB.disableOrEnableOtherCheckBoxes }" value="#{row.column[0].checked}" title="#{row.column[0].longName}" rendered="true">
 							
 .....
 
 						</ice:selectBooleanCheckbox>
                		</ice:column>

.......
</ice:dataTable>

BackinbgBean:

public void disableOrEnableOtherCheckBoxes(ValueChangeEvent event) {
System.out.println("Called");
}
[/code]
lindabaja

Joined: 10/Sep/2008 00:00:00
Messages: 7
Offline


Sorry. Figured it out. I did not have partialSubmit="true" Added it and it works

Thanks
Karthik
anand143

Joined: 16/Feb/2016 00:53:52
Messages: 1
Offline


<ice:column rendered="#{InwardForwardSeedLicence.aosrcselect}">
<f:facet name="header">
<ice:outputLabel value="Select Box"/>
<ice:selectBooleanCheckbox value="#{InwardForwardSeedLicence.exiztnot}" partialSubmit="true" immediate="true" required="#{InwardForwardSeedLicence.aosrcselect}"
valueChangeListener="#{InwardForwardSeedLicence.existNoti}">
</ice:selectBooleanCheckbox>
</f:facet>

</ice:column>

above code is mine jsf



public void existNoti(ValueChangeEvent event) {
List templist = new ArrayList();
CropDetailsVO cdtlsVo=null;
System.out.println("event:::"+event);
boolean status=(Boolean)event.getNewValue();
System.out.println("status:::"+status);
if(status!=false){
if(event.getNewValue()!=null){
System.out.println("entered existNoti in if block");
exiztnot=true;
System.out.println("entered in existNoti if block:::::::"+exiztnot);

for (int i = 0; i < oldNotifiedList.size(); i++) {
cdtlsVo = (CropDetailsVO) oldNotifiedList.get(i);
cdtlsVo.setAosrcCropDtls(cdtlsVo.getCropVariety());
templist.add(cdtlsVo);
System.out.println("templist:::"+templist.size());
}

oldNotifiedList.clear();
System.out.println("oldNotifiedList::"+oldNotifiedList.size());
oldNotifiedList = templist;
System.out.println("oldNotifiedList::"+oldNotifiedList.size());
}
}
else{
System.out.println("entered existNoti in else block");
if(status!=false){
exiztnot=false;
status=false;
System.out.println("status::"+status);
if(event.getNewValue()!=null)
//status=false;
for (int i = 0; i < oldNotifiedList.size(); i++) {
cdtlsVo = (CropDetailsVO) oldNotifiedList.get(i);
cdtlsVo.setAosrcCropDtls(null); //System.out.println("before in elsetemplist:::"+templist.size());
templist.add(cdtlsVo);
}

}
oldNotifiedList.clear();
System.out.println("oldNotifiedList::"+oldNotifiedList.size());
oldNotifiedList = templist;

}


the is java code ..
while i am running the code ..its entering into else loop after and column all making it empty is there i need to change..


LaxVino

Joined: 15/Sep/2020 01:20:57
Messages: 4
Offline


I am also facing similar issue. Someone please share your idea to fix this issue.
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team