Merged
Conversation
uses Map of String or String[] internally insteadof Map<String,String> checkpoint...
NOTE: BeanViewForm also probably doesn't need to extend DynaBean and use StringBeanDynaClass
use setValueToBind() in more places
Collections.unmodifiableMap()
StrintUtils.trimToNull()
Support [] as a form field suffix
labkey-nicka
approved these changes
Nov 2, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors TableViewForm and related classes to modernize the form data binding API. The key changes include:
- Removing the
DynaBeaninterface fromTableViewForm(moved toBeanViewFormonly) - Replacing deprecated
set()andget()methods withsetValueToBind()andgetAsString() - Changing internal storage from
Map<String, String>toMap<String, Object>to support arrays and other types - Deleting obsolete
TableWrapperDynaClassandQueryWrapperDynaClassclasses - Refactoring string array handling to support Google Sheets-compatible multi-value parsing
- Updating method signatures to use proper generic types (
Class<?>instead of rawClass)
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| api/src/org/labkey/api/data/TableViewForm.java | Core refactoring: removed DynaBean interface, changed API from get/set to getAsString/setValueToBind, updated internal storage to support non-string values |
| api/src/org/labkey/api/data/BeanViewForm.java | Restored DynaBean interface support here, delegating to parent's new API methods |
| api/src/org/labkey/api/data/ConvertHelper.java | Updated string array converter to use new Google Sheets-compatible parsing |
| api/src/org/labkey/api/util/PageFlowUtil.java | Added Google Sheets-compatible multi-value parsing/formatting methods, replaced StringUtils with Strings.CS for case-sensitive operations |
| study/src/.../StudyPropertiesController.java | Updated to use new setValueToBind API |
| study/src/.../StudyController.java | Updated to use new getAsString API |
| study/src/.../CohortController.java | Updated to use new setValueToBind API |
| issues/src/.../IssuesController.java | Updated to use new getValuesToBind/setValuesToBind and getAsString APIs |
| core/src/.../TableViewFormTestCase.java | Added comprehensive tests for array and boolean binding, updated existing tests |
| api/src/.../StringBeanDynaClass.java | Fixed raw type warnings, removed commented code |
| api/src/.../ColumnRenderPropertiesImpl.java | Refactored getJavaClass to use static helper method |
| api/src/.../*DisplayColumn.java | Updated multiple display columns to use new API |
| announcements/src/.../insert.jsp, respond.jsp | Updated JSP files to use getAsString |
| api/src/.../TableWrapperDynaClass.java | Deleted obsolete class |
| api/src/.../QueryWrapperDynaClass.java | Deleted obsolete class |
Comments suppressed due to low confidence (4)
api/src/org/labkey/api/data/TableViewForm.java:1
- Missing spaces around the '=' operator. Should be 'int i = p.getIndex();' to follow Java coding conventions.
/*
api/src/org/labkey/api/data/TableViewForm.java:1
- Missing spaces around operators for consistency. Should be 'return i < s.length - 1 ? s[i + 1] : '\0';'.
/*
api/src/org/labkey/api/data/TableViewForm.java:1
- Missing space around the '-' operator. Should be 'if (i >= s.length - 1)' for consistency.
/*
api/src/org/labkey/api/data/TableViewForm.java:1
- Missing spaces around '+' operators. Should be 'p.setIndex(i + 1);' and 'return s[i + 1];' for consistency.
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Simplify TableViewForm with an eye toward making array binding less convoluted
Related Pull Requests
Changes