JBoss Rich Faces SVN: r927 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-05-29 07:56:52 -0400 (Tue, 29 May 2007)
New Revision: 927
Modified:
trunk/docs/userguide/en/included/dropSupport.desc.xml
Log:
Key Features
Modified: trunk/docs/userguide/en/included/dropSupport.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/dropSupport.desc.xml 2007-05-29 11:22:02 UTC (rev 926)
+++ trunk/docs/userguide/en/included/dropSupport.desc.xml 2007-05-29 11:56:52 UTC (rev 927)
@@ -22,4 +22,21 @@
</mediaobject>
</figure>
</section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem>
+ <para>Encodes all necessary JavaScript to perform drop actions</para>
+ </listitem>
+
+ <listitem>
+ <para>Can be used within any component type that provides the required properties for drop operations</para>
+ </listitem>
+
+ <listitem>
+ <para>Built-in Ajax processing</para>
+ </listitem>
+
+ </itemizedlist>
+ </section>
</section>
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r926 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-05-29 07:22:02 -0400 (Tue, 29 May 2007)
New Revision: 926
Modified:
trunk/docs/userguide/en/included/dragSupport.desc.xml
Log:
description
Modified: trunk/docs/userguide/en/included/dragSupport.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/dragSupport.desc.xml 2007-05-29 11:18:55 UTC (rev 925)
+++ trunk/docs/userguide/en/included/dragSupport.desc.xml 2007-05-29 11:22:02 UTC (rev 926)
@@ -8,7 +8,7 @@
<section>
<title>Description</title>
<para>This component defines a subtree of the component tree as draggable
- for drag-and-drop operations. Within such a "drag zone," a user can click
+ for drag-and-drop operations. Within such a "drag zone," you can click
the mouse button on an item and drag it to any component that supports drop
operations (a "drop zone"). It encodes all the necessary JavaScript for
supporting drag-and-drop operations.</para>
17 years, 7 months
JBoss Rich Faces SVN: r925 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-05-29 07:18:55 -0400 (Tue, 29 May 2007)
New Revision: 925
Modified:
trunk/docs/userguide/en/included/tree.desc.xml
Log:
Key Features
Modified: trunk/docs/userguide/en/included/tree.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/tree.desc.xml 2007-05-29 11:18:06 UTC (rev 924)
+++ trunk/docs/userguide/en/included/tree.desc.xml 2007-05-29 11:18:55 UTC (rev 925)
@@ -20,5 +20,26 @@
</section>
<section>
<title>Key Features</title>
+ <itemizedlist>
+ <listitem>
+ <para>Highly customizable look-and-feel</para>
+ </listitem>
+
+ <listitem>
+ <para>Built-in drag and drop support</para>
+ </listitem>
+
+ <listitem>
+ <para>Built-in Ajax processing</para>
+ </listitem>
+
+ <listitem>
+ <para>Support of template sets for different node types</para>
+ </listitem>
+
+ <listitem>
+ <para>Support of several root elements in a tree</para>
+ </listitem>
+ </itemizedlist>
</section>
</section>
17 years, 7 months
JBoss Rich Faces SVN: r924 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-05-29 07:18:06 -0400 (Tue, 29 May 2007)
New Revision: 924
Modified:
trunk/docs/userguide/en/included/gmap.desc.xml
Log:
Key Features
Modified: trunk/docs/userguide/en/included/gmap.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/gmap.desc.xml 2007-05-29 10:42:07 UTC (rev 923)
+++ trunk/docs/userguide/en/included/gmap.desc.xml 2007-05-29 11:18:06 UTC (rev 924)
@@ -21,7 +21,7 @@
<title>Key Features</title>
<itemizedlist>
<listitem>Presents all the google <property>map</property> functional</listitem>
- <listitem>Highly customizable through attributes</listitem>
+ <listitem>Highly customizable via attributes</listitem>
<listitem>No developers JavaScript writing needed to use on the pages</listitem>
</itemizedlist>
</section>
17 years, 7 months
JBoss Rich Faces SVN: r923 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 06:42:07 -0400 (Tue, 29 May 2007)
New Revision: 923
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-29 10:36:33 UTC (rev 922)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-29 10:42:07 UTC (rev 923)
@@ -19,7 +19,6 @@
import org.ajax4jsf.ajax.repeat.DataComponentState;
import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.ajax.repeat.Range;
-import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
import org.ajax4jsf.ajax.repeat.UIRepeat;
import org.ajax4jsf.framework.ajax.AjaxComponent;
import org.ajax4jsf.framework.ajax.AjaxContext;
@@ -27,7 +26,7 @@
import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.event.sort.SortEvent;
import org.richfaces.model.BufferedSequenceRange;
-import org.richfaces.model.ScrollableGridDataModel2;
+import org.richfaces.model.ScrollableGridDataModel;
import org.richfaces.model.SortOrder;
import org.richfaces.model.visual.DefaultGridVisualModel;
import org.richfaces.model.visual.ScrollableGridVisualModel;
@@ -137,8 +136,8 @@
public void setSortOrder(SortOrder sortOrder) {
getVisualModel().setSortOrder(sortOrder);
Object value = getValue();
- if (value instanceof ScrollableGridDataModel2) {
- ScrollableGridDataModel2 gridDataModel = (ScrollableGridDataModel2) value;
+ if (value instanceof ScrollableGridDataModel) {
+ ScrollableGridDataModel gridDataModel = (ScrollableGridDataModel) value;
gridDataModel.setSortOrder(sortOrder);
}
}
@@ -259,34 +258,18 @@
boolean asc = true;
SortOrder sortOrder = getSortOrder();
- int oldSortColumn = -1;
- int newSortColumn = sortColumn;
-
+
if (sortOrder != null) {
- /**
- * toggle sort direction
- */
- oldSortColumn = sortOrder.getSortColumn();
+
if (sortOrder.getSortColumn() == sortColumn) {
asc = !sortOrder.isAscending();
}
+
}
SortOrder newSortOrder = new SortOrder(sortColumn, startRow, dataIndex, asc);
setSortOrder(newSortOrder);
resetDataModel();
-
-// setSelection(new CascadeSelection());
-// addRequestStateKey(SORT_EVENT);
- FacesContext context = getFacesContext();
-
-
-// TODO add to AjaxContext
-
-
-// if (log.isTraceEnabled()) {
-// log.trace("Sorting has changed " + sortOrder);
-// }
}
public void walk(FacesContext context, DataVisitor visitor, Object argument) throws IOException {
17 years, 7 months
JBoss Rich Faces SVN: r922 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 06:36:33 -0400 (Tue, 29 May 2007)
New Revision: 922
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java
Removed:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContext.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContextTask.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel2.java
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModelFeatures.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridRange.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModelFeatures.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModelFeatures.java 2007-05-29 10:35:38 UTC (rev 921)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridDataModelFeatures.java 2007-05-29 10:36:33 UTC (rev 922)
@@ -1,7 +1,5 @@
package org.richfaces.model;
-import java.util.Collection;
-
import org.richfaces.model.snapshot.ObjectLocator;
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridRange.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridRange.java 2007-05-29 10:35:38 UTC (rev 921)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/GridRange.java 2007-05-29 10:36:33 UTC (rev 922)
@@ -23,5 +23,4 @@
public void setSortOrder(SortOrder sortOrder) {
this.sortOrder = sortOrder;
}
-
}
Deleted: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContext.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContext.java 2007-05-29 10:35:38 UTC (rev 921)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContext.java 2007-05-29 10:36:33 UTC (rev 922)
@@ -1,54 +0,0 @@
-/*
- * Copyright
- * Copyright (c) Exadel,Inc. 2007
- * All rights reserved.
- *
- * History
- * $Source: /cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/model/ModelContext.java,v $
- * $Revision: 1.1 $
- */
-
-package org.richfaces.model;
-
-import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public class ModelContext {
-
- public class ModelState {
- Object rowKey;
- }
-
- private ExtendedDataModel model;
-
- public ModelContext(ExtendedDataModel model) {
- this.model = model;
- }
-
- public void executeInContext(ModelContextTask task) {
- ModelState modelState = createState();
- recordState(modelState, model);
-
-
- task.execute(model);
-
- replayState(modelState, model);
-
- }
-
- protected ModelState createState() {
- return new ModelState();
- }
-
- protected void recordState(ModelState modelState, ExtendedDataModel model) {
- modelState.rowKey = model.getRowKey();
- }
-
- protected void replayState(ModelState modelState, ExtendedDataModel model) {
- model.setRowKey(modelState.rowKey);
- }
-
-}
Deleted: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContextTask.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContextTask.java 2007-05-29 10:35:38 UTC (rev 921)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ModelContextTask.java 2007-05-29 10:36:33 UTC (rev 922)
@@ -1,8 +0,0 @@
-package org.richfaces.model;
-
-import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
-
-public interface ModelContextTask {
-
- public void execute(ExtendedDataModel model);
-}
Deleted: 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-29 10:35:38 UTC (rev 921)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java 2007-05-29 10:36:33 UTC (rev 922)
@@ -1,27 +0,0 @@
-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{
-
- public ScrollableGridDataModel(DataModel model) {
- super(model);
- }
-
-// public void createDataRange(GridVisualModel model){
-//
-// }
-
- public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) throws IOException {
- super.walk(context, visitor, range, argument);
- }
-
-
-}
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel.java 2007-05-29 10:36:33 UTC (rev 922)
@@ -0,0 +1,215 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/model/GridDataModel.java,v $
+ * $Revision: 1.14 $
+ */
+
+package org.richfaces.model;
+
+import java.io.IOException;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
+import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.ajax.repeat.SerializableDataModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.richfaces.component.UIDataGrid;
+import org.richfaces.model.snapshot.DataModelSnapshot;
+import org.richfaces.model.snapshot.ObjectLocator;
+
+
+
+/**
+ * To effectively use {@link UIDataGrid} component, a data model is to be
+ * defined.
+ *
+ * Data model to deal with underlying data source. Support for partial load of
+ * data window and sorting. Subclasses must implement
+ * {@link #createDataRange(int, int, SortOrder)} method. This class is mostly
+ * targetted to database fetches, where
+ * {@link #createDataRange(int, int, SortOrder)} method accesses underlying data
+ * source and wraps select result into DataRange object.
+ *
+ * <p>
+ * State saving/restore works as follows:
+ * </p>
+ * <ul>
+ * <li> If {@link #getObjectLocator()} call returns {@link ObjectLocator}
+ * instance, it is used to create a snapshot of model data with object
+ * identifiers instead of full-blown objects. Then the snapshot is saved within
+ * state, and on restore state ObjectLocator is employed to load objects by
+ * their ids. </li>
+ * <li> If there's no {@link ObjectLocator} instance, snapshot is not
+ * serialized. </li>
+ * </ul>
+ *
+ * @author Maksim Kaszynski
+ */
+public abstract class ScrollableGridDataModel extends ExtendedDataModel implements
+ GridDataModelFeatures {
+
+ private static final Log log = LogFactory.getLog(ScrollableGridDataModel.class);
+
+ private final class BearerSettings {
+ SortOrder sortOrder;
+ int startRow = -1;
+ int endRow = -1;
+ public BearerSettings(int startRow, int endRow, SortOrder sortOrder) {
+ super();
+ this.sortOrder = sortOrder;
+ this.startRow = startRow;
+ this.endRow = endRow;
+ }
+
+
+ }
+
+ private ObjectLocator objectLocator;
+
+ private SortOrder sortOrder;
+
+// private Selection selection;
+
+ private DataRange bearer;
+
+ private BearerSettings bearerSettings = null;
+
+ /**
+ * Create new {@link DataRange} - i.e. load a new data window from data
+ * base. Subclasses need to define this method - for example to get
+ * {ResultSet} from database, or ScrollableResult from hibernate.
+ *
+ * @param startRow
+ * @param endRow
+ * @param sortOrder
+ * @return
+ */
+ protected abstract DataRange createDataRange(int startRow, int endRow,
+ SortOrder sortOrder);
+
+ /**
+ * reset data range - we need to load a new one
+ *
+ */
+ public void reset() {
+ bearer = null;
+ sortOrder = null;
+// selection = null;
+ bearerSettings = null;
+ }
+
+ public void setObjectLocator(ObjectLocator objectLocator) {
+ this.objectLocator = objectLocator;
+ }
+
+ public ObjectLocator getObjectLocator() {
+ return objectLocator;
+ }
+
+ public Object getRowData() {
+ int index = getRowIndex();
+ log.debug("GridDataModel.getRowData() " + index );
+ if (index == -1) {
+ return null;
+ }
+
+ if (bearer == null && bearerSettings != null) {
+ bearer = createDataRange(bearerSettings.startRow,
+ bearerSettings.endRow, bearerSettings.sortOrder);
+ bearerSettings = null;
+ }
+
+ if (bearer == null || !bearer.hit(index)) {
+ bearer = createDataRange(index, index + 1, sortOrder);
+ }
+
+ return bearer.getRowData(index);
+ }
+
+ public void walk(final FacesContext context, final DataVisitor visitor,
+ final Range range, final Object argument) throws IOException {
+
+ int rowCount = getRowCount();
+
+ if (rowCount == 0) {
+ return;
+ }
+
+ GridRange sequenceRange = (GridRange) range;
+
+ sortOrder = sequenceRange.getSortOrder();
+
+ IterationBounds bounds = sequenceRange.getIterationBounds();
+
+ bearer = null;
+ bearerSettings = new BearerSettings(bounds.getStartRow(), bounds.getEndRow(), sortOrder);
+
+ try {
+ bounds.iterate(new IterationBounds.RowVisitor() {
+ public void visit(int rowIndex) {
+ Integer rowKey = new Integer(rowIndex);
+ try {
+ visitor.process(context, rowKey, argument);
+ } catch (IOException e) {
+ throw new IOExceptionWrapper(e);
+ }
+ }
+ });
+
+ } catch (IOExceptionWrapper e) {
+ throw e.getWrappedException();
+ }
+ }
+
+ public Object getRowKey() {
+ int rowIndex = getRowIndex();
+ if (rowIndex == -1) {
+ return null;
+ }
+ return new Integer(rowIndex);
+ }
+
+ public void setRowKey(Object key) {
+ if (key == null) {
+ setRowIndex(-1);
+ } else {
+ setRowIndex(((Integer) key).intValue());
+ }
+ }
+
+// public Collection getSelectedObjects() {
+// return SelectionExtractor.extractSelection(this);
+// }
+//
+// public void setSelection(Selection selection) {
+// this.selection = selection;
+// }
+//
+// public Selection getSelection() {
+// return selection;
+// }
+
+ public SerializableDataModel getSerializableModel(Range range) {
+ BufferedSequenceRange sequenceRange = (BufferedSequenceRange) range;
+ ObjectLocator locator = getObjectLocator();
+ if (locator != null) {
+ return new DataModelSnapshot(this, sequenceRange);
+ }
+ return super.getSerializableModel(range);
+ }
+
+ public SortOrder getSortOrder() {
+ return sortOrder;
+ }
+
+ public void setSortOrder(SortOrder sortOrder) {
+ this.sortOrder = sortOrder;
+ }
+}
\ No newline at end of file
Deleted: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel2.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel2.java 2007-05-29 10:35:38 UTC (rev 921)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/ScrollableGridDataModel2.java 2007-05-29 10:36:33 UTC (rev 922)
@@ -1,215 +0,0 @@
-/*
- * Copyright
- * Copyright (c) Exadel,Inc. 2006
- * All rights reserved.
- *
- * History
- * $Source: /cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/model/GridDataModel.java,v $
- * $Revision: 1.14 $
- */
-
-package org.richfaces.model;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
-import org.ajax4jsf.ajax.repeat.Range;
-import org.ajax4jsf.ajax.repeat.SerializableDataModel;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.richfaces.component.UIDataGrid;
-import org.richfaces.model.snapshot.DataModelSnapshot;
-import org.richfaces.model.snapshot.ObjectLocator;
-
-
-
-/**
- * To effectively use {@link UIDataGrid} component, a data model is to be
- * defined.
- *
- * Data model to deal with underlying data source. Support for partial load of
- * data window and sorting. Subclasses must implement
- * {@link #createDataRange(int, int, SortOrder)} method. This class is mostly
- * targetted to database fetches, where
- * {@link #createDataRange(int, int, SortOrder)} method accesses underlying data
- * source and wraps select result into DataRange object.
- *
- * <p>
- * State saving/restore works as follows:
- * </p>
- * <ul>
- * <li> If {@link #getObjectLocator()} call returns {@link ObjectLocator}
- * instance, it is used to create a snapshot of model data with object
- * identifiers instead of full-blown objects. Then the snapshot is saved within
- * state, and on restore state ObjectLocator is employed to load objects by
- * their ids. </li>
- * <li> If there's no {@link ObjectLocator} instance, snapshot is not
- * serialized. </li>
- * </ul>
- *
- * @author Maksim Kaszynski
- */
-public abstract class ScrollableGridDataModel2 extends ExtendedDataModel implements
- GridDataModelFeatures {
-
- private static final Log log = LogFactory.getLog(ScrollableGridDataModel2.class);
-
- private final class BearerSettings {
- SortOrder sortOrder;
- int startRow = -1;
- int endRow = -1;
- public BearerSettings(int startRow, int endRow, SortOrder sortOrder) {
- super();
- this.sortOrder = sortOrder;
- this.startRow = startRow;
- this.endRow = endRow;
- }
-
-
- }
-
- private ObjectLocator objectLocator;
-
- private SortOrder sortOrder;
-
-// private Selection selection;
-
- private DataRange bearer;
-
- private BearerSettings bearerSettings = null;
-
- /**
- * Create new {@link DataRange} - i.e. load a new data window from data
- * base. Subclasses need to define this method - for example to get
- * {ResultSet} from database, or ScrollableResult from hibernate.
- *
- * @param startRow
- * @param endRow
- * @param sortOrder
- * @return
- */
- protected abstract DataRange createDataRange(int startRow, int endRow,
- SortOrder sortOrder);
-
- /**
- * reset data range - we need to load a new one
- *
- */
- public void reset() {
- bearer = null;
- sortOrder = null;
-// selection = null;
- bearerSettings = null;
- }
-
- public void setObjectLocator(ObjectLocator objectLocator) {
- this.objectLocator = objectLocator;
- }
-
- public ObjectLocator getObjectLocator() {
- return objectLocator;
- }
-
- public Object getRowData() {
- int index = getRowIndex();
- log.debug("GridDataModel.getRowData() " + index );
- if (index == -1) {
- return null;
- }
-
- if (bearer == null && bearerSettings != null) {
- bearer = createDataRange(bearerSettings.startRow,
- bearerSettings.endRow, bearerSettings.sortOrder);
- bearerSettings = null;
- }
-
- if (bearer == null || !bearer.hit(index)) {
- bearer = createDataRange(index, index + 1, sortOrder);
- }
-
- return bearer.getRowData(index);
- }
-
- public void walk(final FacesContext context, final DataVisitor visitor,
- final Range range, final Object argument) throws IOException {
-
- int rowCount = getRowCount();
-
- if (rowCount == 0) {
- return;
- }
-
- GridRange sequenceRange = (GridRange) range;
-
- sortOrder = sequenceRange.getSortOrder();
-
- IterationBounds bounds = sequenceRange.getIterationBounds();
-
- bearer = null;
- bearerSettings = new BearerSettings(bounds.getStartRow(), bounds.getEndRow(), sortOrder);
-
- try {
- bounds.iterate(new IterationBounds.RowVisitor() {
- public void visit(int rowIndex) {
- Integer rowKey = new Integer(rowIndex);
- try {
- visitor.process(context, rowKey, argument);
- } catch (IOException e) {
- throw new IOExceptionWrapper(e);
- }
- }
- });
-
- } catch (IOExceptionWrapper e) {
- throw e.getWrappedException();
- }
- }
-
- public Object getRowKey() {
- int rowIndex = getRowIndex();
- if (rowIndex == -1) {
- return null;
- }
- return new Integer(rowIndex);
- }
-
- public void setRowKey(Object key) {
- if (key == null) {
- setRowIndex(-1);
- } else {
- setRowIndex(((Integer) key).intValue());
- }
- }
-
-// public Collection getSelectedObjects() {
-// return SelectionExtractor.extractSelection(this);
-// }
-//
-// public void setSelection(Selection selection) {
-// this.selection = selection;
-// }
-//
-// public Selection getSelection() {
-// return selection;
-// }
-
- public SerializableDataModel getSerializableModel(Range range) {
- BufferedSequenceRange sequenceRange = (BufferedSequenceRange) range;
- ObjectLocator locator = getObjectLocator();
- if (locator != null) {
- return new DataModelSnapshot(this, sequenceRange);
- }
- return super.getSerializableModel(range);
- }
-
- public SortOrder getSortOrder() {
- return sortOrder;
- }
-
- public void setSortOrder(SortOrder sortOrder) {
- this.sortOrder = sortOrder;
- }
-}
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r920 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/impl.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 06:35:16 -0400 (Tue, 29 May 2007)
New Revision: 920
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/impl/SequenceDataModelExt.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/impl/SequenceDataModelExt.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/impl/SequenceDataModelExt.java 2007-05-29 10:34:56 UTC (rev 919)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/impl/SequenceDataModelExt.java 2007-05-29 10:35:16 UTC (rev 920)
@@ -14,7 +14,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.richfaces.model.ScrollableGridDataModel2;
+import org.richfaces.model.ScrollableGridDataModel;
import org.richfaces.model.SortOrder;
@@ -23,7 +23,7 @@
* @author Maksim Kaszynski
*
*/
-public abstract class SequenceDataModelExt extends ScrollableGridDataModel2 {
+public abstract class SequenceDataModelExt extends ScrollableGridDataModel {
private transient Map comparators;
17 years, 7 months
JBoss Rich Faces SVN: r919 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/snapshot.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 06:34:56 -0400 (Tue, 29 May 2007)
New Revision: 919
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/snapshot/DataModelSnapshot.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/snapshot/DataModelSnapshot.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/snapshot/DataModelSnapshot.java 2007-05-29 10:32:40 UTC (rev 918)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/model/snapshot/DataModelSnapshot.java 2007-05-29 10:34:56 UTC (rev 919)
@@ -28,7 +28,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.model.BufferedSequenceRange;
-import org.richfaces.model.ScrollableGridDataModel2;
+import org.richfaces.model.ScrollableGridDataModel;
import org.richfaces.model.GridDataModelFeatures;
import org.richfaces.model.GridRange;
import org.richfaces.model.IOExceptionWrapper;
@@ -64,7 +64,7 @@
public DataModelSnapshot() {
}
- public DataModelSnapshot(final ScrollableGridDataModel2 model,
+ public DataModelSnapshot(final ScrollableGridDataModel model,
BufferedSequenceRange range) {
locator = model.getObjectLocator();
17 years, 7 months
JBoss Rich Faces SVN: r918 - trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 06:32:40 -0400 (Tue, 29 May 2007)
New Revision: 918
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel.java
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel.java 2007-05-29 10:32:05 UTC (rev 917)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/ChannelDataModel.java 2007-05-29 10:32:40 UTC (rev 918)
@@ -18,7 +18,7 @@
import org.richfaces.demo.datagrid.model.Channel;
import org.richfaces.demo.datagrid.model.Issue;
import org.richfaces.model.DataRange;
-import org.richfaces.model.ScrollableGridDataModel2;
+import org.richfaces.model.ScrollableGridDataModel;
import org.richfaces.model.SortOrder;
import org.richfaces.model.snapshot.ObjectLocator;
@@ -28,7 +28,7 @@
* @author Maksim Kaszynski
*
*/
-public class ChannelDataModel extends ScrollableGridDataModel2 {
+public class ChannelDataModel extends ScrollableGridDataModel {
/**
* Data range implementation. Wraps query result
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java 2007-05-29 10:32:05 UTC (rev 917)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java 2007-05-29 10:32:40 UTC (rev 918)
@@ -14,7 +14,7 @@
import org.richfaces.demo.datagrid.model.Channel;
import org.richfaces.demo.datagrid.model.Issue;
-import org.richfaces.model.ScrollableGridDataModel2;
+import org.richfaces.model.ScrollableGridDataModel;
import org.richfaces.model.visual.ScrollableGridVisualModel;
@@ -26,7 +26,7 @@
private ScrollableGridVisualModel visualModel;
- private ScrollableGridDataModel2 dataModel;
+ private ScrollableGridDataModel dataModel;
private Channel channel;
@@ -35,11 +35,11 @@
private int id;
- public ScrollableGridDataModel2 getDataModel() {
+ public ScrollableGridDataModel getDataModel() {
return dataModel;
}
- public void setDataModel(ScrollableGridDataModel2 dataModel) {
+ public void setDataModel(ScrollableGridDataModel dataModel) {
this.dataModel = dataModel;
}
17 years, 7 months