Changeset 3916


Ignore:
Timestamp:
Oct 25, 2010, 9:57:13 AM (13 years ago)
Author:
olle
Message:

Refs #713. Class/file action/directory/ViewActiveDirectory.java in
client/servlet/ updated to no longer include columns from the
file table in the directory table, if the columns do not correspond
to an attribute for a directory item. An exception is the special
item Id column, which is used to select items:

  1. Private method

List<Column> adaptTableHeader(int startIndex, Table templateTable, Table sourceTable)
updated to only add Id column, of template columns not in source
table.

  1. Private method

Row adaptTableRow(Row row, int startIndex, Table templateTable, Table sourceTable)
updated to not add empty cell for template column not in source
table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/directory/ViewActiveDirectory.java

    r3915 r3916  
    10281028            else
    10291029            {
    1030                 // Add new column for template column not in source table
    1031                 Column column = new Column(templateColumnName);
    1032                 // If initial Id column, remove column name
    1033                 if (i == 0 && column.getValue().equals("Id"))
    1034                 {
    1035                     column.setValue("");
    1036                 }
    1037                 tmpTable.add(column);
    1038                 log
    1039                 .debug("i = " + i + " templateColumnName = \"" + templateColumnName + "\" new column \"" + column
    1040                 .getValue() + "\" inserted.");
     1030              // Of template columns not in source table, only add "Id" column
     1031              if (templateColumnName.equals("Id"))
     1032              {               
     1033                    // Add new column for template column not in source table
     1034                    Column column = new Column(templateColumnName);
     1035                    // If initial Id column, remove column name
     1036                    if (i == 0 && column.getValue().equals("Id"))
     1037                    {
     1038                        column.setValue("");
     1039                    }
     1040                    tmpTable.add(column);
     1041                    log
     1042                    .debug("i = " + i + " templateColumnName = \"" + templateColumnName + "\" new column \"" + column
     1043                    .getValue() + "\" inserted.");
     1044              }
    10411045            }
    10421046        }
     
    11271131                .getValue() + "\" inserted.");
    11281132            }
     1133            /*
    11291134            else
    11301135            {
     
    11341139                .debug("New row i = " + i + " templateColumnName = \"" + templateColumnName + "\" empty cell inserted.");
    11351140            }
     1141            */
    11361142        }
    11371143        // Construct adapted source row.
Note: See TracChangeset for help on using the changeset viewer.