Author: abelevich
Date: 2007-04-26 12:03:46 -0400 (Thu, 26 Apr 2007)
New Revision: 576
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
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-04-26
16:03:37 UTC (rev 575)
+++
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-04-26
16:03:46 UTC (rev 576)
@@ -1,6 +1,23 @@
package org.richfaces.renderkit.html;
-import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
+import javax.faces.context.FacesContext;
-public abstract class ScrollableGridBaseRenderer extends AjaxComponentRendererBase{
+import org.richfaces.component.UIScrollableGrid;
+import org.richfaces.renderkit.CompositeRenderer;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+
+public abstract class ScrollableGridBaseRenderer extends CompositeRenderer {
+
+ protected String getJavaScriptVarName(FacesContext context, UIScrollableGrid grid) {
+ String id = grid.getBaseClientId(context);
+ return "Richfaces_ScrollableGrid_" + id.replaceAll("[^A-Za-z0-9_]",
"_");
+ }
+
+ protected String getScriptContributions(FacesContext context, UIScrollableGrid grid) {
+ return super.getScriptContributions(getJavaScriptVarName(context, grid), context,
grid);
+ }
}
Show replies by date