[jboss-svn-commits] JBL Code SVN: r31396 - labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/decisiontable.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Feb 4 04:36:43 EST 2010


Author: jervisliu
Date: 2010-02-04 04:36:43 -0500 (Thu, 04 Feb 2010)
New Revision: 31396

Modified:
   labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/decisiontable/GuidedDecisionTableWidget.java
Log:
https://jira.jboss.org/jira/browse/GUVNOR-498: Decision table contains undefined and unnamed columns

Modified: labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/decisiontable/GuidedDecisionTableWidget.java
===================================================================
--- labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/decisiontable/GuidedDecisionTableWidget.java	2010-02-04 07:01:24 UTC (rev 31395)
+++ labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/decisiontable/GuidedDecisionTableWidget.java	2010-02-04 09:36:43 UTC (rev 31396)
@@ -719,12 +719,13 @@
 
         int colCount = 0;
 
-        BaseColumnConfig[] cols = new BaseColumnConfig[fds.length + 1]; //its +1 as we have the separator -> thing.
+        BaseColumnConfig[] cols = new BaseColumnConfig[fds.length]; //its +1 as we have the separator -> thing.
         cols[0] = new ColumnConfig() {
             {
                 setDataIndex( "num" ); //NON-NLS
-                setWidth( 20 );
+                setWidth( 60 );
                 setSortable( false );
+                setHeader( "Row Number" );
                 setRenderer( new Renderer() {
                     public String render(Object value,
                                          CellMetadata cellMetadata,
@@ -822,10 +823,12 @@
         }
 
         //the split thing
-        cols[colCount] = new ColumnConfig() {
+        //The separator column causes confusion, see GUVNOR-498. Remove this column for now until  
+        //we find a better way to represent a column for the purpose of separator. 
+/*        cols[colCount] = new ColumnConfig() {
             {
                 setDataIndex( "x" );
-                setHeader( "" );
+                setHeader( "x" );
                 //setFixed(true);
                 setSortable( false );
                 setResizable( false );
@@ -843,12 +846,12 @@
                 setWidth( 20 );
             }
         };
-        colCount++;
+        colCount++;*/
 
         for ( int i = 0; i < dt.actionCols.size(); i++ ) {
             //here we could also deal with numeric type?
             final ActionCol c = dt.actionCols.get( i );
-            fds[colCount - 1] = new StringFieldDef( c.header );
+            fds[colCount] = new StringFieldDef( c.header );
 
             cols[colCount] = new ColumnConfig() {
                 {



More information about the jboss-svn-commits mailing list