Skip to content

Commit

Permalink
Small change to how nested attributes are handled with regard to visi…
Browse files Browse the repository at this point in the history
…bleInForm
  • Loading branch information
Bas Rutten committed Nov 15, 2024
1 parent 7d9ee1b commit 079ad92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ private void setAnnotationCustomOverwrites(Attribute attribute, AttributeModel m
private void setAnnotationVisibilityOverrides(Attribute attribute, AttributeModelImpl model, boolean nested) {
// set visibility (hide nested attribute by default; they must be shown using
// the message bundle)
if (attribute.visibleInForm() != null && !VisibilityType.INHERIT.equals(attribute.visibleInForm()) && !nested) {
if (attribute.visibleInForm() != null && !VisibilityType.INHERIT.equals(attribute.visibleInForm())) {
model.setVisibleInForm(VisibilityType.SHOW.equals(attribute.visibleInForm()));
}

Expand Down
7 changes: 6 additions & 1 deletion src/docs/asciidoc/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ also start with “is”, e.g., `isValid()`).
corresponding to the property. This allows you to create attribute
models for read-only or composite properties (e.g., a `getNameAndAge()`
method which concatenates the name and age as a String). Note that such
an attribute will have to be defined as read-only.
an attribute will have to be defined as read-only using the "editable"
setting on the attribute model.
* Certain attributes are ignored. Currently, this includes only `version`
(used for JPA optimistic locking) and `class` (as every object has a
`getClass()` method).
Expand Down Expand Up @@ -373,6 +374,10 @@ values:
enumeration values (`SHOW`/`HIDE`) and the Boolean values `true` and `false`
are supported.

=== Overrides for nested entities



== Attribute model settings

In this section, we explain all the supported settings of the attribute
Expand Down

0 comments on commit 079ad92

Please sign in to comment.