Skip to content

Commit 5cb3085

Browse files
authored
Merge branch 'dev' into FORMS-24185
2 parents 2da1298 + c99faaa commit 5cb3085

81 files changed

Lines changed: 1434 additions & 2181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/ci/it-tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const qpPath = '/home/circleci/cq';
2525
const buildPath = '/home/circleci/build';
2626
const { TYPE, BROWSER, AEM, PRERELEASE, FT, CORE_COMPONENTS, WCM_COMPONENTS} = process.env;
2727
const isLatestAddon = AEM === 'addon-latest';
28-
const jacocoAgent = '/home/circleci/.m2/repository/org/jacoco/org.jacoco.agent/0.8.3/org.jacoco.agent-0.8.3-runtime.jar';
28+
const jacocoAgent = '/home/circleci/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar';
2929

3030
try {
3131
// # Define the image name
@@ -39,7 +39,7 @@ try {
3939

4040
//todo: remove this later, once aem image is released, since sites rotary aem base image has "2.25.4"
4141
//let wcmVersion = ci.sh('mvn help:evaluate -Dexpression=core.wcm.components.version -q -DforceStdout', true);
42-
let wcmVersion = "2.30.2";
42+
let wcmVersion = "2.32.4";
4343
ci.stage("Integration Tests");
4444
ci.dir(qpPath, () => {
4545
// Connect to QP
@@ -105,7 +105,7 @@ try {
105105
${ci.addQpFileDependency(config.modules['core-forms-components-it-tests-core'])} \
106106
${ci.addQpFileDependency(config.modules['core-forms-components-it-tests-apps'])} \
107107
${ci.addQpFileDependency(config.modules['core-forms-components-it-tests-content'])} \
108-
--vm-options \\\"-Xmx4096m -XX:MaxPermSize=1024m -Djava.awt.headless=true -javaagent:${jacocoAgent}=destfile=crx-quickstart/jacoco-it.exec\\\" \
108+
--vm-options \\\"-Xmx4096m -Djava.awt.headless=true -javaagent:${jacocoAgent}=destfile=crx-quickstart/jacoco-it.exec\\\" \
109109
${preleaseOpts}`);
110110
});
111111

.circleci/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
entrypoint: tail -f /dev/null # Keeps the container running
77

88
circleci-aem-cloudready:
9-
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:23385-openjdk11
9+
image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:27293-v2-openjdk21
1010
depends_on:
1111
- circleci-qp
1212
# Add any additional configurations or environment variables if needed

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ AEM Core Forms Components — Adaptive Forms v2 component library.
99
Module structure, Java model hierarchy, form JSON model, IT infrastructure, Cypress patterns, JCR content XML patterns.
1010
- **Runtime internals**: [`docs/architecture/runtime-internals.md`](docs/architecture/runtime-internals.md)
1111
Deep dive into the form initialization pipeline, repeatable container/InstanceManager mechanics, FT_FORMS-24358 items-array export, common crash signatures, and debugging checklist.
12+
- **Component versioning**: [`docs/architecture/component-versioning.md`](docs/architecture/component-versioning.md)
13+
When a change needs a new component version (`v1``v2`) vs. a fix-in-place, and the full checklist of what to update when bumping a version (clientlib self-containment, `_cq_dialog`/`_cq_styleConfig` inheritance, `pom.xml`, runtime clientlib embed lists, etc.).
1214

1315
### E2E Testing
1416
- **Feature Toggle Tests**: [`docs/e2e-testing/feature-toggles.md`](docs/e2e-testing/feature-toggles.md)

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/FormConstants.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ private FormConstants() {
5656
/** The resource type for date picker v1 */
5757
public static final String RT_FD_FORM_DATE_PICKER_V1 = RT_FD_FORM_PREFIX + "datepicker/v1/datepicker";
5858

59-
/** The resource type for date picker v2 */
60-
public static final String RT_FD_FORM_DATE_PICKER_V2 = RT_FD_FORM_PREFIX + "datepicker/v2/datepicker";
61-
6259
/** The resource type for number input v1 */
6360
public static final String RT_FD_FORM_NUMBER_INPUT_V1 = RT_FD_FORM_PREFIX + "numberinput/v1/numberinput";
6461

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ private ReservedProperties() {
176176

177177
public static final String FD_DRAFT_ID = "fd:draftId";
178178
public static final String FD_CHANGE_EVENT_BEHAVIOUR = "fd:changeEventBehaviour";
179+
public static final String FD_SET_PROPERTY_BEHAVIOUR = "fd:setPropertyBehaviour";
179180

180181
public static final String PN_CQ_ANNOTATIONS = "cq:annotations";
181182

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/DatePickerImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@
4444
adaptables = { SlingHttpServletRequest.class, Resource.class },
4545
adapters = { DatePicker.class,
4646
ComponentExporter.class },
47-
resourceType = {
48-
FormConstants.RT_FD_FORM_DATE_PICKER_V1,
49-
FormConstants.RT_FD_FORM_DATE_PICKER_V2
50-
})
47+
resourceType = { FormConstants.RT_FD_FORM_DATE_PICKER_V1 })
5148
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
5249
public class DatePickerImpl extends AbstractFieldImpl implements DatePicker {
5350

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/TermsAndConditionsImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
public class TermsAndConditionsImpl extends PanelImpl implements TermsAndConditions {
4747

4848
private static final String CUSTOM_TNC_PROPERTY = "fd:tnc";
49+
private static final String SHOW_AS_POPUP_PROPERTY = "fd:showAsPopup";
4950

5051
@JsonIgnore
5152
@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_SHOW_APPROVAL_OPTION)
@@ -88,6 +89,7 @@ public boolean isShowAsPopup() {
8889
if (resource.getValueMap().containsKey(CUSTOM_TNC_PROPERTY)) {
8990
properties.put(CUSTOM_TNC_PROPERTY, true);
9091
}
92+
properties.put(SHOW_AS_POPUP_PROPERTY, isShowAsPopup());
9193
return properties;
9294
}
9395

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v2/form/FormContainerImpl.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ public class FormContainerImpl extends AbstractContainerImpl implements FormCont
150150
@Nullable
151151
private String changeEventBehaviour;
152152

153+
@ValueMapValue(name = ReservedProperties.FD_SET_PROPERTY_BEHAVIOUR, injectionStrategy = InjectionStrategy.OPTIONAL)
154+
@Nullable
155+
private String setPropertyBehaviour;
156+
153157
@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_DATA)
154158
@Nullable
155159
private String data;
@@ -422,6 +426,12 @@ public String getLanguageDirection() {
422426
if (StringUtils.isNotBlank(changeEventBehaviour)) {
423427
properties.put(ReservedProperties.FD_CHANGE_EVENT_BEHAVIOUR, changeEventBehaviour);
424428
}
429+
// fd:setPropertyBehaviour ("async" default | "eager") opts a form into read-after-write for
430+
// setProperty / rule-node writes. Node-authored value is emitted as-is; no toggle-driven default
431+
// (unlike changeEventBehaviour) since the runtime defaults to the backward-compatible "async".
432+
if (StringUtils.isNotBlank(setPropertyBehaviour)) {
433+
properties.put(ReservedProperties.FD_SET_PROPERTY_BEHAVIOUR, setPropertyBehaviour);
434+
}
425435
properties.put(FD_FORM_DATA_ENABLED, formDataEnabled);
426436
if (this.autoSaveConfig != null && this.autoSaveConfig.isEnableAutoSave()) {
427437
properties.put(ReservedProperties.FD_AUTO_SAVE_PROPERTY_WRAPPER, this.autoSaveConfig);

bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/servlets/FormMetaDataDataSourceServlet.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public enum FormMetaDataType {
8787
PREFILL_ACTION("prefillServiceProvider"),
8888
LANG("lang"),
8989
FORMATTERS("formatters"),
90-
SSV_CLOUD_CONFIG("ssvCloudServiceConfiguration");
90+
SSV_CLOUD_CONFIG("ssvCloudServiceConfiguration"),
91+
FILE_ATTACHMENT_VALIDATOR("fileAttachmentValidator");
9192

9293
private String value;
9394

@@ -181,12 +182,13 @@ private List<Resource> getDataSourceResources(SlingHttpServletRequest request, R
181182
FormMetaData formMetaData = resourceResolver.adaptTo(FormMetaData.class);
182183
if (formMetaData != null) {
183184
Iterator<FormsManager.ComponentDescription> metaDataList = null;
185+
I18n i18n = new I18n(request.getResourceBundle(request.getLocale()));
184186
switch (type) {
185187
case FORMATTERS:
186188
case LANG:
187189
ContentPolicy policy = ComponentUtils.getPolicy((String) request.getAttribute(Value.CONTENTPATH_ATTRIBUTE),
188190
resourceResolver);
189-
resources.add(getResourceForDropdownDisplay(resourceResolver, "Select", ""));
191+
resources.add(getResourceForDropdownDisplay(resourceResolver, i18n.get("Select"), ""));
190192
if (policy != null) {
191193
ValueMap props = policy.getProperties();
192194
if (props != null) {
@@ -204,7 +206,7 @@ private List<Resource> getDataSourceResources(SlingHttpServletRequest request, R
204206
}
205207
}
206208
}
207-
resources.add(getResourceForDropdownDisplay(resourceResolver, "Custom", "custom"));
209+
resources.add(getResourceForDropdownDisplay(resourceResolver, i18n.get("Custom"), "custom"));
208210
break;
209211
case SUBMIT_ACTION:
210212
// filter the submit actions by uniqueness and data model
@@ -223,7 +225,12 @@ private List<Resource> getDataSourceResources(SlingHttpServletRequest request, R
223225
case PREFILL_ACTION:
224226
metaDataList = formMetaData.getPrefillActions();
225227
// Add an explicit empty option so authors can clear an already selected prefill service.
226-
I18n i18n = new I18n(request.getResourceBundle(request.getLocale()));
228+
resources.add(getResourceForDropdownDisplay(resourceResolver, i18n.get("None"), ""));
229+
resources.addAll(this.getResourceListFromComponentDescription(metaDataList, resourceResolver));
230+
break;
231+
case FILE_ATTACHMENT_VALIDATOR:
232+
metaDataList = formMetaData.getFileAttachmentValidators();
233+
// Add an explicit empty option so authors can clear an already selected file attachment validator.
227234
resources.add(getResourceForDropdownDisplay(resourceResolver, i18n.get("None"), ""));
228235
resources.addAll(this.getResourceListFromComponentDescription(metaDataList, resourceResolver));
229236
break;

bundles/af-core/src/test/java/com/adobe/cq/forms/core/Utils.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import org.apache.commons.io.FilenameUtils;
3030
import org.apache.commons.io.IOUtils;
31+
import org.apache.sling.api.scripting.SlingBindings;
3132
import org.apache.sling.testing.mock.sling.servlet.MockSlingHttpServletRequest;
3233
import org.jetbrains.annotations.NotNull;
3334

@@ -252,4 +253,22 @@ public static Method getPrivateMethod(Class clazz, String privateMethodName) {
252253
return null;
253254
}
254255
}
256+
257+
/**
258+
* Removes the request's {@link SlingBindings} attribute so the AF locale-resolution code in
259+
* {@code GuideUtils} takes its {@code bindings == null} branches.
260+
* <p>
261+
* Call this in tests that set an AF language parameter before adapting/using a model. Newer
262+
* {@code aem-forms-sdk-api} versions resolve the locale via {@code GuideUtils}, and when a
263+
* {@link SlingBindings} is present they look up services through {@code bindings.getSling()}:
264+
* {@code getSanitizedLocale(...)} fetches the runtime-only Granite {@code ToggleRouter} (absent
265+
* from the test classpath → {@link NoClassDefFoundError}), and {@code getLocaleParamFromRequest(...)}
266+
* fetches {@code GuideLocalizationService} via {@code getSling()} without null-guarding it. Both
267+
* are skipped entirely when the {@code SlingBindings} attribute is absent, and the locale is then
268+
* taken from the {@code afAcceptLang} request parameter (which these tests set) — the same result
269+
* expected in production for that parameter, since no {@code ToggleRouter} is registered in tests.
270+
*/
271+
public static void disableLocaleFeatureToggleLookup(MockSlingHttpServletRequest request) {
272+
request.setAttribute(SlingBindings.class.getName(), null);
273+
}
255274
}

0 commit comments

Comments
 (0)