[richfaces-svn-commits] JBoss Rich Faces SVN: r11910 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/component.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Dec 19 07:53:05 EST 2008
Author: pgolawski
Date: 2008-12-19 07:53:05 -0500 (Fri, 19 Dec 2008)
New Revision: 11910
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
Log:
changed tableState mechanism
https://jira.jboss.org/jira/browse/RF-5041
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-12-19 12:52:52 UTC (rev 11909)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/component/ExtendedDataTableState.java 2008-12-19 12:53:05 UTC (rev 11910)
@@ -28,7 +28,6 @@
import java.util.Iterator;
import java.util.List;
-import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -49,12 +48,8 @@
private static final long serialVersionUID = -3103664821855261335L;
- public static final String TABLE_STATE_ATTR_NAME = "tableState";
-
public static final String NONE_COLUMN_ID = "none";
- //protected static final String SEP = ":";
-
protected ColumnsOrder columnsOrder;
protected ColumnsVisibility columnsVisibility;
protected ColumnsSizeState columnsSizeState;
@@ -71,7 +66,7 @@
*/
protected void init(UIExtendedDataTable extendedDataTable){
//get state value from components attribute
- String value = (String)extendedDataTable.getAttributes().get(TABLE_STATE_ATTR_NAME);
+ String value = extendedDataTable.getTableState();
JSONMap stateMap = null;
if ((value != null) && (value.length() > 0)){
try {
@@ -108,19 +103,9 @@
catch(Exception e){
columnGroupingState = ColumnGroupingState.getColumnGropingState(extendedDataTable, (JSONMap)null);
}
- }//init
+ }//init
/**
- * Puts own state into component state.
- */
- public void publishChanges(FacesContext context, UIExtendedDataTable extendedDataTable){
- ValueExpression ve = extendedDataTable.getValueExpression(TABLE_STATE_ATTR_NAME);
- if ((null != ve) && (!ve.isReadOnly(context.getELContext()))) {
- ve.setValue(context.getELContext(), toString());
- }
- }//publishChanges
-
- /**
* Converts its state to String representation in JSON format.
*/
public String toString(){
More information about the richfaces-svn-commits
mailing list