Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Weird data-sly-repeat behavior

demd43642519
Level 4
Level 4

Hi guys,

I'm dealing with this weird data-sly behavior and I can't find an explanation for it.

Have you ever encountered it?

So I've got this data sly-repeat:

<div data-sly-repeat.result=${model.result}">

          <form class="randomclass">

               <input id="1" type="text"/>

          </form>

</div>

Expected: I should get 2 form rendered in my html page. but I get this:

1628411_pastedImage_1.png

1 Accepted Solution
demd43642519
Correct answer by
Level 4
Level 4

I found the issue that caused the problem.

Apparently my data-sly-repeat was inside another form which was not closed where it should be and looks like that caused the problem.
Now it's all fine, thank you !

View solution in original post

0 Replies
smacdonald2008
Level 10
Level 10

Looks like the model is not setup correctly. See this article as an example of how to work with a repeating data set -- Adobe Experience Manager Help | Creating a HTL Repeating Data Set 6.3 Component that uses Sling Mode...

Arun_Patidar
Community Advisor
Community Advisor

Can you share your Java code as well, I can see there are 3 forms but 4 input tags. There is something wrong with HTL code and Java code as well.

Just for a test can you try with data-sly-list as well e.g.

<sly data-sly-list.myList=${model.result}">

  <div>

          <form class="randomclass">

              <input id="1" type="text"/>

          </form>

  </div>

</sly>

Feike_Visser1
Employee
Employee

you are missing a " here: <div data-sly-repeat.result=${model.result}">

demd43642519
Correct answer by
Level 4
Level 4

I found the issue that caused the problem.

Apparently my data-sly-repeat was inside another form which was not closed where it should be and looks like that caused the problem.
Now it's all fine, thank you !

View solution in original post