Skip to content

Commit f35c808

Browse files
gregh3269Greg Huber
andauthored
Sync tag with main ftl template. (#1212)
Co-authored-by: Greg Huber <ghuber@apache.org>
1 parent 6bb71ca commit f35c808

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ public void generate() throws IOException {
6868
.addIfTrue("checked", isChecked(params, itemKeyStr))
6969
.addIfTrue("readonly", params.get("readonly")).addIfTrue("disabled", disabled)
7070
.addIfExists("tabindex", params.get("tabindex"))
71-
.addIfExists("id", id + "-" + Integer.toString(cnt));
71+
.addIfExists("id", id + "-" + Integer.toString(cnt))
72+
.addIfExists("class", params.get("cssClass"))
73+
.addIfExists("style", params.get("cssStyle"));
7274
start("input", a);
7375
end("input");
7476

7577
// Label section
7678
a = new Attributes();
77-
a.add("for", id + "-" + Integer.toString(cnt)).addIfExists("class", params.get("cssClass"))
78-
.addIfExists("style", params.get("cssStyle"));
79+
a.add("for", id + "-" + Integer.toString(cnt)).add("class", "checkboxLabel");
7980
super.start("label", a);
8081
if (StringUtils.isNotEmpty(itemValueStr))
8182
characters(itemValueStr);

0 commit comments

Comments
 (0)