Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
752a3a1
added basic config files for the table component
Feb 23, 2026
b464ca6
added .content.xml for the table component
Feb 23, 2026
6fd9256
added edit toolbar for the table component _cq_editConfig.xml
Feb 23, 2026
48751d0
added table.html
Feb 23, 2026
7babc5a
added basic css and js for the table authoring currently refering the…
Feb 23, 2026
b63f728
added site clientlibs for the table component
Feb 25, 2026
d724101
added basic config files for the tableheader
Feb 25, 2026
e155b60
added basic config files for the tablerow
Feb 25, 2026
5141c84
added site clientlibs for tableheader
Feb 25, 2026
5bd372e
added clientlibs folder in the tablerow
Feb 25, 2026
e1bd831
added the table component in examples folder along with cq_template
Feb 25, 2026
defbeac
added runtime dependencies in the runtime all for the table component
Mar 5, 2026
db6f972
replaced the tr elements from the div elements to fix the selecting i…
Mar 5, 2026
8a42612
added action configs in the edit toolbar for the table component
Mar 30, 2026
025f692
added action configs for the table row and the tableroweditorhook.js …
Mar 30, 2026
d15d30a
removed the add row option from the tableHeaderRow
Mar 31, 2026
cbcaf58
updated the header cells from the textinput to text type in the templ…
Mar 31, 2026
0bc9b74
added the addCol and deleteCol actions and also there handlers
Mar 31, 2026
6d01f3e
removed cell numbers from dynamic addition of the table cols and rows
Apr 1, 2026
17dc15c
added the feature of repeatable panels to the table row at runtime
Apr 4, 2026
be9945e
added the replace feature for the tablecell to any component which is…
Apr 6, 2026
6d844a4
removed the delete options from the table cells in the table row
Apr 6, 2026
4ea970a
in this commit table tags have gone -> repeatable panels not working …
Apr 6, 2026
3fc4874
added files to fix the repeatative panels with the table tags
Apr 7, 2026
2aa3dc8
fixed the repeatable rows with indexing
May 5, 2026
532f899
changed the authoring from divs to tabletags sacirificing the touch u…
Apr 22, 2026
982808a
fixed the touch ui with the table tags
Apr 22, 2026
87b0ab5
fixed the tablecell css having controls
Apr 20, 2026
e3a8833
removed the tableeditor.css file
Apr 22, 2026
148b696
added replace feature to the components of the table Header also
May 5, 2026
09cac75
fixed the refresh issue by adding authoring dialogs for table row and…
May 8, 2026
dd3c4ac
added cypress tests and collaterals for testing
May 11, 2026
cea9fa0
added sling folder for collaterals
May 11, 2026
020afda
fixed the test cases
May 11, 2026
aa30cf1
fixed the content.xml
May 12, 2026
e2eee6e
fixed the failing testcases
May 13, 2026
2f48dc1
updated the year to 2026
May 19, 2026
6115300
fixed the short and long description for the table component
May 19, 2026
1fdb4e1
removed unsupported authoring from the table component
May 19, 2026
34811d0
refactored the table.html
May 20, 2026
bde84da
updated README for the table Component
May 20, 2026
73885d2
Resolved Conflicts
Apr 13, 2026
aa80923
added sorting feature for the table component
Apr 14, 2026
8943627
enabled sorting button during authoring too
Apr 30, 2026
7ae0472
added feature to disable/enable sorting on a particular column of the…
May 5, 2026
27d8616
added authoring options for sorting and column width
May 25, 2026
34a709b
added dor support for table component
May 16, 2026
0b10178
added dor testing
May 16, 2026
3a18898
added the feature of merge and split cell during runtime by adding co…
Apr 21, 2026
3345d7c
updated README for table, tableheader, tablerow
May 28, 2026
5aa26dd
added the feature for merge row cells and commented out the header ce…
May 28, 2026
92e9463
added testing for second phase features
May 31, 2026
d83e9b1
fixed review comments 1
Jun 4, 2026
c284c02
fixed review comments 2
Jun 4, 2026
9a01916
fixed cypress tests
Jun 10, 2026
6bc6311
fixed coverage
Jun 11, 2026
b78572c
fixed the sorting behaviour to improve the archaic behavior
Jun 15, 2026
da43f30
fixed cypress testing mergesplit feature
Jun 15, 2026
02bb9c8
fixed cypress testing
Jun 15, 2026
a259485
moved .css changes from core component to theme canvas
Jun 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,13 @@ private FormConstants() {

/** The resource type for image choice v1 */
public static final String RT_FD_FORM_IMAGE_CHOICE_V1 = RT_FD_FORM_PREFIX + "imagechoice/v1/imagechoice";
/** The resource type for table v1 */
public static final String RT_FD_FORM_TABLE_V1 = RT_FD_FORM_PREFIX + "table/v1/table";

/** The resource type for table header v1 */
public static final String RT_FD_FORM_TABLE_HEADER_V1 = RT_FD_FORM_PREFIX + "tableheader/v1/tableheader";

/** The resource type for table row v1 */
public static final String RT_FD_FORM_TABLE_ROW_V1 = RT_FD_FORM_PREFIX + "tablerow/v1/tablerow";

}
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ private ReservedProperties() {

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

/**
* Comma-separated proportional column widths JCR property, also passed into fd:dor for DOR table rendering (matches
* GuideTableElement key).
*/
public static final String PN_DOR_COLUMN_WIDTHS = "columnWidth";
Comment thread
armaang1729 marked this conversation as resolved.

/** When true, adaptive form table columns can be sorted at runtime (publish). */
public static final String PN_ENABLE_SORTING = "enableSorting";

/** fd:viewType values for table sub-components — used as :type in exported JSON and matched in AF2→AF1 DOR transformer. */
public static final String VT_TABLE = "table";
public static final String VT_TABLE_ROW = "table-row";
public static final String VT_TABLE_HEADER = "table-header";

// Begin: Form submission related properties
public static final String FD_SUBMIT_PROPERTIES = "fd:submit";
public static final String PN_SUBMIT_ACTION_TYPE = "actionType";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
package com.adobe.cq.forms.core.components.internal.models.v1.form;

import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Exporter;
import org.apache.sling.models.annotations.Model;
import org.jetbrains.annotations.NotNull;

import com.adobe.cq.export.json.ComponentExporter;
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Panel;

@Model(
adaptables = { SlingHttpServletRequest.class, Resource.class },
adapters = { Panel.class, ComponentExporter.class },
resourceType = { FormConstants.RT_FD_FORM_TABLE_HEADER_V1 })
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class TableHeaderImpl extends PanelImpl {

@Override
@NotNull
public String getExportedType() {
return ReservedProperties.VT_TABLE_HEADER;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
package com.adobe.cq.forms.core.components.internal.models.v1.form;

import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Nullable;

import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Exporter;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.InjectionStrategy;
import org.apache.sling.models.annotations.injectorspecific.ValueMapValue;
import org.jetbrains.annotations.NotNull;

import com.adobe.cq.export.json.ComponentExporter;
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Panel;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

@Model(
adaptables = { SlingHttpServletRequest.class, Resource.class },
adapters = { Panel.class, ComponentExporter.class },
resourceType = { FormConstants.RT_FD_FORM_TABLE_V1 })
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class TableImpl extends PanelImpl {

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_DOR_COLUMN_WIDTHS)
@Nullable
protected String columnWidth;

@ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_ENABLE_SORTING)
@Nullable
protected Boolean enableSorting;

/**
* When {@code true}, runtime (publish) enables client-side column sorting.
* Omitted from JSON when {@code false} (see {@link JsonInclude.Include#NON_DEFAULT}).
*/
@JsonProperty("enableSorting")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public boolean isEnableSorting() {
return Boolean.TRUE.equals(enableSorting);
}

/**
* Returns the raw comma-separated column width string from JCR (e.g. "1,1,4").
* Used in edit mode as the {@code data-column-widths} attribute.
*/
@JsonIgnore
public String getColumnWidth() {
return columnWidth;
}

/**
* True when {@link #getColumnWidthColStyles()} would return a non-empty list (valid authored widths).
*/
@JsonIgnore
public boolean isColumnWidthsConfigured() {
return !getColumnWidthColStyles().isEmpty();
}

@Override
@NotNull
public String getExportedType() {
return ReservedProperties.VT_TABLE;
}

@Override
@JsonIgnore
@NotNull
public Map<String, Object> getDorProperties() {
Comment thread
armaang1729 marked this conversation as resolved.
Map<String, Object> props = new LinkedHashMap<>(super.getDorProperties());
if (columnWidth != null && !columnWidth.isEmpty()) {
// Pass authored proportional widths into fd:dor so DoRTableElement can compute
// proportional XFA column widths (e.g. "1,2,1" → relative pixel widths).
props.put(ReservedProperties.PN_DOR_COLUMN_WIDTHS, columnWidth);
}
return props;
}

/**
* One entry per column for {@code <col style="...">}: {@code width: N%} (no HTL string concatenation).
* For example, proportional {@code "1,1,4"} becomes {@code width: 16%}, {@code width: 16%}, {@code width: 66%}.
* Negative or non-numeric values are treated as 1. The last column absorbs any rounding remainder so widths sum to 100%.
*/
@JsonIgnore
public List<String> getColumnWidthColStyles() {
if (columnWidth == null || columnWidth.isEmpty()) {
return Collections.emptyList();
}
String[] parts = columnWidth.split(",");
int[] values = new int[parts.length];
int sum = 0;
for (int i = 0; i < parts.length; i++) {
try {
values[i] = Integer.parseInt(parts[i].trim());
} catch (NumberFormatException e) {
values[i] = 1;
}
if (values[i] < 0) {
values[i] = 0;
}
sum += values[i];
}
if (sum == 0) {
return Collections.emptyList();
}
List<String> result = new ArrayList<>();
int allocated = 0;
for (int i = 0; i < values.length; i++) {
int pct = (i == values.length - 1)
? (100 - allocated)
: (int) Math.floor((values[i] * 100.0) / sum);
allocated += pct;
result.add("width: " + pct + "%");
}
return result;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2026 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
package com.adobe.cq.forms.core.components.internal.models.v1.form;

import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.models.annotations.Exporter;
import org.apache.sling.models.annotations.Model;
import org.jetbrains.annotations.NotNull;

import com.adobe.cq.export.json.ComponentExporter;
import com.adobe.cq.export.json.ExporterConstants;
import com.adobe.cq.forms.core.components.internal.form.FormConstants;
import com.adobe.cq.forms.core.components.internal.form.ReservedProperties;
import com.adobe.cq.forms.core.components.models.form.Panel;

@Model(
adaptables = { SlingHttpServletRequest.class, Resource.class },
adapters = { Panel.class, ComponentExporter.class },
resourceType = { FormConstants.RT_FD_FORM_TABLE_ROW_V1 })
@Exporter(name = ExporterConstants.SLING_MODEL_EXPORTER_NAME, extensions = ExporterConstants.SLING_MODEL_EXTENSION)
public class TableRowImpl extends PanelImpl {

@Override
@NotNull
public String getExportedType() {
return ReservedProperties.VT_TABLE_ROW;
}
}
Loading
Loading