JBoss Rich Faces SVN: r6958 - trunk/ui/orderingList/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-19 11:45:55 -0400 (Wed, 19 Mar 2008)
New Revision: 6958
Modified:
trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2501
Modified: trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-03-19 15:25:53 UTC (rev 6957)
+++ trunk/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2008-03-19 15:45:55 UTC (rev 6958)
@@ -33,9 +33,23 @@
<table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-ordering-list-body">
<tbody>
<tr style="#{this:getCaptionDisplay(context, component)}" >
+ <jsp:scriptlet><![CDATA[
+ if ("left".equals(component.getAttributes().get("controlsHorizontalAlign"))) {
+ ]]></jsp:scriptlet>
+ <td></td>
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
<td colspan="2" class="rich-ordering-list-caption">
<f:call name="encodeCaption"/>
</td>
+ <jsp:scriptlet><![CDATA[
+ if (!"left".equals(component.getAttributes().get("controlsHorizontalAlign"))) {
+ ]]></jsp:scriptlet>
+ <td></td>
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
</tr>
<tr>
<jsp:scriptlet><![CDATA[
16 years, 10 months
JBoss Rich Faces SVN: r6957 - in trunk/ui/modal-panel/src/main: java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-19 11:25:53 -0400 (Wed, 19 Mar 2008)
New Revision: 6957
Modified:
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
http://jira.jboss.com/jira/browse/RF-2464
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2008-03-19 15:25:40 UTC (rev 6956)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2008-03-19 15:25:53 UTC (rev 6957)
@@ -152,9 +152,9 @@
<defaultvalue>false</defaultvalue>
</property>
- <property>
+ <property el="true">
<name>visualOptions</name>
- <classname>java.util.Map</classname>
+ <classname>java.lang.Object</classname>
<description>Defines options that were specified on the client side</description>
<defaultvalue/>
</property>
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2008-03-19 15:25:40 UTC (rev 6956)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2008-03-19 15:25:53 UTC (rev 6957)
@@ -24,10 +24,15 @@
import java.util.HashMap;
import java.util.Map;
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
+import org.richfaces.json.JSONException;
+import org.richfaces.json.JSONMap;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
@@ -39,9 +44,9 @@
public static final String COMPONENT_TYPE = "org.richfaces.ModalPanel";
- private static final String COMPONENT_FAMILY = "org.richfaces.ModalPanel";
+ public static final String COMPONENT_FAMILY = "org.richfaces.ModalPanel";
- private Map visualOptions;
+ private Map<String, String> visualOptions;
/**
* Shadow depth.
@@ -124,13 +129,24 @@
return shadowStyle;
}
- public Map getVisualOptions() {
- if (null == visualOptions)
- visualOptions = new HashMap();
- return visualOptions;
+ public Object getVisualOptions() {
+ ValueExpression ve = getValueExpression("visualOptions");
+ if (null != ve) {
+ try {
+ Object value = ve.getValue(getFacesContext().getELContext());
+ return prepareVisualOptions(value);
+ } catch (ELException e) {
+ throw new FacesException(e);
+ }
+ }
+
+ if (null == this.visualOptions) {
+ this.visualOptions = new HashMap<String, String>();
+ }
+ return this.visualOptions;
}
- public void setVisualOptions(Map visualOptions) {
- this.visualOptions = visualOptions;
+ public void setVisualOptions(Object visualOptions) {
+ this.visualOptions = prepareVisualOptions(visualOptions);
}
/**
@@ -163,4 +179,29 @@
return !isAutosized();
}
}
+
+ protected Map<String, String> prepareVisualOptions(Object value) {
+ if (null == value) {
+ if (null == this.visualOptions) {
+ this.visualOptions = new HashMap<String, String>();
+ }
+ return this.visualOptions;
+ } else if (value instanceof Map) {
+ return (Map<String, String>) value;
+ } else if (value instanceof String) {
+ String s = (String) value;
+ if (!s.startsWith("{")) {
+ s = "{" + s + "}";
+ }
+ try {
+ return new JSONMap(s);
+ } catch (JSONException e) {
+ throw new FacesException(e);
+ }
+ } else {
+ throw new FacesException("Attribute visualOptions of component [" +
+ this.getClientId(getFacesContext()) + "] must be instance of Map or String, but its type is " +
+ value.getClass().getSimpleName());
+ }
+ }
}
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2008-03-19 15:25:40 UTC (rev 6956)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2008-03-19 15:25:53 UTC (rev 6957)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
+import java.util.Map.Entry;
import javax.faces.component.UIComponent;
import javax.faces.context.ExternalContext;
@@ -55,25 +56,27 @@
"SWU", "W", "NWL"
};
+ @SuppressWarnings("unchecked")
protected void doDecode(FacesContext context, UIComponent component) {
super.doDecode(context, component);
UIModalPanel panel = (UIModalPanel)component;
ExternalContext exCtx = context.getExternalContext();
- Map rqMap = exCtx.getRequestParameterMap();
+ Map<String, String> rqMap = exCtx.getRequestParameterMap();
Object clnId = rqMap.get(panel.getClientId(context) + "OpenedState");
if (panel.isKeepVisualState()) {
if (null != clnId) {
panel.setShowWhenRendered(new Boolean((String) clnId).booleanValue());
- Iterator it = rqMap.entrySet().iterator();
+ Map<String, String> visualOptions = (Map<String, String>) panel.getVisualOptions();
+ Iterator<Entry<String, String>> it = rqMap.entrySet().iterator();
while ( it.hasNext()) {
- Map.Entry entry = (Map.Entry)it.next();
+ Map.Entry<String, String> entry = it.next();
int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
if (-1 != suffixPos) {
String key = entry.getKey().toString().substring(suffixPos + STATE_OPTION_SUFFIX.length());
- panel.getVisualOptions().put(key, entry.getValue());
+ visualOptions.put(key, entry.getValue());
}
}
}
@@ -122,7 +125,7 @@
String onbeforeshow = ScriptUtils.toScript(panel.getAttributes().get("onbeforeshow"));
variables.setVariable("onbeforeshow", onbeforeshow);
String onmove = ScriptUtils.toScript(panel.getAttributes().get("onmove"));
-
+ variables.setVariable("onmove", onmove);
}
@@ -134,6 +137,7 @@
return true;
}
+ @SuppressWarnings("unchecked")
public String getShowScript(FacesContext context, UIModalPanel panel) {
StringBuffer result = new StringBuffer();
@@ -141,9 +145,9 @@
result.append("Event.observe(window, \"load\", function() {");
result.append("Richfaces.showModalPanel('" + panel.getClientId(context) + "', {");
- Iterator it = panel.getVisualOptions().entrySet().iterator();
+ Iterator<Map.Entry<String, String>> it = ((Map<String, String>) panel.getVisualOptions()).entrySet().iterator();
while (it.hasNext()) {
- Map.Entry entry = (Map.Entry)it.next();
+ Map.Entry<String, String> entry = it.next();
result.append(entry.getKey() + ": '" + entry.getValue() + "'");
if (it.hasNext()) {
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-03-19 15:25:40 UTC (rev 6956)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-03-19 15:25:53 UTC (rev 6957)
@@ -827,8 +827,8 @@
var input = document.createElement("input");
input.type = "hidden";
- input.id = this.id.id + "OpenedState";
- input.name = this.id.id + "OpenedState";
+ input.id = this.markerId.id + "OpenedState";
+ input.name = this.markerId.id + "OpenedState";
input.value = this.shown ? "true" : "false";
target.appendChild(input);
16 years, 10 months
JBoss Rich Faces SVN: r6956 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-03-19 11:25:40 -0400 (Wed, 19 Mar 2008)
New Revision: 6956
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml
Log:
text wrapped manually.
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml 2008-03-19 15:18:17 UTC (rev 6955)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/examples/example.xhtml 2008-03-19 15:25:40 UTC (rev 6956)
@@ -1,31 +1,64 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
<rich:panelBar height="400" width="500">
- <rich:panelBarItem label="Leverage the whole set of JSF benefits while working with AJAX">
- Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only give you access to the managed bean facility, Ajax4jsf advantages the action and value change listeners as well as invokes server-side validators and converters during the AJAX request-response cycle.
+ <rich:panelBarItem
+ label="Leverage the whole set of JSF benefits while working with AJAX">
+ Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only
+ give you access to the managed bean facility, Ajax4jsf advantages the action and value
+ change listeners as well as invokes server-side validators and converters during the
+ AJAX request-response cycle.
</rich:panelBarItem>
- <rich:panelBarItem label="Add AJAX capability to existing JSF applications">
- The framework is implemented using a component library. The library set Ajax functionality into existing pages, so there is no need to write any JavaScript code or to replace existing components with new Ajax one. Ajax4jsf enables page-wide Ajax support instead of the traditional component-wide support and it gives the opportunity to define the event on the page. An event invokes an Ajax request and areas of the page which are synchronized with the JSF Component Tree after changing the data on the server by Ajax request in accordance with events fired on the client.
+ <rich:panelBarItem
+ label="Add AJAX capability to existing JSF applications">
+ The framework is implemented using a component library. The library set Ajax
+ functionality into existing pages, so there is no need to write any JavaScript
+ code or to replace existing components with new Ajax one. Ajax4jsf enables page-wide
+ Ajax support instead of the traditional component-wide support and it gives the
+ opportunity to define the event on the page. An event invokes an Ajax request and areas
+ of the page which are synchronized with the JSF Component Tree after changing the data
+ on the server by Ajax request in accordance with events fired on the client.
</rich:panelBarItem>
- <rich:panelBarItem label="Write your own custom rich components with built-in AJAX support">
- Component Development Kit (CDK) is a design-time extension for Ajax4jsf. The CDK includes a code-generation facility and a templating facility using a JSP-like syntax. These capabilities help to avoid a routine process of a component creation. The component factory works like a well-oiled machine allowing the creation of first-class rich components with built-in Ajax functionality even more easily than the creation of simpler components by means of the traditional coding approach.
+ <rich:panelBarItem
+ label="Write your own custom rich components with built-in AJAX support">
+ Component Development Kit (CDK) is a design-time extension for Ajax4jsf. The CDK includes
+ a code-generation facility and a templating facility using a JSP-like syntax. These
+ capabilities help to avoid a routine process of a component creation. The component
+ factory works like a well-oiled machine allowing the creation of first-class rich
+ components with built-in Ajax functionality even more easily than the creation of
+ simpler components by means of the traditional coding approach.
</rich:panelBarItem>
- <rich:panelBarItem label="Package resources with the application's Java classes ">
- In addition to its core, Ajax functionality of Ajax4jsf provides an advanced support for the different resources management: pictures, JavaScript code, and CSS stylesheets. The resource framework makes possible to pack easily these resources into Jar files along with the code of your custom components.
+ <rich:panelBarItem
+ label="Package resources with the application's Java classes ">
+ In addition to its core, Ajax functionality of Ajax4jsf provides an advanced
+ support for the different resources management: pictures, JavaScript code, and
+ CSS stylesheets. The resource framework makes possible to pack easily these
+ resources into Jar files along with the code of your custom components.
</rich:panelBarItem>
<rich:panelBarItem label="Easily generate images on-the-fly">
- Resource framework can generate images on-the-fly so that it becomes possible to create images using the familiar approach of the Java graphic2D library.
+ Resource framework can generate images on-the-fly so that it becomes possible
+ to create images using the familiar approach of the Java graphic2D library.
</rich:panelBarItem>
- <rich:panelBarItem label="Create a modern rich user interface look-and-feel with skins-based technology">
- Ajax4jsf provides a skinnability feature that allows easily define and manage different color schemes and other parameters of the UI with the help of named skin parameters. Hence it is possible to access the skin parameters from JSP code and the Java code (e.g. to adjust generated on-the-fly images based on the text parts of the UI). Note: skinnability is not an equivalent of traditional CSS, but a complement.
+ <rich:panelBarItem
+ label="Create a modern rich user interface look-and-feel with skins-based technology">
+ Ajax4jsf provides a skinnability feature that allows easily define and manage
+ different color schemes and other parameters of the UI with the help of named
+ skin parameters. Hence it is possible to access the skin parameters from JSP
+ code and the Java code (e.g. to adjust generated on-the-fly images based on
+ the text parts of the UI). Note: skinnability is not an equivalent of traditional
+ CSS, but a complement.
</rich:panelBarItem>
- <rich:panelBarItem label="Test the components, actions, listeners, and pages as you are creating them">
- An automated testing facility is in our roadmap for the near future. This facility will generate test cases for your component as soon as you develop it. The testing framework will not just test the components, but also any other server-side or client-side functionality including JavaScript code. What is more, it will do all of this without deploying the test application into the Servlet container.
+ <rich:panelBarItem
+ label="Test the components, actions, listeners, and pages as you are creating them">
+ An automated testing facility is in our roadmap for the near future. This facility
+ will generate test cases for your component as soon as you develop it. The testing
+ framework will not just test the components, but also any other server-side or
+ client-side functionality including JavaScript code. What is more, it will do all
+ of this without deploying the test application into the Servlet container.
</rich:panelBarItem>
</rich:panelBar>
16 years, 10 months
JBoss Rich Faces SVN: r6955 - trunk/ui/combobox/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-19 11:18:17 -0400 (Wed, 19 Mar 2008)
New Revision: 6955
Modified:
trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2556
Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx 2008-03-19 15:13:06 UTC (rev 6954)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx 2008-03-19 15:18:17 UTC (rev 6955)
@@ -210,7 +210,6 @@
onchange="#{component.attributes['onchange']}"
onselect="#{component.attributes['onselect']}"
onblur="#{component.attributes['onblur']}"
- maxlength="#{component.attributes['maxlength']}"
style="width:#{correction}; #{inputStyle}"
autocomplete="off"
/>
16 years, 10 months
JBoss Rich Faces SVN: r6954 - management/design/columnSortFilterFeatures.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-03-19 11:13:06 -0400 (Wed, 19 Mar 2008)
New Revision: 6954
Modified:
management/design/columnSortFilterFeatures/FuncSpec - Filtering Feature.doc
management/design/columnSortFilterFeatures/FuncSpec - Sorting Feature.doc
Log:
http://jira.jboss.com/jira/browse/RF-1739
Modified: management/design/columnSortFilterFeatures/FuncSpec - Filtering Feature.doc
===================================================================
(Binary files differ)
Modified: management/design/columnSortFilterFeatures/FuncSpec - Sorting Feature.doc
===================================================================
(Binary files differ)
16 years, 10 months
JBoss Rich Faces SVN: r6952 - trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-19 11:05:29 -0400 (Wed, 19 Mar 2008)
New Revision: 6952
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
http://jira.jboss.com/jira/browse/RF-2566
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-03-19 15:03:10 UTC (rev 6951)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-03-19 15:05:29 UTC (rev 6952)
@@ -365,7 +365,18 @@
getCurrentWidth : function() {
return this.combobox.firstChild.offsetWidth;
- }
+ },
+
+ /**
+ * user's JavaScript API
+ */
+ showList : function() {
+ this.comboList.showWithDelay();
+ },
+
+ hideList : function() {
+ this.comboList.hideWithDelay();
+ }
};
16 years, 10 months
JBoss Rich Faces SVN: r6951 - trunk/ui/combobox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-19 11:03:10 -0400 (Wed, 19 Mar 2008)
New Revision: 6951
Modified:
trunk/ui/combobox/src/main/config/component/combobox.xml
Log:
add selectedItemClass http://jira.jboss.com/jira/browse/RF-2581
Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-19 14:33:55 UTC (rev 6950)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-19 15:03:10 UTC (rev 6951)
@@ -190,6 +190,11 @@
<description></description>
</property>
<property>
+ <name>itemSelectedClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
<name>buttonStyle</name>
<classname>java.lang.String</classname>
<description></description>
16 years, 10 months
JBoss Rich Faces SVN: r6950 - trunk/ui/orderingList/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-19 10:33:55 -0400 (Wed, 19 Mar 2008)
New Revision: 6950
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
Log:
RF-1958
Modified: trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
--- trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2008-03-19 14:33:47 UTC (rev 6949)
+++ trunk/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2008-03-19 14:33:55 UTC (rev 6950)
@@ -520,13 +520,15 @@
String controlType = (String) attributes.get(ATTRIBUTE_CONTROLS_TYPE);
if (CONTROL_TYPE_NONE.equals(controlType)) {
- if (useFacet) {
- renderChild(context, facet);
- }
+ return;
} else {
+ if (useFacet) {
+ renderChild(context, facet);
+ } else {
renderDefaultControl(context, orderingList, writer, useFacet,
- helper, clientId, bundleExternal, bundleApplication,
- enabled, baseStyle, baseControlStyle);
+ helper, clientId, bundleExternal, bundleApplication,
+ enabled, baseStyle, baseControlStyle);
+ }
}
}
16 years, 10 months
JBoss Rich Faces SVN: r6949 - trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-03-19 10:33:47 -0400 (Wed, 19 Mar 2008)
New Revision: 6949
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RF-1780
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2008-03-19 14:13:33 UTC (rev 6948)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2008-03-19 14:33:47 UTC (rev 6949)
@@ -279,20 +279,22 @@
setListeners: function() {
var frows = $(this.prefix + ":f").rows;
var nrows = $(this.prefix + ":n").rows;
- this.rowCount = frows.length;
+ this.rowCount = nrows.length;
var rowIndex;
for(var i = 0; i < this.rowCount; i++) {
- rowIndex = Number(frows[i].id.split(this.prefix)[1].split(":")[2]);
+ rowIndex = Number(nrows[i].id.split(this.prefix)[1].split(":")[2]);
this.addListener(frows[i], rowIndex);
this.addListener(nrows[i], rowIndex);
}
},
- addListener: function(element, rowIndex) {
- var listener = this.processClick.bindAsEventListener(this, rowIndex);
- var cells = element.cells;
- for(var i = 0; i < cells.length; i++) {
- Utils.DOM.Event.observe(cells[i], "click", listener);
+ addListener: function(tr, rowIndex) {
+ if (tr) {
+ var listener = this.processClick.bindAsEventListener(this, rowIndex);
+ var cells = tr.cells;
+ for(var i = 0; i < cells.length; i++) {
+ Utils.DOM.Event.observe(cells[i], "click", listener);
+ }
}
},
16 years, 10 months