Infragistics Community Forum / Cross Platform / Ultimate UI for Xamarin / Getting variable value which is set in JSF using javascript in igf_grid.js
Getting variable value which is set in JSF using javascript in igf_grid.js
New DiscussionHi,
i have hidden variable which is update when the row is selected in GridView, and i need this value in java script, we are trying to modify in igf_grid.js
this.selectRow=function(domNode,select){
……
}}this.customFLT()};
in the customFLT() method just i am tring to print value using alert(of javascript) method, which works fine and i am able to see the value i have seleted from GridView, and i have to use this variable to some other method, when i removed the alert method than i am not able to get the selected value. if i add alert method than its works fine. and i have set ” immediate=”true” ” of hiddenvariable in JSF.
please let me know what is causing this problem.
thanks in advance.
dayananda b v
Replies
-
0
HI,
i guess the hidden variable is not updated, and if put alert message i hope it will take some time to display and click ok, so in the mean time the hidden variable getting update. if this is case what could be answer.
-
0
Hi, dayanandabv!
I'm affraid that the information send is not enough for me to reproduce the scenario. I'll try to think of some solution if you provide me with more detailed information, e.g. parts of your source code and also an explanation of what the idea of this hidden variable is.
Regards!
–Bozhidar
-
0
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
-
0
Hi,
smartSubmit is an AJAX method which means it is asynchronous. This presumes it's result is retrieved after some time. Try with ig.smartSubmit(grid.elm.id,null,null, null, this.customFLT). The fifth parameter is a callback function, which is called after getting the data.
Hope this helps!
-
0
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
-
0
sorry, i tried like that only, but the alert 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,
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,};
-
0
Hi Bozhidar,
Thanks for quick replays
sorry i am not getting any "Hello" alert message, i have tried in different
combination. Is it the correct place what i placed the code i.e. “ig.smartSubmit(grid.elm.id,null,null,
null, this.customFLT);}}};” please let me know from end of I have three
bracket,(”}}}”) is that correct,and I have tried like this also,
“ig.smartSubmit(grid.elm.id,null,null); ig.smartSubmit(grid.elm.id,null,null,
null, this.customFLT);}}};”It’ s giving wired behavior, and I have tried like this also
“ig.smartSubmit(grid.elm.id,null,null); }} ig.smartSubmit(grid.elm.id,null,null,
null, this.customFLT);};”It is also giving wired behavior
Thanks
Daynanda B V
-
0
Hi,
this is the code that I added to the igf_grid.js file.
// customer code
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, 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,
};
// customer code END
-
0
Hi Bozhidar,
i am really sorry, the "Hello" alert message is coming, actually
alert message is inside the if condition, and i am checking hidden variable
value for null condition (meaning it as some value or not), but i am getting
the hidden variable value as blank(null value), because if the reason it is not going
inside the if condition. and i have checked in tomcat console, the value for hidden variable i am setting which is showing correctly.alert("Hello");
alert(parent.frames.application_left.document.getElementById("form1:hiddenField1").value);
// here I am not(blank) getting the value.What could be reason for this.
thanks
dayananda B V
-
0
Hi Bozhidar,
actually i have tried printing (alert) the value of hidden variable along with your suggestion, but i am not able to get the value i.e. selected row first column value of GridView, here adding code to this replay, can you please verify what could be reason or what i am doing wrong. i have tried this for almost two three days. can you please help me.
i have filled up GridView some dummy data.
************************************************ JSP Code (User interface, which includes a GridView and hidden variable) ***********************
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ig="http://www.infragistics.com/faces/netadvantage"
xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<ui:page binding="#{Page1.page1}" id="page1">
<ui:html binding="#{Page1.html1}" id="html1">
<ui:head binding="#{Page1.head1}" id="head1">
<ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
</ui:head>
<ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
<ui:form binding="#{Page1.form1}" id="form1">
<ig:gridView binding="#{Page1.floorsGrid}" dataSource="#{Page1.employees}" id="floorsGrid" pageSize="10" selectedRowsChangeListener="#{Page1.onSelectRowFloor}">
<ig:columnSelectRow showSelectAll="true"/>
<ig:column>
<f:facet name="header">
<h:outputText value="Portfolios"/>
</f:facet>
<h:outputText value="#{DATA_ROW.id}"/>
</ig:column>
<ig:column>
<f:facet name="header">
<h:outputText value="Assigned Profiles"/>
</f:facet>
<h:outputText value="#{DATA_ROW.name}"/>
</ig:column>
</ig:gridView>
<ui:hiddenField binding="#{Page1.hiddenField1}" id="hiddenField1" immediate="true"/>
</ui:form>
</ui:body>
</ui:html>
</ui:page>
</f:view>
</jsp:root>************************************************************************ and here is the java code ***********************
import com.infragistics.faces.grid.component.RowItem;
import com.infragistics.faces.grid.component.html.HtmlGridView;
import com.infragistics.faces.grid.event.SelectedRowsChangeEvent;
import com.infragistics.faces.shared.smartrefresh.SmartRefreshManager;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Form;
import com.sun.rave.web.ui.component.Head;
import com.sun.rave.web.ui.component.HiddenField;
import com.sun.rave.web.ui.component.Html;
import com.sun.rave.web.ui.component.Link;
import com.sun.rave.web.ui.component.Page;
import java.util.ArrayList;
import java.util.Iterator;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
import javax.faces.component.html.HtmlInputHidden;
import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;public class Page1 extends AbstractPageBean {
private int __placeholder;
ArrayList<Employee> emp = new ArrayList<Employee>();
private void _init() throws Exception {
}
private Page page1 = new Page();
public Page getPage1() {
return page1;
}
public void setPage1(Page p) {
this.page1 = p;
}
private Html html1 = new Html();
public Html getHtml1() {
return html1;
}
public void setHtml1(Html h) {
this.html1 = h;
}
private Head head1 = new Head();
public Head getHead1() {
return head1;
}
public void setHead1(Head h) {
this.head1 = h;
}
private Link link1 = new Link();
public Link getLink1() {
return link1;
}
public void setLink1(Link l) {
this.link1 = l;
}
private Body body1 = new Body();
public Body getBody1() {
return body1;
}
public void setBody1(Body b) {
this.body1 = b;
}
private Form form1 = new Form();
public Form getForm1() {
return form1;
}
public void setForm1(Form f) {
this.form1 = f;
}
private HtmlGridView floorsGrid = new HtmlGridView();public HtmlGridView getFloorsGrid() {
return floorsGrid;
}public void setFloorsGrid(HtmlGridView hgv) {
this.floorsGrid = hgv;
}
public Page1() {
for(int i=0;i<10;i++){
emp.add(new Employee("daya", i));
}
}
public void init() {
super.init();
try {
_init();
} catch (Exception e) {
log("Page1 Initialization Failure", e);
throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
}
}
public void preprocess() {
}
public void prerender() {
}
public void destroy() {
}
protected SessionBean1 getSessionBean1() {
return (SessionBean1)getBean("SessionBean1");
}
protected RequestBean1 getRequestBean1() {
return (RequestBean1)getBean("RequestBean1");
}
public ArrayList<Employee> getEmployees(){
for(Employee emp1 : emp){
System.out.println("emp1emp1 &&&&&&&&&&&&&&>>> "+emp1.getName());
}
return emp;
}
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1)getBean("ApplicationBean1");
}
public void onSelectRowFloor(SelectedRowsChangeEvent evt) {
String selectedid = "";
if (getFloorsGrid()!=null) {
Iterator selectedRows = getFloorsGrid().getSelectedRows().iterator();
while (selectedRows.hasNext()) {
RowItem rowItem = (RowItem) selectedRows.next();
{
int i = 0;
Iterator iter = (Iterator)rowItem.getCells().iterator();
while(iter.hasNext()) {
UIComponent cell=(UIComponent )iter.next();
Object object=cell.getChildren().get(0);
if(object instanceof UIOutput) {
if(i==0){
String selectedUnit = ((UIOutput)object).getValue().toString();
selectedid = selectedid + selectedUnit;
}
i++;
}
}
}
}
}
getHiddenField1().setValue(selectedid);
SmartRefreshManager srm = SmartRefreshManager.getCurrentInstance();
srm.removeSmartRefreshIds(getHiddenField1().getClientId(FacesContext.getCurrentInstance()));
srm.addSmartRefreshId(getHiddenField1().getClientId(FacesContext.getCurrentInstance()));
getHiddenField1().setImmediate(true);
System.out.println("getHiddenField1—> "+ getHiddenField1().getValue());
}
public class Employee{
private String name="Daya";
private int id;
public Employee(String name, int id){
setId(id);
}
public String getName() {
return "Daya";
}
public void setName(String name) {
this.name ="Daya";
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
private HiddenField hiddenField1 = new HiddenField();
public HiddenField getHiddenField1() {
return hiddenField1;
}
public void setHiddenField1(HiddenField hf) {
this.hiddenField1 = hf;
}
}
*************************************************************************************** and here is the java script code(part of igf_grid.js) ***********if(ig){if(!ig.grid){function IgWebGridPackage(){this.TYPE_GRID="Grid";this.TYPE_GRID_CELL="GridCell";this.TYPE_GRID_ROW="GridRow";this.TYPE_GRID_ROW_SCROLL="GridRowScroll";this.TYPE_GRID_SECTION="GridSection";this.TYPE_GRID_ROW_SELECTOR="GridRowSelector";this.TYPE_GRID_COLUMN_HEADER="GridColumnHeader";this.PROP_JUNCTION_EXPANDED_ICON="ojei";this.PROP_JUNCTION_COLLAPSED_ICON="ojci";this.PROP_IS_SCROLLING="igscrlg";this.PROP_IS_LOAD_ON_DEMAND="igLoadOnDemand";this.PARTITIONED_ROW_COUNT="igRowCount";this.PROP_SINGLE_ROW_HEIGHT="singleRowHeight";this.PROP_PREVIOUS_SCROLL_TOP="previousScrollTop";this.PROP_CURRENT_VIRTUAL_PAGE="currentVirtualPage";this.PROP_LOD_MARKER_HEIGHT="lodMarkerHeight";this.PROP_IG_ROW_FETCH_SIZE="igRowFetchSize";this.PROP_IG_SCROLL_TOP_STATE="igScrollTopState";this.LOAD_ON_DEMAND_DEFAULT="default";this.LOAD_ON_DEMAND_PARTITIONED="partitioned";this.PROP_IG_LOADING_IMAGE="igLoadingImage";this.PROP_IG_CURRENT_ROW_COUNT="igCurrentRowCount";this.PROP_IG_NEEDS_SCROLLING="igNeedsScrolling";this.PROP_IG_VIRTUAL_PAGE_COUNT="igVirtualPageCount";this.PROP_IG_LOAD_ON_DEMAND_TIMER_DEFAULT=200;this.PROP_IG_LOAD_ON_DEMAND_TIMER_PARTITIONED=400;this.PROP_IG_LOAD_ON_DEMAND_THRESHOLD=0.25;this.PROP_IG_LOAD_ON_DEMAND_TOOLTIP_OFFSET=50;this.PROP_REMAINDER_COUNT="igRemainderCount";this.init=function(){ig.factory.addClass(ig.grid.TYPE_GRID,IgGrid);ig.factory.addClass(ig.grid.TYPE_GRID_CELL,IgGridCell);ig.factory.addClass(ig.grid.TYPE_GRID_ROW,IgGridRow);ig.factory.addClass(ig.grid.TYPE_GRID_ROW_SCROLL,IgGridScrollingRow);ig.factory.addClass(ig.grid.TYPE_GRID_SECTION,IgGridSection);ig.factory.addClass(ig.grid.TYPE_GRID_COLUMN_HEADER,IgGridColumnHeader);};this.initGrid=function(gridId){var e=ig.grid.getGrid(gridId);if(!ig.isNull(e)){e.init();var form=e.getForm(e.id);if(ig.grid.formsWithGrid[form.id]==null){ig.addEventListener(form,"submit",ig.grid.onBeforeSubmit,false);ig.grid.formsWithGrid[form.id]=form;}}};this.onExpandedOnDemand=function(httpReq){ig.onPartialRefreshDefault(httpReq);var node=ig.getUIElementById(httpReq.getSourceOfRequest());if(!ig.isNull(node)){node.focus();}};this.onExpandRow=function(row){if(!ig.isNull(row)){if(row.hasChild()){icon=(row.isExpanded())?row.getAttribute(ig.grid.PROP_JUNCTION_EXPANDED_ICON,true):row.getAttribute(ig.grid.PROP_JUNCTION_COLLAPSED_ICON,true);if(ig.isNull(row)||row.elm.childNodes.length==0){var scrollingRow=ig.getUIElementById(row.elm.id+"_sr");scrollingRow.updateJunctionIcon(icon);}else{row.updateJunctionIcon(icon);}}
row.repaint();}};this.selectAllRows=function(domNode,select){var grid=this.getGrid(domNode);if(!ig.isNull(grid)){grid.selectAllRows(select);if(grid.isImmediateRowsChangeEvent()){ig.smartSubmit(grid.elm.id,null,null);}}};
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,null,this.customFLT);}}};this.customFLT=function(){
alert("hello");
var value = document.getElementById("form1:hiddenField1").value;
alert(value);
}; -
0
Hi, dayanandabv!
I think this should finally solve your problem. Just add ig.onPartialRefreshDefault(httpReq); into your customFLT function since there must be a function that will update the values of the elements. this.customFLT = function(httpReq) {
ig.onPartialRefreshDefault(httpReq);
var value = document.getElementById("form1:hiddenField1").value;alert("value: " + value);};
I hope this will help you.
Yet I think this topic has gone a little bit farther than the purpose of this forum supposes since this is functionality not provided with our product and involves modifying files that should not be modified.
-
0
HI Bozhidar Dedov.
thanks for your replay, i appreciate
your continues help.has you told i have changed the following code according to your suggestion, but it is not working.
is there anything else i need to change? in backing bean? or in design i.e. in JSP design ?
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,null,this.customFLT);}}};this.customFLT=function(httpReq){
ig.onPartialRefreshDefault(httpReq);
alert("hello");
var value = document.getElementById("form1:hiddenField1").value;
alert(value);
}; -
0
Hi, dayanandabv!
I think I was clear but if not it is probably my fault. Let me explain again what I am doing to reproduce your sample. Since I necessarily don't have all your classes, I made a simple application realizing the functionality you describe, namely to select a value selected from a WebGrid row in a message box. For that aim I have a JSP page with WebGrid and a hidden field. The WebGrid sends a SelectedRowsChangeEvent that is being caught by a listener method where I added your code. In the igf_grid.js file I replace the Infragistics code in the this.selectRow = function(domNode, select) with your customer code and I made the necessary changes (described so far) so that the value of the hiddenField element displayed in the message updates (this was also explained). This configuration works as it is supposed to.
-
0
Hi,
I will now apply all my source code:
JAVA BackingBean:
public class ForumExampleBean {
GridView grid;List clientsList = DAO.getClientsList(); // adding some objects
HtmlInputHidden hiddenField1;
public ForumExampleBean() {
}public void onChangeSelection(SelectedRowsChangeEvent e) {
String selectedid = "";
if (getGrid() != null) {
Iterator selectedRows = getGrid().getSelectedRows()
.iterator();
while (selectedRows.hasNext()) {
RowItem rowItem = (RowItem) selectedRows.next();
{
int i = 0;
Iterator iter = (Iterator) rowItem.getCells().iterator();
while (iter.hasNext()) {
UIComponent cell = (UIComponent) iter.next();
Object object = cell.getChildren().get(0);
if (object instanceof UIOutput) {
if (i == 0) {
String selectedUnit = ((UIOutput) object)
.getValue().toString();
selectedid = selectedid + selectedUnit;
}
i++;
}
}
}
}
}
getHiddenField1().setValue(selectedid);
SmartRefreshManager srm = SmartRefreshManager.getCurrentInstance();
srm.removeSmartRefreshIds(getHiddenField1().getClientId(
FacesContext.getCurrentInstance()));
srm.addSmartRefreshId(getHiddenField1().getClientId(
FacesContext.getCurrentInstance()));
getHiddenField1().setImmediate(true);
System.out.println("getHiddenField1—> "
+ getHiddenField1().getValue());
}
public GridView getGrid() {
return grid;
}
public void setGrid(GridView grid) {
this.grid = grid;
}
public List getClientsList() {
return clientsList;
}
public void setClientsList(List clientsList) {
this.clientsList = clientsList;
}
public HtmlInputHidden getHiddenField1() {
return hiddenField1;
}
public void setHiddenField1(HtmlInputHidden hiddenField1) {
this.hiddenField1 = hiddenField1;
}
}
JSP page:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%><%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="ig"
uri="http://www.infragistics.com/faces/netadvantage"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Forum Example</title>
</head><body>
<f:view>
<h:form id="form1">
<ig:gridView id="grid"
dataSource="#{webGridSelectionBean.clientsList}" pageSize="10"
pageChangeListener="#{webGridSelectionBean.onPageChange}"dataKeyName="id"
selectedRowsChangeListener="#{webGridSelectionBean.onChangeSelection}"binding="#{webGridSelectionBean.grid}">
<f:facet name="header">
<h:outputText value="Clients List"></h:outputText>
</f:facet>
<ig:columnSelectRow showSelectAll="true"></ig:columnSelectRow>
<ig:column>
<f:facet name="header">
<h:outputText value="Client Id"></h:outputText>
</f:facet>
<h:outputText value="#{DATA_ROW.id}"></h:outputText>
</ig:column>
<ig:column>
<f:facet name="header">
<h:outputText value="Company"></h:outputText>
</f:facet>
<h:outputText value="#{DATA_ROW.companyName}"></h:outputText>
</ig:column>
<ig:column>
<f:facet name="header">
<h:outputText value="Reg. number"></h:outputText>
</f:facet>
<h:outputText value="#{DATA_ROW.regNumber}"></h:outputText>
</ig:column>
<ig:column>
<f:facet name="header">
<h:outputText value="Selected"></h:outputText>
</f:facet>
<h:outputText value="#{DATA_ROW.selected}"></h:outputText>
</ig:column>
</ig:gridView>
< <h:inputHidden binding="#{webGridSelectionBean.hiddenField1}"
id="hiddenField1" immediate="true"></h:inputHidden>
<table>
<tr>
<td><h:outputText id="messOnPage"
value="#{webGridSelectionBean.msgRowsOnPage}"binding="#{webGridSelectionBean.textRowsNoPage}"></h:outputText></td>
</tr>
<tr>
<td><h:outputText id="messSelected"
value="#{webGridSelectionBean.msgRowsSelected}"binding="#{webGridSelectionBean.textRowsSelected}"></h:outputText></td>
</tr>
</table>
</h:form>
</f:view>
</body>
</html>
Changes in igf_grid.js:
Replace the following code
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);}
}
};
with this one
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, null,this.customFLT);}
}
};
this.customFLT = function(httpReq) {
ig.onPartialRefreshDefault(httpReq);
var value = document.getElementById("form1:hiddenField1").value;alert("value: " + value);};
Please, for further help consult our support policies. Thanks in advance!
-
-
- You must be logged in to reply to this topic.
Suggested Discussions
Webdatagrid – How to get value of TemplateDataField – Itemtemplate column value in Javascript client side
Hi, I need to get the cell text value of the Itemtemplate column in javascript. I tried this –…Getting Client Id of Selected Row in JavaScript
Hi, How can i get the Client Id of selected row through javascript. Here is my JavaScript Code func…getting the value of a hidden column – igGrid
In my grid I have multiple rows, each row has a ‘view’ button on it. I want to be able…Getting checkbox value from UltraGrid
Hi Anyone please help me with this. My Grid Contains a checkbox column. I want to pass the checksta…Tags
No tags
Created by
Created on
Aug 6, 2008 12:02 PM
Last activity on
Feb 12, 2026 3:37 PM