[richfaces-svn-commits] JBoss Rich Faces SVN: r1222 - trunk/richfaces/tree/src/main/java/org/richfaces/component/state.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Tue Jun 19 10:49:55 EDT 2007
Author: nbelaevski
Date: 2007-06-19 10:49:55 -0400 (Tue, 19 Jun 2007)
New Revision: 1222
Added:
trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeStateAdvisor.java
Log:
TreeStateAdvisor.java initial commit
Added: trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeStateAdvisor.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeStateAdvisor.java (rev 0)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeStateAdvisor.java 2007-06-19 14:49:55 UTC (rev 1222)
@@ -0,0 +1,60 @@
+/**
+ * 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.state;
+
+import org.richfaces.component.UITree;
+
+
+/**
+ * @author Nick Belaevski - mailto:nbelaevski at exadel.com
+ * created 19.06.2007
+ *
+ * This interface is intended to "advising" changes to tree state. Tree component should queue user-provided
+ * instance of the interface for changes during RENDER_RESPONSE phase. Changes advised by user should be
+ * immediately applied. Advisor methods are provided with {@link UITree} component instance to queue current
+ * tree state.
+ */
+public interface TreeStateAdvisor {
+ /**
+ * Advises new node opened/closed state
+ * @param tree {@link UITree} component state to queue state
+ * @return
+ * <ul>
+ * <li><code>null</code> if changes are not needed</li>
+ * <li>{@link Boolean#TRUE} to advise node to be opened</li>
+ * <li>{@link Boolean#FALSE} to advise node to be closed</li>
+ * </ul>
+ */
+ public Boolean adviseNodeOpened(UITree tree);
+
+ /**
+ * Advises new node selection
+ * @param tree {@link UITree} component state to queue state
+ * @return
+ * <ul>
+ * <li><code>null</code> if changes are not needed</li>
+ * <li>{@link Boolean#TRUE} to advise current node to be selected</li>
+ * <li>{@link Boolean#FALSE} to advise current node to be unselected</li>
+ * </ul>
+ */
+ public Boolean adviseNodeSelected(UITree tree);
+}
More information about the richfaces-svn-commits
mailing list