JBoss Rich Faces SVN: r1289 - in trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces: renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-25 07:26:15 -0400 (Mon, 25 Jun 2007)
New Revision: 1289
Modified:
trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-296
Modified: trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-06-25 10:42:02 UTC (rev 1288)
+++ trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/component/UISimpleTogglePanel.java 2007-06-25 11:26:15 UTC (rev 1289)
@@ -1,103 +1,86 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.component;
-
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxSource;
-import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
-
-import javax.faces.component.ActionSource;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesEvent;
-
-
-/**
- * JSF component class
- */
-public abstract class UISimpleTogglePanel extends AjaxActionComponent implements AjaxComponent, AjaxSource, ActionSource
-//public abstract class UISimpleTogglePanel extends UIInput implements AjaxComponent, AjaxSource, ActionSource
-{
-
- public static final String COMPONENT_FAMILY = "javax.faces.Command";
- public static final String SERVER_SWITCH_TYPE = "server";
- public static final String CLIENT_SWITCH_TYPE = "client";
- public static final String AJAX_SWITCH_TYPE = "ajax";
- public static final boolean COLLAPSED = false;
- public static final boolean EXPANDED = true;
-
- private boolean _opened = true;
-
- //xxxx by nick - why properties here? just describe them in config and CDK generates
- //valid fields & save/restore code
- //for "public" (.tld etc.) properties you should create abstract getters/setters only
-
- //xxxx by nick - according to JavaDocs http://webdownload.exadel.com/downloads/ajax4jsf/documentation/javaAPI/or...
- //AjaxActionComponent already has immediate property
-
-
- public abstract void setSwitchType(String switchType);
-
- public abstract String getSwitchType();
-
- /** A false value for this attribute makes a panel closed as default
- * Setter for opened
- * @param opened - new value
- */
- public void setOpened(boolean opened) {
- _opened = opened;
- }
-
- /**
- * A false value for this attribute makes a panel closed as default
- * Getter for opened
- * @return opened value from local variable or value bindings
- */
- public boolean isOpened() {
- ValueBinding vb = getValueBinding("opened");
- if (vb != null) {
- Boolean value = (Boolean) vb.getValue(getFacesContext());
- if (null == value) {
- return this._opened;
- }
- return (value.booleanValue());
- } else {
- return (this._opened);
- }
- }
-
- public boolean getRendersChildren() {
- return true;
- }
-
- //public void broadcast(FacesEvent facesEvent) throws AbortProcessingException {
- // super.broadcast(facesEvent);
- // FacesContext facesContext = FacesContext.getCurrentInstance();
- // if (AjaxRendererUtils.isAjaxRequest(facesContext) && this.getSwitchType().equals(AJAX_SWITCH_TYPE)) {
- // AjaxRendererUtils.addRegionByName(facesContext,
- // this,
- // this.getId());
- // }
- //}
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.ajax.AjaxSource;
+
+import javax.faces.component.ActionSource;
+import javax.faces.el.ValueBinding;
+
+/**
+ * JSF component class
+ */
+public abstract class UISimpleTogglePanel extends AjaxActionComponent implements AjaxComponent, AjaxSource, ActionSource
+//public abstract class UISimpleTogglePanel extends UIInput implements AjaxComponent, AjaxSource, ActionSource
+{
+
+ public static final String COMPONENT_FAMILY = "javax.faces.Command";
+ public static final String SERVER_SWITCH_TYPE = "server";
+ public static final String CLIENT_SWITCH_TYPE = "client";
+ public static final String AJAX_SWITCH_TYPE = "ajax";
+ public static final boolean COLLAPSED = false;
+ public static final boolean EXPANDED = true;
+
+ //xxxx by nick - why properties here? just describe them in config and CDK generates
+ //valid fields & save/restore code
+ //for "public" (.tld etc.) properties you should create abstract getters/setters only
+
+ //xxxx by nick - according to JavaDocs http://webdownload.exadel.com/downloads/ajax4jsf/documentation/javaAPI/or...
+ //AjaxActionComponent already has immediate property
+
+
+ public abstract void setSwitchType(String switchType);
+
+ public abstract String getSwitchType();
+
+ public abstract void setOpened(boolean opened);
+
+ public abstract boolean isOpened();
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ public void setValueBinding(String arg0, ValueBinding arg1) {
+ if ("opened".equals(arg0))
+ super.setValueBinding("value", arg1);
+ super.setValueBinding(arg0, arg1);
+ }
+
+ public ValueBinding getValueBinding(String arg0) {
+ if ("opened".equals(arg0))
+ return super.getValueBinding("value");
+ return super.getValueBinding(arg0);
+ }
+
+ //public void broadcast(FacesEvent facesEvent) throws AbortProcessingException {
+ // super.broadcast(facesEvent);
+ // FacesContext facesContext = FacesContext.getCurrentInstance();
+ // if (AjaxRendererUtils.isAjaxRequest(facesContext) && this.getSwitchType().equals(AJAX_SWITCH_TYPE)) {
+ // AjaxRendererUtils.addRegionByName(facesContext,
+ // this,
+ // this.getId());
+ // }
+ //}
+}
Modified: trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2007-06-25 10:42:02 UTC (rev 1288)
+++ trunk/richfaces/simpleTogglePanel/src/main/java/org/richfaces/renderkit/html/SimpleTogglePanelRenderer.java 2007-06-25 11:26:15 UTC (rev 1289)
@@ -102,8 +102,9 @@
event.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
event.queue();
- }
- panel.setOpened(new Boolean((String) clnId).booleanValue());
+ }
+ if (null == panel.getValueBinding("value"))
+ panel.setOpened(new Boolean((String) clnId).booleanValue());
}
if (AjaxRendererUtils.isAjaxRequest(context) && panel.getSwitchType().equals(UISimpleTogglePanel.AJAX_SWITCH_TYPE)) {
17 years, 6 months
JBoss Rich Faces SVN: r1288 - trunk/sandbox/scrollable-grid/design/funcspec.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-06-25 06:42:02 -0400 (Mon, 25 Jun 2007)
New Revision: 1288
Modified:
trunk/sandbox/scrollable-grid/design/funcspec/FuncSpec - Invision Scrollable Grid Component.doc
Log:
Modified: trunk/sandbox/scrollable-grid/design/funcspec/FuncSpec - Invision Scrollable Grid Component.doc
===================================================================
(Binary files differ)
17 years, 6 months
JBoss Rich Faces SVN: r1287 - in trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI: controls/grid and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-25 05:39:36 -0400 (Mon, 25 Jun 2007)
New Revision: 1287
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Fix problem with "Loading..." label first showing
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js 2007-06-25 09:39:06 UTC (rev 1286)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/box/SplashBox.js 2007-06-25 09:39:36 UTC (rev 1287)
@@ -22,10 +22,11 @@
initialize: function(text, parentElement, zIndex, supressSplash) {
ClientUI.common.box.SplashBox.parentClass.constructor().call(this, null, parentElement);
+ this.moveTo(-1000, -1000);
this.zIndex = zIndex || 500;
this.supressSplash = supressSplash || false;
+ this.createControl(text);
this.hide();
- this.createControl(text);
},
createControl: function(text) {
this.element.setStyle({zIndex: this.zIndex});
@@ -51,7 +52,7 @@
this.div.setHeight(this.getHeight());
this.div.show();
}
-
+
this.text = new ClientUI.common.box.Box(text, this.getElement());
this.text.setParent(this.getElement());
this.text.getElement().setStyle({zIndex: this.zIndex + 100});
@@ -59,10 +60,13 @@
this.text.getElement().innerHTML = "<font size='4' color='white'>Loading...</font>";
this.text.makeAbsolute();
this.text.show();
+
},
setSize: function(width, height) {
this.setWidth(width);
this.setHeight(height);
+ this.containerWidth = width;
+ this.containerHeight = height;
},
setImage: function(image) {
if(!this.img) {
@@ -73,8 +77,8 @@
this.text.hide();
},
updateLayout: function() {
- var width = this.getWidth();
- var height = this.getHeight();
+ var width = this.containerWidth||this.getWidth();
+ var height = this.containerHeight||this.getHeight();
this.frame.setWidth(width);
this.frame.setHeight(height);
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-25 09:39:06 UTC (rev 1286)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-25 09:39:36 UTC (rev 1287)
@@ -484,6 +484,7 @@
this.splash.setSize(this.scrollBox.getViewportWidth(), this.scrollBox.getViewportHeight());
this.splash.updateLayout();
this.splash.show();
+ this.splash.updateLayout();
},
forceReRender: function() {
if(ClientUILib.isIE && !ClientUILib.isIE7) {
17 years, 6 months
JBoss Rich Faces SVN: r1286 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-25 05:39:06 -0400 (Mon, 25 Jun 2007)
New Revision: 1286
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Suspend some initialization code by timeout
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 08:03:54 UTC (rev 1285)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-25 09:39:06 UTC (rev 1286)
@@ -51,17 +51,22 @@
if(!this.isInitialized) {
this.isInitialized = true;
- ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
- var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
- this.setProgressCtrl(progress);
- Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
- if (this.options.selectionInput) {
- this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
+ ClientUI.controls.grid.ScrollableGrid.parentClass.constructor().call(this, this.client_id, this.dataModel, this.templates);
+
+ // suspend some processing
+ setTimeout(function(){
+ var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
+ this.setProgressCtrl(progress);
+ Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
+ if (this.options.selectionInput) {
+ this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
+ }
+ }.bind(this), 500);
+
+ if (this.startUpTime) {
+ ClientUILib.log(ClientUILogger.ERROR, "Load Time'" + (new Date().getTime() - this.startUpTime) + "' ms");
+ }
}
- if (this.startUpTime) {
- ClientUILib.log(ClientUILogger.ERROR, "Load Time'" + (new Date().getTime() - this.startUpTime) + "' ms");
- }
- }
},
onSortComplete : function(request, event, data){
@@ -106,10 +111,10 @@
},
setSizes: function(width, height) {
- var style = this.element.style;
- style.width = width +"px";
- style.height = height +"px";
- this.updateLayout();
+ var style = this.element.style;
+ style.width = width +"px";
+ style.height = height +"px";
+ this.updateLayout();
},
doExpand: function(index) {
17 years, 6 months
JBoss Rich Faces SVN: r1285 - in trunk/richfaces/datascroller/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-06-25 04:03:54 -0400 (Mon, 25 Jun 2007)
New Revision: 1285
Modified:
trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
Log:
http://jira.jboss.com/jira/browse/RF-16 fixed
Modified: trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-06-25 07:30:31 UTC (rev 1284)
+++ trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-06-25 08:03:54 UTC (rev 1285)
@@ -258,6 +258,18 @@
<classname>java.lang.String</classname>
</property>
+ <property>
+ <name>pageIndexVar</name>
+ <classname>java.lang.String</classname>
+ <description>Name of variable in request scope containing index of active page</description>
+ </property>
+
+ <property>
+ <name>pagesVar</name>
+ <classname>java.lang.String</classname>
+ <description>Name of variable in request scope containing number of pages</description>
+ </property>
+
</component>
&listeners;
</components>
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-06-25 07:30:31 UTC (rev 1284)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-06-25 08:03:54 UTC (rev 1285)
@@ -237,6 +237,28 @@
}
+ public void renderPages(FacesContext context, UIComponent component) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ UIData data = (UIData) variables.getVariable("dataTable");
+
+ ResponseWriter out = context.getResponseWriter();
+ UIDatascroller scroller = (UIDatascroller) component;
+ int currentPage = scroller.getPageIndex(data);
+
+ int pageCount = scroller.getPageCount(data);
+ if (pageCount <= 1) {
+ pageCount = 1;
+ }
+ String varName = (String)scroller.getAttributes().get("pageIndexVar");
+ if (varName != null && varName.length()>0)
+ context.getExternalContext()
+ .getRequestMap().put(varName, new Integer(currentPage));
+ varName = (String)scroller.getAttributes().get("pagesVar");
+ if (varName != null && varName.length()>0)
+ context.getExternalContext()
+ .getRequestMap().put(varName, new Integer(pageCount));
+ }
+
private Map getParamMap(FacesContext context) {
return context.getExternalContext().getRequestParameterMap();
}
Modified: trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
--- trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-06-25 07:30:31 UTC (rev 1284)
+++ trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-06-25 08:03:54 UTC (rev 1285)
@@ -150,7 +150,21 @@
}
]]></jsp:scriptlet>
- <f:call name="renderPager"/>
+ <jsp:scriptlet><![CDATA[
+ UIComponent pagesFacet = component.getFacet("pages");
+ if (pagesFacet !=null && pagesFacet.isRendered()) {
+ renderPages(context,component);
+ ]]></jsp:scriptlet>
+ <td>
+ <jsp:scriptlet><![CDATA[
+ renderChild(context, pagesFacet);
+ ]]></jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ } else {
+ renderPager(context,component);
+ }
+ ]]></jsp:scriptlet>
<jsp:scriptlet><![CDATA[
if (controlsState.isNextRendered()){
17 years, 6 months
JBoss Rich Faces SVN: r1284 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-25 03:30:31 -0400 (Mon, 25 Jun 2007)
New Revision: 1284
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Fix ensureVisible method's setting scroll position in grid
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-22 18:08:16 UTC (rev 1283)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-25 07:30:31 UTC (rev 1284)
@@ -482,8 +482,8 @@
this.setProgressCtrl(new ClientUI.common.box.SplashBox(null, this.getElement(), 300));
}
this.splash.setSize(this.scrollBox.getViewportWidth(), this.scrollBox.getViewportHeight());
+ this.splash.updateLayout();
this.splash.show();
- this.splash.updateLayout();
},
forceReRender: function() {
if(ClientUILib.isIE && !ClientUILib.isIE7) {
@@ -744,9 +744,9 @@
var visibleRows = parseInt(this.contentBox.getHeight() / this.defaultRowHeight, 10) + 1;
if(this.grid.dataModel.getCount() > visibleRows) {
var y = index*this.defaultRowHeight;
+ this.scrollBox.getElement().scrollTop = y;
this.currentPos = 0;
- this._onContentVScroll(y);
- this.scrollBox.getElement().scrollTop = y;
+ this._onContentVScroll(this.scrollBox.getElement().scrollTop);
}
}
},
17 years, 6 months
JBoss Rich Faces SVN: r1283 - trunk.
by richfaces-svn-commits@lists.jboss.org
Author: ishabalov
Date: 2007-06-22 14:08:16 -0400 (Fri, 22 Jun 2007)
New Revision: 1283
Modified:
trunk/richfaces_classes.xls
Log:
Updated
Modified: trunk/richfaces_classes.xls
===================================================================
(Binary files differ)
17 years, 6 months
JBoss Rich Faces SVN: r1282 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-06-22 14:07:10 -0400 (Fri, 22 Jun 2007)
New Revision: 1282
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
add selection JS events
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-22 18:06:39 UTC (rev 1281)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-22 18:07:10 UTC (rev 1282)
@@ -226,6 +226,7 @@
this.selection = new ClientUI.controls.grid.Selection();
this.inputElement = grid.options.selectionInput;
+ this.onselectionchange = grid.options.onselectionchange;
this.selectedClass = grid.options.selectedClass;
this.activeClass = grid.options.activeClass;
@@ -387,7 +388,7 @@
this.lostFocus();
}
if (noDefault) {
- this.selectionChanged();
+ this.selectionChanged(event);
if (event.preventBubble) event.preventBubble();
Event.stop(event);
}
@@ -431,13 +432,15 @@
} else if (document.selection) {
document.selection.empty();
}
- this.selectionChanged();
+ this.selectionChanged(event);
},
- selectionChanged: function() {
- $(this.inputElement).value = this.selection.inspectRanges()+ this.selectionFlag;
- var state = this.selection.getState();
-// IL.Event.fireEvent(this.grid.element, "selectionchange", {oldSelection: this.oldState, newSelection: state}, null);
+ selectionChanged: function(event) {
+ $(this.inputElement).value = this.selection.inspectRanges()+ this.selectionFlag;
+ var state = this.selection.getState();
+ event.oldSelection = this.oldState;
+ event.newSelection = state;
+ this.onselectionchange(event);
this.oldState = state;
},
17 years, 6 months
JBoss Rich Faces SVN: r1281 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-06-22 14:06:39 -0400 (Fri, 22 Jun 2007)
New Revision: 1281
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
add selection JS events
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-22 18:06:14 UTC (rev 1280)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-22 18:06:39 UTC (rev 1281)
@@ -332,6 +332,7 @@
options.addOption("columnsCount", new Integer(columnCount));
options.addOption("rowsCount", new Integer(grid.getRows()));
+ options.addEventHandler("onselectionchange");
JSFunction function = new JSFunction("new ClientUI.controls.grid.ScrollableGrid");
function.addParameter(options);
17 years, 6 months
JBoss Rich Faces SVN: r1280 - trunk/sandbox/scrollable-grid/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-06-22 14:06:14 -0400 (Fri, 22 Jun 2007)
New Revision: 1280
Modified:
trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
Log:
add selection JS events
Modified: trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-06-22 17:07:10 UTC (rev 1279)
+++ trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-06-22 18:06:14 UTC (rev 1280)
@@ -89,6 +89,11 @@
<classname>java.lang.String</classname>
</property>
+ <property>
+ <name>onselectionchange</name>
+ <classname>java.lang.String</classname>
+ </property>
+
<property attachedstate="true" hidden="true">
<name>sortOrder</name>
<classname>org.richfaces.model.SortOrder</classname>
17 years, 6 months