Author: abelevich
Date: 2010-04-06 12:07:37 -0400 (Tue, 06 Apr 2010)
New Revision: 16735
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java
Log:
add expandMode methods
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java
===================================================================
---
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java 2010-04-06
15:52:57 UTC (rev 16734)
+++
root/ui-sandbox/trunk/components/tables/ui/src/main/java/org/richfaces/component/UISubTable.java 2010-04-06
16:07:37 UTC (rev 16735)
@@ -22,12 +22,7 @@
package org.richfaces.component;
import javax.el.MethodExpression;
-import javax.faces.component.UIComponent;
-import javax.faces.event.AbortProcessingException;
-import org.ajax4jsf.model.DataComponentState;
-import org.ajax4jsf.model.RepeatState;
-import org.richfaces.component.state.DataTableState;
import org.richfaces.event.ToggleListener;
/**
@@ -35,17 +30,21 @@
*
*/
+public class UISubTable extends UIDataTableBase implements Column, Expandable {
-public class UISubTable extends UIDataTableBase implements Column {
-
enum PropertyKeys {
- switchType, expanded, toggleExpression
+ expandMode, expanded, toggleExpression
}
+
+ public static final String EXPANDMODE_AJAX = "ajax";
+
+ public static final String EXPANDMODE_SERVER = "server";
+
+ public static final String EXPANDMODE_CLIENT = "client";
-
-
+
public boolean isExpanded() {
- return (Boolean)getStateHelper().eval(PropertyKeys.expanded, false);
+ return (Boolean)getStateHelper().eval(PropertyKeys.expanded, true);
}
public void setExpanded(boolean expanded) {
@@ -89,7 +88,14 @@
public ToggleListener[] getToggleListeners() {
return (ToggleListener[]) getFacesListeners(ToggleListener.class);
}
-
+
+ public String getExpandMode() {
+ return (String)getStateHelper().eval(PropertyKeys.expandMode,EXPANDMODE_AJAX);
+ }
+
+ public void setExpandMode(String expandMode) {
+ getStateHelper().put(PropertyKeys.expandMode, expandMode);
+ }
}