Replies
hi,
thanks for your quick replay, as i tried what you suggested but the method
is not calling, here the modified code. And
I have added alert statement with a string “Hello”, alert statement is not
coming up.
this.selectRow=function(domNode,select){
var row=this.getTargetRow(domNode);
if(!ig.isNull(row)){if(select){row.select();}
else{row.unselect();}
var
grid=this.getGrid(domNode);if(!ig.isNull(grid)&&grid.isImmediateRowsChangeEvent()){ig.smartSubmit(grid.elm.id,null,null,
this.customFLT);}}};
this.customFLT=function(){
alert("Hello”);
// alert("Hidden Field = " +
parent.frames.document.getElementById("form1:hiddenField1").value);
var arraystr=
parent.frames.document.getElementById("form1:hiddenField1").value;
// here i am calling applet method pasing the
value of arraystr,
};
Thanks
Dayananda B V
Hi Bozhidar,
thanks for your replay, i am sorry if the information was given is not clear,
1. have JSF page, contains a GridView and a hidden variable
<ui:hiddenField binding="#{gridviewtest.hiddenField1}" id="hiddenField1" immediate="true"/>
<ig:gridView binding="#{gridviewtest.unitsGrid}" dataSource="#{gridviewtest.units}" id="unitsGrid"
pageSize="10" selectedRowsChangeListener="#{gridviewtest.onSelectMethod}" pageChangeListener="#{gridviewtest.onPageSelectUnits}">
<ig:columnSelectRow showSelectAll="true"/>
2. i have java file which is backing bean, where i worte method "onSelectMethod" for row selection listener,
where i am assigning value to hidden variable.
public void onSelectRowUnits(SelectedRowsChangeEvent evt) {
getHiddenField1().setValue("50"); // here i am hard coding the value of 50,
getHiddenField1().setImmediate(true);
SmartRefreshManager srm = SmartRefreshManager.getCurrentInstance();
srm.removeSmartRefreshIds(getHiddenField1().getClientId(FacesContext.getCurrentInstance()));
srm.addSmartRefreshId(getHiddenField1().getClientId(FacesContext.getCurrentInstance()));
}
3. and i have modified some code in igf_grid.js, where i am trying to get the value which is assigned to hidden variable
this.selectRow=function(domNode,select){
var row=this.getTargetRow(domNode);
if(!ig.isNull(row)){if(select){row.select();}
else{row.unselect();}
var grid=this.getGrid(domNode);if(!ig.isNull(grid)&&grid.isImmediateRowsChangeEvent()){ig.smartSubmit(grid.elm.id,null,null);}}this.customFLT()};
this.customFLT=function(){
// alert("Hidden Field = " + parent.frames.document.getElementById("form1:hiddenField1").value);
var arraystr= parent.frames.document.getElementById("form1:hiddenField1").value;
// here i am calling applet method pasing the value of arraystr,
};
my problem is, when i comment alert method in customFLT(in igf_core.js) than arraystr as no value(the value should be 50, which hard coded in on row selection listner), if uncomment alert method than arraystr showing value.
i hope above explanation clear.
Dayananda B V