JBoss Rich Faces SVN: r705 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:57:42 -0400 (Tue, 08 May 2007)
New Revision: 705
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-05-08 17:57:33 UTC (rev 704)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-05-08 17:57:42 UTC (rev 705)
@@ -34,13 +34,13 @@
<body>
- <sg:scrollable-grid value="#{selectionBean.dataModel}" var="issues" first="0" rows="30">
+ <sg:scrollable-grid value="#{selectionBean.dataModel}" var="issues" first="0" rows="100">
<sg:column style="width: 100px" frozen="true">
<f:facet name="header">
<h:outputText value="Key"></h:outputText>
</f:facet>
- <h:outputText value="Test1"></h:outputText>
+ <h:outputText value="#{issues.key.value}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer1"></h:outputText>
</f:facet>
@@ -49,7 +49,7 @@
<f:facet name="header">
<h:outputText value="Summary"></h:outputText>
</f:facet>
- <h:outputText value="Test 2"></h:outputText>
+ <h:outputText value="#{issues.summary}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer2"></h:outputText>
</f:facet>
@@ -58,7 +58,7 @@
<f:facet name="header">
<h:outputText value="Assignee"></h:outputText>
</f:facet>
- <h:outputText value="Test3"></h:outputText>
+ <h:outputText value="#{issues.assignee.name}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer3"></h:outputText>
</f:facet>
@@ -67,7 +67,7 @@
<f:facet name="header">
<h:outputText value="Status"></h:outputText>
</f:facet>
- <h:outputText value="Test4"></h:outputText>
+ <h:outputText value="#{issues.status}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer4"></h:outputText>
</f:facet>
@@ -76,7 +76,7 @@
<f:facet name="header">
<h:outputText value="Reporter"></h:outputText>
</f:facet>
- <h:outputText value="Test5"></h:outputText>
+ <h:outputText value="#{issues.reporter.username}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer5"></h:outputText>
</f:facet>
@@ -85,7 +85,7 @@
<f:facet name="header">
<h:outputText value="Created"></h:outputText>
</f:facet>
- <h:outputText value="Test6"></h:outputText>
+ <h:outputText value="#{issues.created}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer6"></h:outputText>
</f:facet>
@@ -94,7 +94,7 @@
<f:facet name="header">
<h:outputText value="Updated"></h:outputText>
</f:facet>
- <h:outputText value="Test7"></h:outputText>
+ <h:outputText value="#{issues.updated}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer7"></h:outputText>
</f:facet>
@@ -103,7 +103,7 @@
<f:facet name="header">
<h:outputText value="Resolution"></h:outputText>
</f:facet>
- <h:outputText value="Test8"></h:outputText>
+ <h:outputText value="#{issues.resolution}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer8"></h:outputText>
</f:facet>
17 years, 7 months
JBoss Rich Faces SVN: r704 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:57:33 -0400 (Tue, 08 May 2007)
New Revision: 704
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-05-08 17:57:26 UTC (rev 703)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-05-08 17:57:33 UTC (rev 704)
@@ -198,6 +198,12 @@
<managed-bean>
+ <managed-bean-name>jiraService</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.datagrid.service.JiraService</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
<managed-bean-name>selectionBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.datagrid.bean.SelectionBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
@@ -212,10 +218,5 @@
</managed-property>
</managed-bean>
- <managed-bean>
- <managed-bean-name>jiraService</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.datagrid.service.JiraService</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
</faces-config>
17 years, 7 months
JBoss Rich Faces SVN: r703 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:57:26 -0400 (Tue, 08 May 2007)
New Revision: 703
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml 2007-05-08 17:56:44 UTC (rev 702)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml 2007-05-08 17:57:26 UTC (rev 703)
@@ -3,21 +3,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Archetype Created Web Application</display-name>
<context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config.xml</param-value>
- </context-param>
-
- <context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
-
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
- <!--
- -->
+ <!--
+ -->
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
@@ -26,7 +20,6 @@
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
-
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
17 years, 7 months
JBoss Rich Faces SVN: r702 - trunk/sandbox/scrollable-grid/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:56:44 -0400 (Tue, 08 May 2007)
New Revision: 702
Modified:
trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-05-08 17:56:34 UTC (rev 701)
+++ trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-05-08 17:56:44 UTC (rev 702)
@@ -54,5 +54,8 @@
&ui_component_attributes;
&html_style_attributes;
</component>
+ <renderer generate="true">
+ <template>org/richfaces/scrollable-grid-cell.jspx</template>
+ </renderer>
</components>
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r701 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:56:34 -0400 (Tue, 08 May 2007)
New Revision: 701
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-08 17:56:26 UTC (rev 700)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-08 17:56:34 UTC (rev 701)
@@ -6,6 +6,7 @@
import java.util.Iterator;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
import org.ajax4jsf.ajax.repeat.UIRepeat;
import org.apache.commons.collections.iterators.IteratorChain;
@@ -48,4 +49,8 @@
return chain;
}
+ public Object getValue() {
+ // TODO Auto-generated method stub
+ return super.getValue();
+ }
}
17 years, 7 months
JBoss Rich Faces SVN: r700 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:56:26 -0400 (Tue, 08 May 2007)
New Revision: 700
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java 2007-05-08 17:56:17 UTC (rev 699)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java 2007-05-08 17:56:26 UTC (rev 700)
@@ -1,7 +1,12 @@
package org.richfaces.model;
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
import javax.faces.model.DataModel;
+import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.ajax.repeat.Range;
import org.ajax4jsf.ajax.repeat.SequenceDataModel;
public class ScrollableGridDataModel extends SequenceDataModel{
@@ -9,4 +14,9 @@
public ScrollableGridDataModel(DataModel model) {
super(model);
}
+
+ public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
+
+ super.walk(context, visitor, range, argument);
+ }
}
17 years, 7 months
JBoss Rich Faces SVN: r699 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:56:17 -0400 (Tue, 08 May 2007)
New Revision: 699
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
Removed:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridRendererState.java
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnVisitor.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java
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/ColumnVisitor.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnVisitor.java 2007-05-08 17:56:05 UTC (rev 698)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnVisitor.java 2007-05-08 17:56:17 UTC (rev 699)
@@ -18,5 +18,6 @@
*
*/
public interface ColumnVisitor {
- public void visit(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException;
+ public void visit(FacesContext context, UIScrollableGridColumn component,
+ ResponseWriter writer, GridRendererState state) throws IOException;
}
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java 2007-05-08 17:56:05 UTC (rev 698)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java 2007-05-08 17:56:17 UTC (rev 699)
@@ -21,7 +21,8 @@
*/
public class ColumnWalker {
- static void iterateOverHeadersFooters(FacesContext context, UIComponent component, ColumnVisitor visitor, ResponseWriter writer) throws IOException{
+ static void iterateOverHeadersFooters(FacesContext context, UIComponent component,
+ ColumnVisitor visitor, ResponseWriter writer) throws IOException{
if(context == null || component == null){
throw new NullPointerException();
@@ -37,12 +38,11 @@
writer.startElement(HTML.TR_ELEMENT, component);
writer.writeText("\n", null);
-
for (Iterator iter = component.getChildren().iterator(); iter.hasNext(); ) {
UIComponent kid = (UIComponent) iter.next();
if (kid.isRendered()) {
if (kid instanceof UIScrollableGridColumn){
- visitor.visit(context, (UIScrollableGridColumn)kid, writer);
+ visitor.visit(context, (UIScrollableGridColumn)kid, writer, null);
}
}
}
@@ -52,12 +52,37 @@
}
}
- static void iterateOverBody(FacesContext context, UIComponent component, ColumnVisitor visitor, ResponseWriter writer) throws IOException{
+ static void iterateOverCells(FacesContext context, UIComponent component, ColumnVisitor visitor,
+ ResponseWriter writer, GridRendererState state) throws IOException{
+
+ if(context == null || component == null){
+ throw new NullPointerException();
+ }
+
+ if(!component.isRendered()){
+ return ;
+ }
+
if(component instanceof UIScrollableGrid){
- if(null != component.getChildren()){
- visitor.visit(context, component, writer);
+ for (Iterator iter = component.getChildren().iterator(); iter.hasNext(); ) {
+ UIComponent kid = (UIComponent) iter.next();
+ if (kid.isRendered()) {
+ if (kid instanceof UIScrollableGridColumn){
+
+ UIScrollableGridColumn column = (UIScrollableGridColumn)kid;
+ Boolean frozen = ((Boolean)column.getAttributes().get("frozen"));
+
+ if(state.is_isFrozenColumn() && frozen.booleanValue()){
+ visitor.visit(context, (UIScrollableGridColumn)kid, writer,state);
+ } else if(!state.is_isFrozenColumn() && !frozen.booleanValue()){
+ visitor.visit(context, (UIScrollableGridColumn)kid, writer, state);
+ }
+ state.nextCell();
+ }
+ }
}
+ state.setCellIndex(0);
}
- }
+ }
}
Copied: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java (from rev 677, trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridRendererState.java)
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-05-08 17:56:17 UTC (rev 699)
@@ -0,0 +1,272 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.FacesException;
+import javax.faces.component.NamingContainer;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.framework.ajax.AjaxContainer;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.richfaces.component.UIScrollableGrid;
+
+/**
+ * bean to store current {@link com.exadel.vcp.components.datagrid.UIDataGrid } information
+ * in request map. For nested grids, it support push/pop state saving.
+ * In {@link javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)} method
+ * must be created instance of this bean , or, if it already exist in request map - push information.
+ * at the end of encodeEnd call, bean must be pop information or removed.
+ * @author shura
+ *
+ */
+public class GridRendererState implements Serializable {
+
+ public static final String DATA_GRID_RENDERER_STATE = GridRendererState.class.getName();
+
+ private int _rowIndex = 0;
+
+ private int _cellIndex = 0;
+
+ private int _columns = 0;
+
+ private boolean _isFrozenColumn = false;
+
+ private UIScrollableGrid _grid;
+
+ private String _cachedClientId;
+
+ private GridRendererState _previousState = null;
+
+// private AjaxContainer _region = null;
+
+ private boolean _rowSelected;
+
+ private Object rowKey;
+
+ private static final long serialVersionUID = 2129605586975025578L;
+
+// private Set _renderedAreas = null;
+
+
+ /**
+ * Get current grid state from JSF context
+ * @param context
+ * @return current data grid state, or null if not saved.
+ */
+ public static GridRendererState getRendererState(FacesContext context) throws FacesException {
+ if(null == context){
+ throw new NullPointerException("Context for grid state is null");
+ }
+ GridRendererState state = (GridRendererState) context.getExternalContext().getRequestMap().get(DATA_GRID_RENDERER_STATE);
+// if( null == state){
+// throw new FacesException("State for current grid not stored in context");
+// }
+ return state;
+ }
+
+ /**
+ * Create new state for current grid. If state exist, store previsius in field of created.
+ * @param context
+ * @param grid
+ * @return new state for grid.
+ */
+ public static GridRendererState createState(FacesContext context, UIScrollableGrid grid){
+ if(null == context){
+ throw new NullPointerException("Context for grid state is null");
+ }
+ GridRendererState oldState = getRendererState(context);
+ GridRendererState state = new GridRendererState(context,oldState,grid);
+ context.getExternalContext().getRequestMap().put(DATA_GRID_RENDERER_STATE,state);
+ return state;
+ }
+
+ /**
+ * Restore previsius state for gred, or clear request parameter.
+ * @param context
+ */
+ public static void restoreState(FacesContext context) {
+ if (null == context) {
+ throw new NullPointerException("Context for grid state is null");
+ }
+ GridRendererState state = getRendererState(context);
+ if (null == state) {
+ throw new FacesException(
+ "State for current grid not saved in context");
+ }
+ GridRendererState previsiosState = state.getPreviousState();
+ if (null != previsiosState) {
+ context.getExternalContext().getRequestMap().put(DATA_GRID_RENDERER_STATE,
+ previsiosState);
+ } else {
+ context.getExternalContext().getRequestMap().remove(DATA_GRID_RENDERER_STATE);
+ }
+ }
+ /**
+ * Create state for current grig ( and store previsios state in field ).
+ * @param previsiosState
+ */
+ public GridRendererState(FacesContext context, GridRendererState previsiosState, UIScrollableGrid grid) {
+ super();
+ _grid = grid;
+ _cachedClientId = grid.getClientId(context);
+ _previousState = previsiosState;
+ if(AjaxRendererUtils.isAjaxRequest(context)){
+ }
+
+ Map attrs = grid.getAttributes();
+ }
+
+ public String getCurrentCellId(FacesContext context){
+ return getGrid().getClientId(context)+NamingContainer.SEPARATOR_CHAR+"row"+getRowIndex()+
+ NamingContainer.SEPARATOR_CHAR+"col"+getCellIndex();
+ }
+
+ /**
+ * @return Returns the cellIndex.
+ */
+ public int getCellIndex() {
+ return _cellIndex;
+ }
+
+ /**
+ * @param cellIndex The cellIndex to set.
+ */
+ public void setCellIndex(int cellIndex) {
+ _cellIndex = cellIndex;
+ }
+
+ /**
+ * Increment cells counter
+ * @return next cell number.
+ */
+
+ public int nextCell(){
+ return ++_cellIndex;
+ }
+
+
+ /**
+ * @return Returns the columns.
+ */
+ public int getColumns() {
+ return _columns;
+ }
+
+ /**
+ * @param columns The columns to set.
+ */
+ public void setColumns(int columns) {
+ _columns = columns;
+ }
+
+ /**
+ * @return Returns the grid.
+ */
+ public UIScrollableGrid getGrid() {
+ return _grid;
+ }
+
+ /**
+ * @param grid The grid to set.
+ */
+ public void setGrid(UIScrollableGrid grid) {
+ _grid = grid;
+ }
+
+ /**
+ * @return Returns the previsiosState.
+ */
+ public GridRendererState getPreviousState() {
+ return _previousState;
+ }
+
+ /**
+ * @param previsiosState The previsiosState to set.
+ */
+ public void setPreviousState(GridRendererState previsiosState) {
+ _previousState = previsiosState;
+ }
+
+ /**
+ * @return Returns the rowIndex.
+ */
+ public int getRowIndex() {
+ return _rowIndex;
+ }
+
+ /**
+ * Increment current row counter.
+ * @return new row number.
+ */
+ public int nextRow(){
+ return ++_rowIndex;
+ }
+
+ /**
+ * @param rowIndex The rowIndex to set.
+ */
+ public void setRowIndex(int rowIndex) {
+ _rowIndex = rowIndex;
+ }
+
+
+ /**
+ * @return the _cachedClientId
+ */
+ public String getCachedClientId() {
+ return _cachedClientId;
+ }
+
+
+ private StringBuffer buffer = new StringBuffer();
+
+ /**
+ * @return the buffer
+ */
+ public StringBuffer getBuffer() {
+ buffer.setLength(0);
+ return buffer;
+ }
+
+
+ /**
+ * @return the _rowSelected
+ */
+ public boolean isRowSelected() {
+ return _rowSelected;
+ }
+
+ /**
+ * @param selected the _rowSelected to set
+ */
+ public void setRowSelected(boolean selected) {
+ _rowSelected = selected;
+ }
+
+ /**
+ * @return the rowKey
+ */
+ public Object getRowKey() {
+ return rowKey;
+ }
+
+ /**
+ * @param rowKey the rowKey to set
+ */
+ public void setRowKey(Object rowKey) {
+ this.rowKey = rowKey;
+ }
+
+ public boolean is_isFrozenColumn() {
+ return _isFrozenColumn;
+ }
+
+ public void set_isFrozenColumn(boolean frozenColumn) {
+ _isFrozenColumn = frozenColumn;
+ }
+}
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-05-08 17:56:05 UTC (rev 698)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-05-08 17:56:17 UTC (rev 699)
@@ -1,19 +1,23 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.renderer.ComponentVariables;
+import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
+import org.ajax4jsf.framework.renderer.RendererBase;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
import org.richfaces.component.UIScrollableGrid;
import org.richfaces.component.UIScrollableGridColumn;
import org.richfaces.renderkit.CompositeRenderer;
+import org.richfaces.utils.TemplateLoader;
+
/**
* @author Anton Belevich
*
@@ -25,20 +29,20 @@
private final String HEADER_PART = "header";
-
+ private final RendererBase cellTemplate = TemplateLoader.loadTemplate("org.richfaces.renderkit.html.ScrollableGridCellRenderer");
private final ColumnVisitor headerRenderer = new ColumnVisitor(){
- public void visit(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
-
-
- writer.startElement(HTML.td_ELEM, component);
- getUtils().writeAttribute(writer, "frozen", component.getAttributes().get("frozen"));
- getUtils().writeAttribute(writer, "style",component.getAttributes().get("style"));
+ public void visit(FacesContext context, UIScrollableGridColumn column,
+ ResponseWriter writer, GridRendererState state) throws IOException {
+
+ writer.startElement(HTML.td_ELEM, column);
+ getUtils().writeAttribute(writer, "frozen", column.getAttributes().get("frozen"));
+ getUtils().writeAttribute(writer, "style",column.getAttributes().get("style"));
writer.writeText("\n", null);
- if(component.getFacet(HEADER_PART) != null){
- component = component.getFacet(HEADER_PART);
+ if(column.getFacet(HEADER_PART) != null){
+ UIComponent component = column.getFacet(HEADER_PART);
renderChild(context, component);
}
writer.endElement(HTML.td_ELEM);
@@ -48,13 +52,15 @@
private final ColumnVisitor footerRenderer = new ColumnVisitor(){
- public void visit(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
- writer.startElement(HTML.td_ELEM, component);
- getUtils().writeAttribute(writer, "style",component.getAttributes().get("style"));
+ public void visit(FacesContext context, UIScrollableGridColumn column,
+ ResponseWriter writer, GridRendererState state) throws IOException {
+
+ writer.startElement(HTML.td_ELEM, column);
+ getUtils().writeAttribute(writer, "style",column.getAttributes().get("style"));
writer.writeText("\n", null);
- if(component.getFacet(FOOTER_PART) != null){
- component = component.getFacet(FOOTER_PART);
+ if(column.getFacet(FOOTER_PART) != null){
+ UIComponent component = column.getFacet(FOOTER_PART);
renderChild(context, component);
}
@@ -63,116 +69,21 @@
}
};
- private final ColumnVisitor bodyRenderer = new ColumnVisitor(){
+ private final ColumnVisitor cellRenderer = new ColumnVisitor(){
- public void visit(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
-
- UIScrollableGrid grid = (UIScrollableGrid)component;
-
- writer.startElement(HTML.DIV_ELEM, grid);
- getUtils().writeAttribute(writer, "class","GridDataColumns");
- getUtils().writeAttribute(writer, "id","FrozenBox");
- getUtils().writeAttribute(writer, "style","position: absolute; left: 0px; top: 0px; display: block; width: 100px");
- writer.writeText("\n", null);
- writer.startElement("table", grid);
- getUtils().writeAttribute(writer, "id","GridDataFrozen");
- getUtils().writeAttribute(writer, "cellpadding","0");
- getUtils().writeAttribute(writer, "cellspacing","0");
- getUtils().writeAttribute(writer, "style","position: absolute; left: 0px; top: 0px; display: block; width: 100%");
- writer.writeText("\n", null);
- writer.startElement("tbody", grid);
-
+ public void visit(FacesContext context, UIScrollableGridColumn column,
+ ResponseWriter writer, GridRendererState state) throws IOException {
- renderColumns(context, (UIScrollableGrid)grid, writer,true);
-
- writer.endElement("tbody");
- writer.endElement("table");
- writer.endElement(HTML.DIV_ELEM);
-
- writer.startElement(HTML.DIV_ELEM, grid);
- getUtils().writeAttribute(writer, "class","GridDataColumns");
- getUtils().writeAttribute(writer, "id","NormalBox");
- getUtils().writeAttribute(writer, "style","position: absolute; left: 300px; top: 0px; display: block; width: 700px");
- writer.writeText("\n", null);
- writer.startElement("table", grid);
- getUtils().writeAttribute(writer, "id","GridDataNormal");
- getUtils().writeAttribute(writer, "cellpadding","0");
- getUtils().writeAttribute(writer, "cellspacing","0");
- getUtils().writeAttribute(writer, "style","position: absolute; left: 0px; top: 0px; display: block; width: 100%");
- writer.writeText("\n", null);
-
- renderColumns(context, grid, writer, false);
-
- writer.endElement("tbody");
- writer.endElement("table");
- writer.endElement(HTML.DIV_ELEM);
- // end of normal columns rendering
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(cellTemplate, column);
+ variables.setVariable("row_index",Integer.valueOf(state.getRowIndex()));
+ variables.setVariable("cell_index",Integer.valueOf(state.getCellIndex()));
+ cellTemplate.encodeBegin(context, column);
+ renderChildren(context, column);
+ cellTemplate.encodeEnd(context, column);
}
};
-
- private void renderColumns(FacesContext context, UIScrollableGrid grid,
- ResponseWriter writer,boolean isFrozenColumn
- ) throws IOException{
-
- for(int i = grid.getFirst(); i < grid.getRows(); i++ ){
-
- writer.startElement(HTML.TR_ELEMENT, grid);
- getUtils().writeAttribute(writer, "id","row_"+ i);
- getUtils().writeAttribute(writer, "class","ClientUI_Grid_BR");
-
- List kidz = grid.getChildren();
-
- int cellIndex = 0;
- boolean processFrozen = false;
-
- for (Iterator iter = kidz.iterator(); iter.hasNext();) {
- UIComponent child = (UIComponent) iter.next();
-
- if(child instanceof UIScrollableGridColumn){
- UIScrollableGridColumn column = (UIScrollableGridColumn)child;
- boolean frozen = ((Boolean)child.getAttributes().get("frozen")).booleanValue();
- if(isFrozenColumn){
- if(frozen){
- if(!processFrozen){
- cellIndex = 0;
- processFrozen = true;
- }
- renderCells(context, column, writer, cellIndex, i);
- }
-
- }else{
- if(!frozen){
- if(processFrozen){
- cellIndex = 0;
- processFrozen = false;
- }
- renderCells(context, column, writer, cellIndex,i);
- }
- }
- cellIndex++;
- }
- }
-
- writer.endElement(HTML.TR_ELEMENT);
- }
- }
-
- private void renderCells(FacesContext context, UIScrollableGridColumn column,
- ResponseWriter writer, int cellIndex, int rowIndex) throws IOException{
+
- writer.startElement(HTML.td_ELEM, column);
- getUtils().writeAttribute(writer, "id","c_"+ rowIndex + "_" + cellIndex);
- getUtils().writeAttribute(writer, "class","ClientUI_Grid_BC");
- writer.startElement(HTML.SPAN_ELEM, column);
- getUtils().writeAttribute(writer, "id","bc_"+ rowIndex + "_" + cellIndex);
- getUtils().writeAttribute(writer,"style",column.getAttributes().get("style"));
- getUtils().writeAttribute(writer,"class","ClientUI_Grid_BCBody");
- renderChild(context, column);
- writer.endElement(HTML.SPAN_ELEM);
- writer.endElement(HTML.td_ELEM);
-
- }
-
protected String getJavaScriptVarName(FacesContext context, UIScrollableGrid grid) {
String id = grid.getBaseClientId(context);
return "Richfaces_ScrollableGrid_" + id.replaceAll("[^A-Za-z0-9_]", "_");
@@ -188,8 +99,74 @@
protected void doEncodeChildren(ResponseWriter writer, FacesContext context,
UIComponent component) throws IOException {
+ if(component instanceof UIScrollableGrid){
+ renderGridBody(context, (UIScrollableGrid)component, writer);
+ }
+ }
+
+ public void renderGridBody(FacesContext context, UIScrollableGrid component,ResponseWriter writer) throws IOException{
- ColumnWalker.iterateOverBody(context, component, bodyRenderer, writer);
+ final UIScrollableGrid grid = component;
+
+ final GridRendererState state = GridRendererState.getRendererState(context);
+
+ writer.startElement(HTML.DIV_ELEM, grid);
+ getUtils().writeAttribute(writer, "class","GridDataColumns");
+ getUtils().writeAttribute(writer, "id","FrozenBox");
+ getUtils().writeAttribute(writer, "style","position: absolute; left: 0px; top: 0px; display: block; width: 100px");
+ writer.writeText("\n", null);
+ writer.startElement("table", grid);
+ getUtils().writeAttribute(writer, "id","GridDataFrozen");
+ getUtils().writeAttribute(writer, "cellpadding","0");
+ getUtils().writeAttribute(writer, "cellspacing","0");
+ getUtils().writeAttribute(writer, "style","position: absolute; left: 0px; top: 0px; display: block; width: 100%");
+ writer.writeText("\n", null);
+ writer.startElement("tbody", grid);
+
+ DataVisitor rowsRenderer = new DataVisitor(){
+
+ public void process(FacesContext context, Object rowIndex, Object argument) throws IOException {
+
+ int index = ((Integer)rowIndex).intValue();
+ state.setRowIndex(index);
+ grid.setRowKey(rowIndex);
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.TR_ELEMENT, grid);
+ getUtils().writeAttribute(writer, "id","row_"+ index);
+ getUtils().writeAttribute(writer, "class","ClientUI_Grid_BR");
+ ColumnWalker.iterateOverCells(context, grid, cellRenderer, writer, state);
+ writer.endElement(HTML.TR_ELEMENT);
+ }
+ };
+
+ state.set_isFrozenColumn(true);
+ grid.walk(context, rowsRenderer, state);
+
+ writer.endElement("tbody");
+ writer.endElement("table");
+ writer.endElement(HTML.DIV_ELEM);
+
+ writer.startElement(HTML.DIV_ELEM, grid);
+ getUtils().writeAttribute(writer, "class","GridDataColumns");
+ getUtils().writeAttribute(writer, "id","NormalBox");
+ getUtils().writeAttribute(writer, "style","position: absolute; left: 300px; top: 0px; display: block; width: 700px");
+ writer.writeText("\n", null);
+ writer.startElement("table", grid);
+ getUtils().writeAttribute(writer, "id","GridDataNormal");
+ getUtils().writeAttribute(writer, "cellpadding","0");
+ getUtils().writeAttribute(writer, "cellspacing","0");
+ getUtils().writeAttribute(writer, "style","position: absolute; left: 0px; top: 0px; display: block; width: 100%");
+ writer.writeText("\n", null);
+
+ state.set_isFrozenColumn(false);
+ grid.walk(context, rowsRenderer, state);
+
+ writer.endElement("tbody");
+ writer.endElement("table");
+ writer.endElement(HTML.DIV_ELEM);
+
+
+
}
public void renderHeaders(FacesContext context, UIComponent component
@@ -206,6 +183,15 @@
ColumnWalker.iterateOverHeadersFooters(context, component, footerRenderer, writer);
}
+ public void setUpState(FacesContext context, UIScrollableGrid grid) {
+ GridRendererState.createState(context, grid);
+ }
+
+ public void tearDownState(FacesContext context){
+ GridRendererState.restoreState(context);
+ }
+
+
// for benchmark
public void encodeBegin(FacesContext context, UIComponent component
) throws IOException {
Deleted: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridRendererState.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridRendererState.java 2007-05-08 17:56:05 UTC (rev 698)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridRendererState.java 2007-05-08 17:56:17 UTC (rev 699)
@@ -1,398 +0,0 @@
-/**
- *
- */
-package org.richfaces.renderkit.html;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.FacesException;
-import javax.faces.component.NamingContainer;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.ajax.AjaxContainer;
-import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
-import org.richfaces.component.UIScrollableGrid;
-
-/**
- * bean to store current {@link com.exadel.vcp.components.datagrid.UIDataGrid } information
- * in request map. For nested grids, it support push/pop state saving.
- * In {@link javax.faces.render.Renderer#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)} method
- * must be created instance of this bean , or, if it already exist in request map - push information.
- * at the end of encodeEnd call, bean must be pop information or removed.
- * @author shura
- *
- */
-public class ScrollableGridRendererState implements Serializable {
-
- public static final String DATA_GRID_RENDERER_STATE = ScrollableGridRendererState.class.getName();
-
- private int _rowIndex = 0;
-
- private int _cellIndex = 0;
-
- private int _columns = 0;
-
- private UIScrollableGrid _grid;
-
- private String _cachedClientId;
-
- private ScrollableGridRendererState _previousState = null;
-
- private AjaxContainer _region = null;
-
- private boolean _rowSelected;
-
- private Object rowKey;
-
- private String prefix;
-
- private String selectedClass;
- private String activeClass;
- private String focusedClass;
- private String resizerClass;
-
- private String [] columnClasses;
- private String [] rowClasses;
- private String [] headerColumnClasses;
-
-
- /**
- *
- */
- private static final long serialVersionUID = 2129605586975025578L;
-
- private Set _renderedAreas = null;
-
-
- /**
- * Get current grid state from JSF context
- * @param context
- * @return current data grid state, or null if not saved.
- */
- public static ScrollableGridRendererState getRendererState(FacesContext context) throws FacesException {
- if(null == context){
- throw new NullPointerException("Context for grid state is null");
- }
- ScrollableGridRendererState state = (ScrollableGridRendererState) context.getExternalContext().getRequestMap().get(DATA_GRID_RENDERER_STATE);
-// if( null == state){
-// throw new FacesException("State for current grid not stored in context");
-// }
- return state;
- }
-
- /**
- * Create new state for current grid. If state exist, store previsius in field of created.
- * @param context
- * @param grid
- * @return new state for grid.
- */
- public static ScrollableGridRendererState createState(FacesContext context, UIScrollableGrid grid){
- if(null == context){
- throw new NullPointerException("Context for grid state is null");
- }
- ScrollableGridRendererState oldState = getRendererState(context);
- ScrollableGridRendererState state = new ScrollableGridRendererState(context,oldState,grid);
- context.getExternalContext().getRequestMap().put(DATA_GRID_RENDERER_STATE,state);
- return state;
- }
-
- /**
- * Restore previsius state for gred, or clear request parameter.
- * @param context
- */
- public static void restoreState(FacesContext context) {
- if (null == context) {
- throw new NullPointerException("Context for grid state is null");
- }
- ScrollableGridRendererState state = getRendererState(context);
- if (null == state) {
- throw new FacesException(
- "State for current grid not saved in context");
- }
- ScrollableGridRendererState previsiosState = state.getPreviousState();
- if (null != previsiosState) {
- context.getExternalContext().getRequestMap().put(DATA_GRID_RENDERER_STATE,
- previsiosState);
- } else {
- context.getExternalContext().getRequestMap().remove(DATA_GRID_RENDERER_STATE);
- }
- }
- /**
- * Create state for current grig ( and store previsios state in field ).
- * @param previsiosState
- */
- public ScrollableGridRendererState(FacesContext context, ScrollableGridRendererState previsiosState, UIScrollableGrid grid) {
- super();
- _grid = grid;
- _cachedClientId = grid.getClientId(context);
- _previousState = previsiosState;
- if(AjaxRendererUtils.isAjaxRequest(context)){
-// _region = AjaxRendererUtils.getSubmittedAjaxContainer(context,null);
-// if(null != _region){
-// _renderedAreas = (Set) _region.getAjaxRenderedAreas();
-// }
- }
-
- Map attrs = grid.getAttributes();
-// activeClass = (String) attrs.get("activeClass");
-// selectedClass = (String) attrs.get("selectedClass");
-// if (selectedClass == null) {
-// selectedClass = DataGridBaseRenderer.DEAFAULT_SELECTED_CLASS;
-// }
-//
-// rowClasses = DataGridUtil.getAttributeArray((String) attrs.get("rowClasses"));
-// columnClasses = DataGridUtil.getAttributeArray((String) attrs.get("columnClasses"));
-// headerColumnClasses = DataGridUtil.getAttributeArray((String) attrs.get("headerColumnClasses"));
-//
-// if (headerColumnClasses.length == 0) {
-// headerColumnClasses = DataGridBaseRenderer.DEAFAULT_HEADER_COLUMN_CLASSES;
-// }
-//
-// resizerClass = (String) attrs.get("resizerClass");
-//
-// prefix = DataGridUtil.getClassPrefix(context, grid);
- }
-
-
- /**
- * Append id of AJAX rendered area to current set ( if possible )
- * @param id
- */
-// public void addAjaxArea(String id){
-// if(null != _renderedAreas){
-// _renderedAreas.add(id);
-// }
-// }
-
- /**
- * Remove id of AJAX rendered area from current set ( if possible )
- * @param id
- */
-// public void removeAjaxArea(String id){
-// if(null != _renderedAreas){
-// _renderedAreas.remove(id);
-// }
-// }
-
- public String getCurrentCellId(FacesContext context){
- return getGrid().getClientId(context)+NamingContainer.SEPARATOR_CHAR+"row"+getRowIndex()+
- NamingContainer.SEPARATOR_CHAR+"col"+getCellIndex();
- }
-
- /**
- * @return Returns the cellIndex.
- */
- public int getCellIndex() {
- return _cellIndex;
- }
-
- /**
- * @param cellIndex The cellIndex to set.
- */
- public void setCellIndex(int cellIndex) {
- _cellIndex = cellIndex;
- }
-
- /**
- * Increment cells counter
- * @return next cell number.
- */
-
- public int nextCell(){
- return ++_cellIndex;
- }
-
-
- /**
- * @return Returns the columns.
- */
- public int getColumns() {
- return _columns;
- }
-
- /**
- * @param columns The columns to set.
- */
- public void setColumns(int columns) {
- _columns = columns;
- }
-
- /**
- * @return Returns the grid.
- */
- public UIScrollableGrid getGrid() {
- return _grid;
- }
-
- /**
- * @param grid The grid to set.
- */
- public void setGrid(UIScrollableGrid grid) {
- _grid = grid;
- }
-
- /**
- * @return Returns the previsiosState.
- */
- public ScrollableGridRendererState getPreviousState() {
- return _previousState;
- }
-
- /**
- * @param previsiosState The previsiosState to set.
- */
- public void setPreviousState(ScrollableGridRendererState previsiosState) {
- _previousState = previsiosState;
- }
-
- /**
- * @return Returns the rowIndex.
- */
- public int getRowIndex() {
- return _rowIndex;
- }
-
- /**
- * Increment current row counter.
- * @return new row number.
- */
- public int nextRow(){
- return ++_rowIndex;
- }
-
- /**
- * @param rowIndex The rowIndex to set.
- */
- public void setRowIndex(int rowIndex) {
- _rowIndex = rowIndex;
- }
-
-
- public String getColumnClientId(FacesContext context) {
- return getGrid().getClientId(context) + NamingContainer.SEPARATOR_CHAR + "_col" + getCellIndex();
- }
-
- /**
- * @return the _cachedClientId
- */
- public String getCachedClientId() {
- return _cachedClientId;
- }
-
-
- private StringBuffer buffer = new StringBuffer();
-
- /**
- * @return the buffer
- */
- public StringBuffer getBuffer() {
- buffer.setLength(0);
- return buffer;
- }
-
- public String getColumnWidthInputId() {
- return
- getBuffer()
- .append(prefix)
- .append("col_")
- .append(getCellIndex())
- .append("_width")
- .toString();
- }
-
- public String getColumnHeaderCellId() {
- return
- getBuffer()
- .append(getCachedClientId())
- .append(NamingContainer.SEPARATOR_CHAR)
- .append("header")
- .append(NamingContainer.SEPARATOR_CHAR)
- .append(getCellIndex())
- .toString();
- }
- public String getBodyCellId() {
- return
- getBuffer()
- .append(getCachedClientId())
- .append(NamingContainer.SEPARATOR_CHAR)
- .append("body")
- .append(NamingContainer.SEPARATOR_CHAR)
- .append(getRowKey())
- .append(NamingContainer.SEPARATOR_CHAR)
- .append(getCellIndex())
- .toString();
- }
-
- public String getColumnClass() {
- return "col_" + getCellIndex();
- }
-
- /**
- * @return the _rowSelected
- */
- public boolean isRowSelected() {
- return _rowSelected;
- }
-
- /**
- * @param selected the _rowSelected to set
- */
- public void setRowSelected(boolean selected) {
- _rowSelected = selected;
- }
-
- /**
- * @return the rowKey
- */
- public Object getRowKey() {
- return rowKey;
- }
-
- /**
- * @param rowKey the rowKey to set
- */
- public void setRowKey(Object rowKey) {
- this.rowKey = rowKey;
- }
-
- public String getRowClass() {
-// return getBuffer()
-// .append(DataGridUtil.getAttributeValue(rowClasses, getRowIndex()))
-// .append(" ")
-// .append(isRowSelected() ? selectedClass : "")
-// .toString();
- return null;
- }
-
- public String getCellClass() {
- return null;
-// getBuffer()
-// .append(DataGridUtil.getAttributeValue(columnClasses, _cellIndex))
-// .toString();
-
- }
-
- public String getHeaderCellClass() {
- return null;
-// getBuffer()
-// .append(DataGridUtil.getAttributeValue(headerColumnClasses, _cellIndex))
-// .toString();
-
- }
-
- /**
- * @return the resizerClass
- */
- public String getResizerClass() {
- return resizerClass;
- }
-
- /**
- * @param resizerClass the resizerClass to set
- */
- public void setResizerClass(String resizerClass) {
- this.resizerClass = resizerClass;
- }
-}
17 years, 7 months
JBoss Rich Faces SVN: r698 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:56:05 -0400 (Tue, 08 May 2007)
New Revision: 698
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-05-08 17:55:57 UTC (rev 697)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-05-08 17:56:05 UTC (rev 698)
@@ -11,10 +11,11 @@
component="javax.faces.component.UIComponent"
>
- <span id="c_#{cellId}" style="overflow: hidden; white-space: nowrap; position: absolute; z-index: 28; width: 152px; height: 25px; left: 0px;" class="ClientUI_Grid_BC">
- <span id="bc_#{cellId}" style="overflow: hidden; white-space: nowrap; position: relative; display: block; width: 142px; height: 19px; vertical-align: middle; text-align: center;" class="ClientUI_Grid_BCBody">
+ <td id="c_#{row_index}_#{cell_index}" class="ClientUI_Grid_BC">
+ <span id="bc_#{row_index}_#{cell_index}" style="#{component.attributes['style']}" class="ClientUI_Grid_BCBody">
<vcp:body/>
</span>
- </span>
+ </td>
+
</f:root>
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r697 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:55:57 -0400 (Tue, 08 May 2007)
New Revision: 697
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-05-08 17:55:49 UTC (rev 696)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-05-08 17:55:57 UTC (rev 697)
@@ -11,6 +11,8 @@
baseclass="org.richfaces.renderkit.html.ScrollableGridBaseRenderer"
component="org.richfaces.component.UIScrollableGrid"
>
+
+ <f:call name="setUpState"/>
<h:styles>
/org/richfaces/renderkit/html/css/grid.xcss
@@ -20,6 +22,8 @@
new org.ajax4jsf.framework.resource.PrototypeScript(),
/org/richfaces/renderkit/html/scripts/scrollable-grid.js
</h:scripts>
+
+
<script type="text/javascript">
//<![CDATA[
@@ -129,6 +133,10 @@
</table>
</div>
</div>
+ <f:clientId var="clientId" />
+ <c:set var="inputType" value="hidden"/>
+ <input type="#{inputType}" name="#{clientId}_range" id="#{clientId}_range"/>
+ <f:call name="tearDownState"/>
</f:root>
17 years, 7 months
JBoss Rich Faces SVN: r696 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:55:49 -0400 (Tue, 08 May 2007)
New Revision: 696
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/StringBuilder.js
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/StringBuilder.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/StringBuilder.js 2007-05-08 17:55:40 UTC (rev 695)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/StringBuilder.js 2007-05-08 17:55:49 UTC (rev 696)
@@ -18,11 +18,8 @@
StringBuilder = Class.create({
CLASSDEF: {
name: 'StringBuilder'
- }
+ },
-});
-
-Object.extend(StringBuilder.prototype, {
length: 0,
// private
@@ -47,7 +44,8 @@
// reset cache
this._string = null;
return this;
- },
+ },
+
toString: function () {
if (this._string != null)
return this._string;
@@ -59,6 +57,6 @@
return this._string = s;
}
-})
+});
17 years, 7 months