File tree Expand file tree Collapse file tree
src/org/labkey/test/components/ui/grids Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -642,6 +642,24 @@ public List<String> getColumnLabels()
642642 return elementCache ().getColumnLabels ();
643643 }
644644
645+ /**
646+ *
647+ * @return a List<String> containing the names of the fields for each column header
648+ */
649+ public List <String > getColumnNames ()
650+ {
651+ return elementCache ().getColumnNames ();
652+ }
653+
654+ /**
655+ *
656+ * @return a List<FieldKey> containing the fieldKeys for each column header
657+ */
658+ public List <FieldKey > getColumnFieldKeys ()
659+ {
660+ return elementCache ().getColumnFieldKeys ();
661+ }
662+
645663 /**
646664 * Get data from a row
647665 * @param rowIndex the index of the desired row
@@ -773,7 +791,7 @@ public Optional<String> getGridEmptyMessage()
773791 return msg ;
774792 }
775793
776- List <FieldReference > getHeaders ()
794+ public List <FieldReference > getHeaders ()
777795 {
778796 return Collections .unmodifiableList (elementCache ().findHeaders ());
779797 }
@@ -861,6 +879,16 @@ protected List<String> getColumnLabels()
861879 return findHeaders ().stream ().map (FieldReferenceManager .FieldReference ::getLabel ).collect (Collectors .toList ());
862880 }
863881
882+ protected List <String > getColumnNames ()
883+ {
884+ return findHeaders ().stream ().map (FieldReferenceManager .FieldReference ::getName ).collect (Collectors .toList ());
885+ }
886+
887+ protected List <FieldKey > getColumnFieldKeys ()
888+ {
889+ return findHeaders ().stream ().map (FieldReferenceManager .FieldReference ::getFieldKey ).collect (Collectors .toList ());
890+ }
891+
864892 protected GridRow getRow (int index )
865893 {
866894 return getRows ().get (index );
You can’t perform that action at this time.
0 commit comments