You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by aw...@apache.org on 2006/06/30 21:54:23 UTC
svn commit: r418389 - in
/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model:
BaseMenuModel.java MenuModel.java
Author: awiner
Date: Fri Jun 30 14:54:23 2006
New Revision: 418389
URL: http://svn.apache.org/viewvc?rev=418389&view=rev
Log:
ADFFACES-40: Doc bug in BaseMenuModel. Thanks to Matt Cooper for the patch.
Modified:
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/BaseMenuModel.java
incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/MenuModel.java
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/BaseMenuModel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/BaseMenuModel.java?rev=418389&r1=418388&r2=418389&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/BaseMenuModel.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/BaseMenuModel.java Fri Jun 30 14:54:23 2006
@@ -13,105 +13,105 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.myfaces.adf.model;
-
-
-/**
- * A base class which takes a TreeModel. Developers can extend this class and
- * just override the getFocusPath() method.
- *
- * @author The Oracle ADF Faces Team
- */
-public abstract class BaseMenuModel extends MenuModel
-{
-
- /**
- *
- * @param modelObject the treeModel to use, this object will be passed to
- * {@link ModelUtils#toTreeModel}.
- */
- public BaseMenuModel(Object modelObject)
- {
- _treeModel = ModelUtils.toTreeModel(modelObject);
- }
-
- /**
- * no-arg constructor needed for managed-bean support.
- * {@link #setWrappedData} must be called soon after constructing this
- * instance.
- */
- protected BaseMenuModel()
- {
- }
-
- public Object getContainerRowKey(Object childKey)
- {
- return _treeModel.getContainerRowKey(childKey);
- }
-
- public void enterContainer()
- {
- _treeModel.enterContainer();
- }
-
- public void exitContainer()
- {
- _treeModel.exitContainer();
- }
-
- public int getRowCount()
- {
- return _treeModel.getRowCount();
- }
-
- public Object getRowData()
- {
- return _treeModel.getRowData();
- }
-
- public int getRowIndex()
- {
- return _treeModel.getRowIndex();
- }
-
- public Object getRowKey()
- {
- return _treeModel.getRowKey();
- }
-
- public Object getWrappedData()
- {
- // since we don't know how to adapt an ordinary POJO into a
- // treeModel, the wrappedData itself is a treeModel. so just return it:
- return _treeModel;
- }
-
- public boolean isContainer()
- {
- return _treeModel.isContainer();
- }
-
- public boolean isRowAvailable()
- {
- return _treeModel.isRowAvailable();
- }
-
- public void setRowIndex(int index)
- {
- _treeModel.setRowIndex(index);
- }
-
- public void setRowKey(Object key)
- {
- _treeModel.setRowKey(key);
- }
-
- public void setWrappedData(Object data)
- {
- // since we don't know how to adapt an ordinary POJO into a
- // treeModel, the ModelUtils call is currently no-op:
- _treeModel = ModelUtils.toTreeModel(data);
- }
-
- private TreeModel _treeModel = null;
-}
+package org.apache.myfaces.adf.model;
+
+
+/**
+ * A base class which takes a TreeModel. Developers can extend this class and
+ * just override the getFocusRowKey() method.
+ *
+ * @author The Oracle ADF Faces Team
+ */
+public abstract class BaseMenuModel extends MenuModel
+{
+
+ /**
+ *
+ * @param modelObject the treeModel to use, this object will be passed to
+ * {@link ModelUtils#toTreeModel}.
+ */
+ public BaseMenuModel(Object modelObject)
+ {
+ _treeModel = ModelUtils.toTreeModel(modelObject);
+ }
+
+ /**
+ * no-arg constructor needed for managed-bean support.
+ * {@link #setWrappedData} must be called soon after constructing this
+ * instance.
+ */
+ protected BaseMenuModel()
+ {
+ }
+
+ public Object getContainerRowKey(Object childKey)
+ {
+ return _treeModel.getContainerRowKey(childKey);
+ }
+
+ public void enterContainer()
+ {
+ _treeModel.enterContainer();
+ }
+
+ public void exitContainer()
+ {
+ _treeModel.exitContainer();
+ }
+
+ public int getRowCount()
+ {
+ return _treeModel.getRowCount();
+ }
+
+ public Object getRowData()
+ {
+ return _treeModel.getRowData();
+ }
+
+ public int getRowIndex()
+ {
+ return _treeModel.getRowIndex();
+ }
+
+ public Object getRowKey()
+ {
+ return _treeModel.getRowKey();
+ }
+
+ public Object getWrappedData()
+ {
+ // since we don't know how to adapt an ordinary POJO into a
+ // treeModel, the wrappedData itself is a treeModel. so just return it:
+ return _treeModel;
+ }
+
+ public boolean isContainer()
+ {
+ return _treeModel.isContainer();
+ }
+
+ public boolean isRowAvailable()
+ {
+ return _treeModel.isRowAvailable();
+ }
+
+ public void setRowIndex(int index)
+ {
+ _treeModel.setRowIndex(index);
+ }
+
+ public void setRowKey(Object key)
+ {
+ _treeModel.setRowKey(key);
+ }
+
+ public void setWrappedData(Object data)
+ {
+ // since we don't know how to adapt an ordinary POJO into a
+ // treeModel, the ModelUtils call is currently no-op:
+ _treeModel = ModelUtils.toTreeModel(data);
+ }
+
+ private TreeModel _treeModel = null;
+}
Modified: incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/MenuModel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/MenuModel.java?rev=418389&r1=418388&r2=418389&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/MenuModel.java (original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-api/src/main/java/org/apache/myfaces/adf/model/MenuModel.java Fri Jun 30 14:54:23 2006
@@ -13,38 +13,38 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.myfaces.adf.model;
-
-/**
- * A MenuModel objects represents the menu structure of a page or application.
- * The menu model should know how to go from the current viewId to a focus rowKey.
- * <p>
- * MenuModel extends TreeModel and adds a single method,
- * getFocusRowKey(), which returns the rowKey of the focus page for the current view id.
- * <p>
- * Work on modeling menus continues and it is very possible that this class
- * will change in a future release.
- *
- * @author The Oracle ADF Faces Team
- */
-public abstract class MenuModel extends TreeModel
-{
- /**
- * Gets the focus rowKey for the current viewId.
- * If there is no item
- * in focus, getFocusRowKey should return null.
- * </p>
- * <p>The value returned from calling {@link #getRowKey} should remain the
- * same before and after calling getFocusRowKey().
- * Meaning initialPath and currPath should
- * always be equal in the following example
- * <pre><code>
- * Object initialPath = model.getRowKey();
- * Object focusPath = model.getFocusRowKey();
- * Object currPath = model.getRowKey();
- * </code></pre>
- * </p>
- * @return the focus rowKey for the current viewId
- */
- public abstract Object getFocusRowKey();
+package org.apache.myfaces.adf.model;
+
+/**
+ * A MenuModel objects represents the menu structure of a page or application.
+ * The menu model should know how to go from the current viewId to a focus rowKey.
+ * <p>
+ * MenuModel extends TreeModel and adds a single method,
+ * getFocusRowKey(), which returns the rowKey of the focus page for the current view id.
+ * <p>
+ * Work on modeling menus continues and it is very possible that this class
+ * will change in a future release.
+ *
+ * @author The Oracle ADF Faces Team
+ */
+public abstract class MenuModel extends TreeModel
+{
+ /**
+ * Gets the focus rowKey for the current viewId.
+ * If there is no item
+ * in focus, getFocusRowKey should return null.
+ * </p>
+ * <p>The value returned from calling {@link #getRowKey} should remain the
+ * same before and after calling getFocusRowKey().
+ * Meaning initialPath and currPath should
+ * always be equal in the following example
+ * <pre><code>
+ * Object initialPath = model.getRowKey();
+ * Object focusPath = model.getFocusRowKey();
+ * Object currPath = model.getRowKey();
+ * </code></pre>
+ * </p>
+ * @return the focus rowKey for the current viewId
+ */
+ public abstract Object getFocusRowKey();
}